~ / rigs / spencer-life / dotfiles

spencer-life/dotfiles

Personal dotfiles — git config, global gitignore, Claude Code hooks. Auto-applied to GitHub Codespaces.

↗ GitHub ★ 0 no license updated 8mo ago personal setup Claude Code
share on X
ARCHETYPE
Minimalist
Lean instructions, few tools, tiny context tax. Lets the model think.
CONTEXT TAX · EVERY TURN
~0 tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details

Copy this rig

# review before running: this installs third-party code
$ npx degit spencer-life/dotfiles/.claude ./rig-dotfiles  # 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.

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

{
  "permissions": {
    "deny": [
      "Bash(rm -rf:*)",
      "Bash(sudo:*)",
      "Bash(chmod:*)",
      "Bash(chown:*)",
      "Bash(git push --force:*)",
      "Bash(git push -f:*)",
      "Bash(git reset --hard:*)",
      "Bash(git clean -f:*)",
      "Bash(git checkout .:*)",
      "Bash(git restore .:*)",
      "Bash(git branch -D:*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash -c 'if echo \"$CLAUDE_TOOL_INPUT\" | grep -q \"git commit\"; then SENSITIVE=$(git diff --cached --name-only 2>/dev/null | grep -iE \"\\.(env|pem|key|secret|credentials|p12|pfx|jks)$|credentials|secrets\" || true); if [ -n \"$SENSITIVE\" ]; then"
          }
        ]
      }
    ]
  }
}

Hooks (2)

eventmatcherruns
SessionStart*bash -c 'git rev-parse --is-inside-work-tree > /dev/null 2>&1 && echo "--- Git Context ---" && echo "Branch: $(git branch --show-current)" && echo "--- Changed Files ---" && git status --short && echo "--- Recent Commits ---" && git log --o
PreToolUseBashbash -c 'if echo "$CLAUDE_TOOL_INPUT" | grep -q "git commit"; then SENSITIVE=$(git diff --cached --name-only 2>/dev/null | grep -iE "\.(env|pem|key|secret|credentials|p12|pfx|jks)$|credentials|secrets" || true); if [ -n "$SENSITIVE" ]; then

Permissions

deny (11)
Bash(rm -rf:*)
Bash(sudo:*)
Bash(chmod:*)
Bash(chown:*)
Bash(git push --force:*)
Bash(git push -f:*)
Bash(git reset --hard:*)
Bash(git clean -f:*)
Bash(git checkout .:*)
Bash(git restore .:*)
Bash(git branch -D:*)
ask (0)
—
allow (0)
—

Similar rigs

copied ✓