~ / rigs / awattar / claude-code-best-practices

awattar/claude-code-best-practices

💻 Best practices and examples for using Claude Code - Anthropic’s terminal-native AI - for writing, editing, and refactoring code with deep project awareness, prompt design, and safe automation.

↗ GitHub ★ 262 MIT updated 5mo ago project Claude Code
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
~5.9k tokens
Moderate · median rig: 2.3k · breakdown
GUARDRAILS
4/5
Blocks destructive commands · Protects secrets · No YOLO mode · Sandbox or ask-first rules · details

Copy this rig

# review before running: this installs third-party code
$ npx degit awattar/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 awattar/claude-code-best-practices/.claude/skills/conventional-commits .claude/skills/conventional-commits
$ curl -fsSL --create-dirs -o .claude/agents/general-backend-developer.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-backend-developer.md
$ curl -fsSL --create-dirs -o .claude/agents/general-code-quality-debugger.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-code-quality-debugger.md
$ curl -fsSL --create-dirs -o .claude/agents/general-devops.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-devops.md
$ curl -fsSL --create-dirs -o .claude/agents/general-frontend-developer.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-frontend-developer.md
$ curl -fsSL --create-dirs -o .claude/agents/general-fullstack-developer.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-fullstack-developer.md
$ curl -fsSL --create-dirs -o .claude/agents/general-pm.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-pm.md
$ curl -fsSL --create-dirs -o .claude/agents/general-qa.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-qa.md
$ curl -fsSL --create-dirs -o .claude/agents/general-solution-architect.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-solution-architect.md
$ curl -fsSL --create-dirs -o .claude/agents/general-technical-project-lead.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-technical-project-lead.md
$ curl -fsSL --create-dirs -o .claude/agents/general-technical-writer.md https://raw.githubusercontent.com/awattar/claude-code-best-practices/main/.claude/agents/general-technical-writer.md

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/**)"
    ],
    "ask": [
      "Bash(git push:*)"
    ]
  }
}

Skills (1)

Subagents (10)

general-backend-developerUse this agent proactively when you need to design, implement, or optimize backend API systems, including RESTful and GraphQL services, database schema design, performance optimization, error handling
general-code-quality-debuggerUse this agent proactively when you need systematic code review, debugging assistance, refactoring guidance, or technical debt reduction. Examples: <example>Context: User has written a complex functio
general-devopsUse this agent proactively when you need expertise in infrastructure automation, CI/CD pipeline design, container orchestration, deployment strategies, monitoring setup, scaling solutions, or reliabil
general-frontend-developerUse this agent proactively when you need expert guidance on frontend development tasks including UI/UX implementation, accessibility compliance, performance optimization, responsive design, modern Jav
general-fullstack-developerUse this agent proactively when you need end-to-end feature development that spans multiple layers of the application stack, including database schema changes, API endpoints, frontend components, and
general-pmUse this agent proactively when you need comprehensive product management oversight for software development issues. Examples include: when creating new issues from user feedback or requirements, when
general-qaUse this agent proactively when you need comprehensive quality assurance support including test planning, test automation, edge case identification, regression testing, or software validation strategi
general-solution-architectUse this agent proactively when you need expert guidance on system architecture, technology stack decisions, scalability planning, or designing distributed systems. Call this agent for architectural r
general-technical-project-leadUse this agent proactively when you need principal-level technical leadership for complex projects, performance optimization, security assessments, or strategic technical decisions. Examples: <example
general-technical-writerUse this agent when proactively you need to create, review, or improve technical documentation including API documentation, user guides, README files, installation instructions, troubleshooting guides

Hooks (1)

eventmatcherruns
Stop*git -C "$CLAUDE_PROJECT_DIR" status --short

Slash commands (6)

/commit/custom-init/help-commands/issue/reviewpr/test

Permissions

deny (3)
Read(./.env)
Read(./.env.*)
Read(./**/secrets/**)
ask (1)
Bash(git push:*)
allow (8)
Bash(git status)
Bash(git diff:*)
Bash(git log:*)
Bash(git add:*)
Bash(gh issue view:*)
Bash(gh pr view:*)
Bash(gh pr diff:*)
Bash(gh pr checks:*)

Similar rigs

copied ✓