~ / rigs / tviettuan01-gif / claude-code-safety-kit

tviettuan01-gif/claude-code-safety-kit

Safe-by-default starter for Claude Code: CLAUDE.md template, hooks that block destructive commands and secret-file reads, permission settings and 3 skills.

↗ GitHub ★ 0 MIT updated 4d ago project Claude Code
field: Developer tools workflow: Git & commits
stack: Python
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
~172 tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
5/5
Blocks destructive commands · Protects secrets · Pre-tool screening hook · No YOLO mode · Sandbox or ask-first rules · details
Quality 72/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit tviettuan01-gif/claude-code-safety-kit/.claude ./rig-claude-code-safety-kit  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ npx degit tviettuan01-gif/claude-code-safety-kit/.claude/skills/release-notes .claude/skills/release-notes
$ npx degit tviettuan01-gif/claude-code-safety-kit/.claude/skills/review-diff .claude/skills/review-diff
$ npx degit tviettuan01-gif/claude-code-safety-kit/.claude/skills/write-tests .claude/skills/write-tests

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Read(./**/*.pem)",
      "Read(./**/*.key)"
    ],
    "ask": [
      "Bash(git push:*)",
      "Bash(git commit:*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash|PowerShell|Read|Edit|Write|MultiEdit|NotebookEdit",
        "hooks": [
          {
            "type": "command",
            "command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard.py\""
          }
        ]
      }
    ]
  }
}

Skills (3)

Hooks (1)

eventmatcherruns
PreToolUseBash|PowerShell|Read|Edit|Write|MultiEdit|NotebookEditpython "$CLAUDE_PROJECT_DIR/.claude/hooks/guard.py"

Permissions

deny (5)
Read(./.env)
Read(./.env.*)
Read(./secrets/**)
Read(./**/*.pem)
Read(./**/*.key)
ask (2)
Bash(git push:*)
Bash(git commit:*)
allow (3)
Bash(git status)
Bash(git diff:*)
Bash(git log:*)

Similar rigs

copied ✓