소스 정보
- 저장소
- andrem-sec/psc-comet
- 최근 소스 활동
- 2026년 4월 1일 00:39
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/andrem-sec/psc-comet --skill safety-guard명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | safety-guard |
| description | Three-mode safety guardrail for autonomous operations with action logging |
| version | 0.1.0 |
| level | 2 |
| triggers | ["enable safety guard","careful mode","freeze writes","autonomous safety"] |
| context_files | ["context/learnings.md"] |
| steps | [{"name":"Mode Selection","description":"Choose Careful (warn), Freeze (lock), or Guard (both)"},{"name":"Hook Configuration","description":"Enable PreToolUse hooks for protected operations"},{"name":"Operation Monitoring","description":"Intercept and evaluate destructive commands"},{"name":"Action Logging","description":"Log blocked and warned actions to ~/.claude/safety-guard.log"},{"name":"User Notification","description":"Alert user when guard blocks or warns on operation"}] |
Three-mode safety guardrail system for autonomous agent sessions. Prevents destructive operations and logs all interventions.
Without safety guardrails, autonomous agents:
Safety guard ensures autonomous operations remain safe and auditable.
Behavior: Warns on destructive commands but allows execution after user confirmation.
Use When: Standard development, trusted environments, human oversight available.
Protected Operations: rm -rf, git push --force, git reset --hard, DROP TABLE/DATABASE, docker system prune, kubectl delete, chmod 777, sudo rm, npm/cargo publish, --no-verify flags.
Behavior: Blocks write operations to specific paths. Config: FREEZE_PATHS="/etc/,~/.ssh/". Blocks Write, Edit, and Bash ops to frozen paths.
Behavior: Warns on destructive ops AND locks write paths. Use for: autonomous agents, docker-sandbox, permissionMode: dontAsk sessions.
Safety guard extends existing hooks with additional checks.
PreToolUse Bash Hook Enhancement:
# Add to existing block-destructive.sh or create safety-guard-bash.sh
SAFETY_MODE="${SAFETY_GUARD_MODE:-off}" # off | careful | freeze | guard
LOG_FILE="${HOME}/.claude/safety-guard.log"
if [ "$SAFETY_MODE" = "off" ]; then
exit 0 # Safety guard disabled
fi
COMMAND="$1" # Tool input from stdin
# Careful mode: destructive operation detection
if [[ "$SAFETY_MODE" =~ (careful|guard) ]]; then
if echo "$COMMAND" | grep -qE "rm\s+-rf|git push.*--force|git reset --hard|DROP (TABLE|DATABASE)|docker system prune|kubectl delete|chmod 777|sudo rm|--no-verify"; then
echo "$(date -Iseconds) WARN: $COMMAND" >> "$LOG_FILE"
echo "⚠️ SAFETY GUARD: Destructive operation detected"
echo "Command: $COMMAND"
echo "Continue? (y/N):"
# Exit 1 to prompt user, or exit 0 if user confirms
fi
fi
# Freeze mode: write path locking
if [[ "$SAFETY_MODE" =~ (freeze|guard) ]];
FREEZE_PATHS=
[ -n ];
PreToolUse Write/Edit Hook Enhancement:
# Check if write target matches frozen paths
SAFETY_MODE="${SAFETY_GUARD_MODE:-off}"
TARGET_FILE="$1"
if [[ "$SAFETY_MODE" =~ (freeze|guard) ]]; then
FREEZE_PATHS="${FREEZE_PATHS:-}"
for frozen_path in ${FREEZE_PATHS//,/ }; do
if [[ "$TARGET_FILE" == "$frozen_path"* ]]; then
echo "$(date -Iseconds) BLOCK: Write to $TARGET_FILE (frozen path)" >> ~/.claude/safety-guard.log
echo "❌ SAFETY GUARD: Write blocked"
echo "Path: $TARGET_FILE is frozen"
exit 2 # Block operation
fi
done
fi
All interventions logged to ~/.claude/safety-guard.log with ISO timestamp, action (WARN/BLOCK), command, reason, outcome. Rotate at session start if >10KB.
Via env vars: SAFETY_GUARD_MODE=guard and FREEZE_PATHS="/etc/,~/.ssh/". Or in agent frontmatter. Unset to disable.
Complements:
Does NOT replace:
Always-on Guard mode: Guard mode for routine development slows workflow. Use Careful mode for normal work.
Freezing entire project: Freeze mode for / blocks all writes. Be specific with frozen paths.
Ignoring warnings repeatedly: If you're clicking through 10 safety warnings, the guard is misconfigured for your task.
No log review: Safety log accumulates warnings. Review monthly to identify risky patterns.