~ / rigs / sohaibdevv / Claude-Code-Best-Practices

sohaibdevv/Claude-Code-Best-Practices

The community handbook for shipping real software with Claude Code. Guides, working plugins, drop-in starter kits, published benchmarks, and a dogfooded .claude/ setup you can copy.

↗ GitHub ★ 2 MIT updated 15d ago project Claude Code
share on X
ARCHETYPE
Automator
Hooks on every lifecycle event: format, lint, notify, log.
CONTEXT TAX · EVERY TURN
~3.5k tokens
Moderate · 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 sohaibdevv/Claude-Code-Best-Practices/.claude ./rig-claude-code-best-practices  # 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 sohaibdevv/Claude-Code-Best-Practices/.claude/skills/lint-docs .claude/skills/lint-docs
$ npx degit sohaibdevv/Claude-Code-Best-Practices/examples/skills/pr-describe .claude/skills/pr-describe
$ npx degit sohaibdevv/Claude-Code-Best-Practices/examples/skills/test-triage .claude/skills/test-triage
$ npx degit sohaibdevv/Claude-Code-Best-Practices/plugins/commit-helper/skills/conventional-commit .claude/skills/conventional-commit
$ npx degit sohaibdevv/Claude-Code-Best-Practices/starters/go/.claude/skills/add-handler .claude/skills/add-handler
$ npx degit sohaibdevv/Claude-Code-Best-Practices/starters/python/.claude/skills/api-endpoint .claude/skills/api-endpoint
$ npx degit sohaibdevv/Claude-Code-Best-Practices/starters/react/.claude/skills/component-new .claude/skills/component-new
$ npx degit sohaibdevv/Claude-Code-Best-Practices/starters/react/.claude/skills/test-component .claude/skills/test-component
$ npx degit sohaibdevv/Claude-Code-Best-Practices/starters/rust/.claude/skills/add-endpoint .claude/skills/add-endpoint

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(git push:*)",
      "Bash(rm -rf:*)",
      "Bash(git push:*)",
      "Bash(rm -rf:*)",
      "Bash(go get:*)",
      "Bash(go install:*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "bash tools/hooks/block-secrets.sh"
          },
          {
            "type": "command",
            "command": "bash .claude/hooks/block-secrets.sh"
          }
        ]
      }
    ]
  }
}

Skills (9)

Hooks (4)

eventmatcherruns
PreToolUseWrite|Editbash tools/hooks/block-secrets.sh
PostToolUseWrite|Editbash tools/hooks/format-on-write.sh
PreToolUseWrite|Editbash .claude/hooks/block-secrets.sh
PostToolUseWrite|Editbash .claude/hooks/format-on-write.sh

Permissions

deny (6)
Bash(git push:*)
Bash(rm -rf:*)
Bash(git push:*)
Bash(rm -rf:*)
Bash(go get:*)
Bash(go install:*)
ask (0)
—
allow (30)
Bash(git status:*)
Bash(git diff:*)
Bash(git log:*)
Bash(git branch:*)
Bash(shellcheck:*)
Bash(markdownlint:*)
Bash(bash tools/lint-claude-md.sh:*)
Bash(bash tools/generate-claude-md.sh:*)
Bash(bash tools/benchmark.sh --help:*)
Read
Glob
Grep
Bash(go build:*)
Bash(go test:*)
Bash(go vet:*)
Bash(go run:*)
Bash(go mod tidy:*)
Bash(gofmt:*)
Bash(golangci-lint:*)
Bash(git status:*)
Bash(git diff:*)
Bash(git log:*)
Bash(git branch:*)
Bash(git add:*)
Bash(git commit:*)
Read
Glob
Grep
Edit
Write

Similar rigs

copied ✓