Production-ready Claude Code template synthesizing best practices from claude-mem, compound-engineering, ralph, sequential-thinking, and everything-claude-code.
Philosophy: Complexity is opt-in, not default.
Adopted 15+ battle-tested patterns from everything-claude-code:
- 🎯 Rules System - Enforceable quality gates (80% coverage, OWASP Top 10, code standards)
- 🪝 Advanced Hooks - 9 hooks across all 5 lifecycle events (prevent errors before they happen)
⚠️ Context Window Mgmt - Critical warnings about MCP overhead (200k → 70k with 20+ servers)- 🎓 Skills System - Reusable workflows (TDD guide with RED→GREEN→IMPROVE cycle)
- 🧪 Enhanced Testing - E2E specialist agent, mandatory coverage, TDD enforcement
See IMPROVEMENTS.md for complete details.
# Clone template
git clone https://github.com/ifitsmanu/claude-template.git my-project
cd my-project && rm -rf .git && git init
# Or copy to existing project
cp -r claude-template/.claude your-project/
cp claude-template/CLAUDE.md your-project/
cp claude-template/.mcp.json your-project/Then run claude and start working:
/fix "button not responding" # Quick bug fix
/plan "add OAuth authentication" # Plan a feature
/ship # Commit + push + PRTemplate Commands (Use Daily):
/fix- Quick bug fixes/commit- Safe commits with quality gates/ship- Full release (commit + push + PR)/memory- Manual knowledge capture/sprint- PRD-based autonomous iteration
Plugin Commands:
- 23 from compound-engineering (/plan, /think, /review, /work, /lfg, etc.)
- 14 auto-activating skills (frontend-design, dhh-rails-style, etc.)
- 3 from ralph-wiggum (/ralph-loop for continuous work)
See COMMANDS.md for complete reference.
| Core Agents | Model | Responsibility |
|---|---|---|
| builder | haiku | Implement code |
| reviewer | sonnet | Judge quality |
| debugger | haiku | Find bugs |
| tester | haiku | Write tests (80% coverage required) |
| architect | sonnet | Design systems |
| Specialist Agents | Model | Triggers |
|---|---|---|
| security | sonnet | --security, auth, OWASP |
| performance | sonnet | --performance, optimization |
| database | sonnet | migrations, schema |
| frontend | haiku | UI, components |
| backend | haiku | APIs, services |
| ai-engineer | sonnet | LLM, RAG, embeddings |
| designer | sonnet | UX, design system |
| e2e-runner | haiku | Playwright E2E tests (NEW) |
| Server | Purpose |
|---|---|
| sequential-thinking | Deep reasoning for /think, /plan |
| context7 | Real-time library documentation |
| playwright | Browser automation |
| memory | Knowledge graph persistence |
| exa | AI-powered search (freemium) |
| jina | Web content reader (freemium) |
No auto-capture. No pollution.
/memory save patterns "API routes follow /api/v1/[resource]"
/memory save decisions "PostgreSQL for ACID transactions"
/memory save learnings "Pool exhaustion = random 500s at peaks"
/memory search "authentication"Autonomous loops for multi-story features:
/sprint init # Create PRD template
# Edit .claude/prd/current.json
/sprint .claude/prd/current.json # Run autonomous loopFresh context per iteration. File-based state. Quality gates enforced.
/fix "login button not responding on mobile"Zero overhead. Debugger agent. Direct fix.
/think "how should we migrate to microservices?"32k token budget. Sequential thinking. Branch and revise.
/plan "add OAuth2 with Google and GitHub"Architect agent. Creates implementation plan. Requires approval.
/build "user profile with avatar" --allFrontend + backend + database + tester in parallel.
/review src/auth/ --security --performanceReviewer agent + optional specialists. Produces verdict.
/sprint .claude/prd/feature.jsonImplements all stories until complete. Fresh context each iteration.
.claude/
├── rules/ (NEW) # testing.md, security.md, quality.md, agent-delegation.md
├── skills/ (NEW) # tdd-guide.md (RED→GREEN→IMPROVE workflow)
├── agents/
│ ├── core/ # builder, reviewer, debugger, tester, architect
│ └── specialists/ # security, performance, database, frontend, backend, ai-engineer, designer, e2e-runner
├── commands/
│ ├── quick/ # fix, commit, ship
│ ├── deep/ # analyze, plan, debug, refactor
│ └── parallel/ # implement, research
├── memory/ # patterns.md, decisions.md, learnings.md
├── prd/ # Sprint PRD templates
├── hooks/ # 9 hooks across 5 lifecycle events
├── settings.json # Safe defaults (commit this)
└── settings.local.json # Dev permissions (gitignored)
| File | Git | Purpose |
|---|---|---|
.mcp.json |
Commit | Team MCP servers |
settings.json |
Commit | Safe base permissions |
settings.local.json |
Gitignored | Dev permissions, API keys |
cp .claude/settings.local.json.example .claude/settings.local.json
# Edit with your API keys if desiredexport EXA_API_KEY=your-key # Better search
export JINA_API_KEY=your-key # More URL reads
export GITHUB_TOKEN=your-token # GitHub API access
export DATABASE_URL=postgres://... # Database access- ✓ Tests pass (80% coverage required)
- ✓ Lint passes (zero warnings)
- ✓ Type check passes
- ✓ No secrets detected (OWASP checks)
- ✓ No console.log in JS/TS files
All agents report: SUCCESS | BLOCKED | FAILED
SUCCESS- Task completed fullyBLOCKED- Needs human decisionFAILED- Cannot complete, explains why
- 📋 Testing: 80% coverage, TDD workflow, 3 test types required
- 🔒 Security: OWASP Top 10 compliance, secrets scanning
- 📝 Code Quality: Functions <50 lines, nesting <3 levels
- 🤝 Agent Delegation: Clear rules on when to use which agent
See .claude/rules/ for complete standards.
# .claude/commands/quick/deploy.md
# /deploy - Deploy to environment
## When to Use
Deploying to staging or production
## Process
1. Run tests
2. Build
3. Deploy to $ARGUMENTS# .claude/agents/specialists/devops.yml
name: devops
model: sonnet
tools: [Read, Bash, Grep]
prompt: |
You are the DEVOPS agent.../memory save patterns "Services use repository pattern"
/memory save decisions "Chose Redis for session store: need distributed cache"- Zero overhead by default - Quick commands work instantly
- Opt-in complexity - Deep thinking only when needed
- File-based state - Git + markdown, no external DBs
- Explicit failures - Agents report BLOCKED/FAILED, never silent
- Parallel when possible - Independent tasks run simultaneously
Patterns we explicitly rejected:
| Anti-Pattern | Why Rejected |
|---|---|
| Auto-capture memory | Creates noise, pollutes context |
| 27+ agents | Most overlap, 12 is sufficient |
| Always-on planning | Kills velocity for simple tasks |
| External databases | Adds failure points |
| Silent failures | Masks problems |
This template synthesizes:
- claude-mem → 3-layer retrieval pattern
- compound-engineering → Parallel agents, specialized reviewers
- ralph → File-based state, iteration loops, AGENTS.md learning
- sequential-thinking → Deep analysis for hard problems
- everything-claude-code → Rules system, advanced hooks, skills, context management (10+ months production-tested)
- IMPROVEMENTS.md - Latest enhancements (2026-01-21)
- CLAUDE.md - Project instructions and context window warnings
- COMMANDS.md - Complete command reference
- PLUGINS.md - MCP installation guide with overhead warnings
- CONTRIBUTING.md - How to contribute
- Claude Code Docs - Official docs
MIT