guard
하는 일
이 스킬은 두 가지 안전 점검을 동시에 켭니다. 위험한 명령에 대한 경고와, 파일을 바꿀 수 있는 폴더의 제한입니다. 에이전트가 일하는 동안 강한 안전망을 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓에이전트가 프로젝트에서 일하는 동안 최대한의 보호를 원할 때.
- ✓파괴적 명령 경고와 폴더 제한을 동시에 원할 때.
- ✓중요한 프로젝트에 작업을 맡기며 실수를 감당할 수 없을 때.
스킬 링크
https://github.com/garrytan/gstack/blob/main/guard/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“완전한 안전 모드를 켜고, 모든 편집은 src 폴더 안에만 두세요. 파괴적인 것이 있으면 먼저 경고해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
사용자가 폴더를 고르면 스킬은 명령 경고와 폴더 제한을 결합합니다. 폴더 밖의 편집은 차단되고, 위험한 명령은 경고를 일으킵니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
/guard — Full Safety Mode
Activates both destructive command warnings and directory-scoped edit restrictions.
This is the combination of /careful + /freeze in a single command.
Dependency note: This skill references hook scripts from the sibling /careful
and /freeze skill directories. Both must be installed (they are installed together
by the gstack setup script).
GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
mkdir -p "$GSTACK_STATE_ROOT"/analytics
echo '{"skill":"guard","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> "$GSTACK_STATE_ROOT"/analytics/skill-usage.jsonl 2>/dev/null || true
Setup
Ask the user which directory to restrict edits to. Use AskUserQuestion:
- Question: "Guard mode: which directory should edits be restricted to? Destructive command warnings are always on. Files outside the chosen path will be blocked from editing."
- Text input (not multiple choice) — the user types a path.
Once the user provides a directory path:
Set the user-selected boundary with the shared writer, which resolves a physical absolute path and serializes replacement with investigation cleanup:
bash "$HOME/.claude/skills/gstack/freeze/bin/freeze-state.sh" set "<user-provided-path>"
On helper failure, do not claim the boundary is active. Preserve the state and report recovery; never bypass the shared writer with a direct write or deletion.
Tell the user:
- "Guard mode active. Two protections are now running:"
- "1. Destructive command guard — rm -rf, DROP TABLE, force-push, etc. warn before executing (overridable); catastrophic shapes (recursive delete of / or ~, force-push to the default branch) are hard-denied"
- "2. Edit boundary — file edits restricted to
<path>/. Edits outside this directory are blocked." - "To remove the persistent edit boundary, run
/unfreeze. Ending the session stops its hooks but does not delete that boundary."
What's protected
See /careful for the full list of destructive command patterns and safe exceptions.
See /freeze for how edit boundary enforcement works.
자주 묻는 질문
완전한 안전 모드에는 무엇이 포함되나요?
파괴적 명령에 대한 경고와, 사용자가 고른 폴더 밖의 파일 편집 차단이 포함됩니다.
경고는 항상 켜져 있나요?
네. 설명에 따르면 이 모드에서는 파괴적 명령 경고가 항상 켜져 있습니다.
다른 스킬을 설치해야 하나요?
네. 함께 설치되는 두 개의 형제 스킬에서 훅 스크립트를 사용합니다.
상세 정보
작성자의 원본 설명
Full safety mode: destructive command warnings + directory-scoped edits. (gstack)
repo: garrytan/gstack
인기도
- GitHub 스타
- 139k
- 순위
- #705
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
autoplan
139k제품, 디자인, 엔지니어링, 개발자 경험 관점에서 한 번의 실행으로 계획을 여러 각도에서 검토하도록 돕습니다.
benchmark
139k변경 전후의 페이지 속도를 측정해 웹 성능 저하를 찾아내도록 에이전트를 돕습니다.
browse
139k에이전트가 실제 웹 브라우저를 열어 페이지 흐름을 클릭하고, 스크린샷을 찍고, 콘솔 오류를 확인하도록 돕습니다.
hackernews-frontpage
139kHacker News 첫 페이지의 현재 글을 순위, 제목, 링크, 점수, 댓글 수와 함께 수집하도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.