A plug-and-play framework for generating projects with Claude Code CLI — optimized for speed, token efficiency, and consistent output across any language or framework.
Version: 2.0.0 | Last Updated: March 2026 | License: MIT
- 2.0.0 — 15 commands, 32 framework files across 12 ecosystems. 70% token reduction via delta-only framework files, merged similar frameworks (Express+Hono, Gin+Echo+Fiber, Actix+Axum+Rocket, React Native+Expo), inheritance model (global → _base → framework), no pinned versions ("latest stable" everywhere). Full developer lifecycle:
/scaffold,/onboard,/plan,/review,/migrate,/debug,/refactor,/test,/deploy,/doc,/api,/component,/secure,/deps,/perf. - 1.0.0 — Initial release. Scaffold, onboard, plan, review commands. Global CLAUDE.md. Full framework knowledge base.
| File / Directory | Location | Purpose |
|---|---|---|
global-CLAUDE.md |
~/.claude/CLAUDE.md |
Universal defaults: clarification-first, model guidance, quality gates |
scaffold.md |
~/.claude/commands/scaffold.md |
Full scaffolding protocol (/scaffold) |
onboard.md |
~/.claude/commands/onboard.md |
Onboard existing projects (/onboard) |
plan.md |
~/.claude/commands/plan.md |
Feature/change planning (/plan) |
review.md |
~/.claude/commands/review.md |
Code review for PRs/branches/files (/review) |
migrate.md |
~/.claude/commands/migrate.md |
Framework/version migration (/migrate) |
debug.md |
~/.claude/commands/debug.md |
Structured debugging protocol (/debug) |
refactor.md |
~/.claude/commands/refactor.md |
Safe refactoring with framework awareness (/refactor) |
test.md |
~/.claude/commands/test.md |
Generate tests for existing code (/test) |
deploy.md |
~/.claude/commands/deploy.md |
Generate deployment configs (/deploy) |
doc.md |
~/.claude/commands/doc.md |
Generate documentation from code (/doc) |
api.md |
~/.claude/commands/api.md |
Generate API endpoints (/api) |
component.md |
~/.claude/commands/component.md |
Generate UI components (/component) |
secure.md |
~/.claude/commands/secure.md |
Security audit (/secure) |
deps.md |
~/.claude/commands/deps.md |
Dependency management (/deps) |
perf.md |
~/.claude/commands/perf.md |
Performance optimization (/perf) |
frameworks/ |
~/.claude/commands/frameworks/ |
32 framework files + 13 base files + detection matrix |
global-CLAUDE.md ← universal rules (loaded every session)
└─ frameworks/{lang}/_base.md ← language defaults (detection, commands, .gitignore, pitfalls)
└─ frameworks/{lang}/{framework}.md ← delta-only (only what differs from _base)
Framework files inherit from their _base.md and only contain framework-specific conventions, commands, and pitfalls. This eliminates redundancy and keeps token costs low.
| Language | Frameworks |
|---|---|
| TypeScript/JS | Next.js, React, Vue, Nuxt, Svelte, SvelteKit, NestJS, Astro, Remix, Express+Hono (merged) |
| Python | Django, FastAPI, Flask, Scrapy |
| Go | Gin+Echo+Fiber (merged), stdlib |
| Rust | Actix+Axum+Rocket (merged), Tauri |
| C#/.NET | ASP.NET Core, Blazor, .NET MAUI |
| Java | Spring Boot, Quarkus |
| Kotlin | Ktor |
| PHP | Laravel, Symfony |
| Ruby | Rails, Sinatra |
| Swift | SwiftUI, Vapor |
| Mobile | React Native+Expo (merged), Flutter |
| C/C++ | CMake, vanilla Make |
Each framework file: senior architect persona, detection signals, commands, conventions, testing, CLAUDE.md Convention Block, and pitfalls. All versions use "latest stable" — detected at runtime from project config files.
bash install.sh# 1. Back up existing global CLAUDE.md
[ -f ~/.claude/CLAUDE.md ] && cp ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak
# 2. Copy global defaults (loaded every session)
cp global-CLAUDE.md ~/.claude/CLAUDE.md
# 3. Create commands directory
mkdir -p ~/.claude/commands
# 4. Copy commands (loaded when invoked)
cp scaffold.md onboard.md plan.md review.md migrate.md debug.md refactor.md test.md deploy.md doc.md api.md component.md secure.md deps.md perf.md ~/.claude/commands/
# 5. Copy framework knowledge base
cp -r frameworks/ ~/.claude/commands/frameworks/bash install.shRe-running the install script updates all commands and frameworks. Your ~/.claude/CLAUDE.md is backed up automatically.
rm -f ~/.claude/commands/{scaffold,onboard,plan,review,migrate,debug,refactor,test,deploy,doc,api,component,secure,deps,perf}.md
rm -rf ~/.claude/commands/frameworks/
# Restore backup if desired: cp ~/.claude/CLAUDE.md.bak ~/.claude/CLAUDE.mdVerify:
claude
# Type any command: /scaffold /onboard /plan /review /migrate /debug /refactor /test /deploy /doc /api /component /secure /deps /perfmkdir my-project && cd my-project && claude/scaffold Python + FastAPI + PostgreSQL REST API for a bookstore inventory system
Claude will: clarify (if needed) → plan → wait for approval → implement phase-by-phase → verify → summarize.
| Command | What it does | Model |
|---|---|---|
/scaffold |
Generate new project from spec | Sonnet |
/onboard |
Analyze existing project, generate CLAUDE.md | Opus |
/plan |
Plan a feature/change before coding | Opus |
/review |
Code review (diff, branch, PR, files) | Opus |
/api |
Generate API endpoints + validation + tests | Sonnet |
/component |
Generate UI components + props + tests | Sonnet |
/test |
Generate tests for existing code | Sonnet |
/debug |
Structured debugging with root cause analysis | Opus |
/refactor |
Safe refactoring with behavior preservation | Sonnet |
/migrate |
Framework or version migration | Opus |
/deploy |
Generate Dockerfile, CI/CD, compose configs | Sonnet |
/doc |
Generate API docs, architecture, README | Sonnet |
/secure |
Security audit (OWASP, auth, secrets, deps) | Opus |
/deps |
Audit, upgrade, clean up dependencies | Sonnet |
/perf |
Profile and optimize performance | Opus |
/scaffold project:
Name: storefront-api
Type: API
Language: Go
Framework: Chi router
Purpose: REST API for e-commerce with product catalog and orders
Data layer: PostgreSQL + sqlc
Auth: JWT with refresh tokens
Core entities: Product, Category, Order, User
Constraints: No ORM, structured logging with slog, Docker compose
/scaffold Next.js + Prisma + PostgreSQL blog with auth and markdown posts
/scaffold Rust CLI using clap that converts CSV to JSON with column filtering
/scaffold Laravel SaaS starter with Stripe billing and team management
/scaffold Django + DRF + PostgreSQL API starter
/scaffold .NET minimal API with EF Core and JWT auth
Claude rates specs 1-3:
- Level 1 (too vague) — "a web app" → asks 3-5 questions before proceeding
- Level 2 (partial) — "FastAPI bookstore API" → asks 1-2 missing fields with sensible defaults
- Level 3 (clear) — "Go + Chi + PostgreSQL + JWT task API" → proceeds to plan, states assumptions
2 questions upfront ≈ 100 tokens. Guessing wrong ≈ 2,000+ tokens of rework.
Task: scaffold a full-stack app (API + DB + auth + tests + deploy config)
| Default Claude Code | With Claude Architect | |
|---|---|---|
| Tokens used | ~50-80k | ~15-25k |
| Rework cycles | 2-4 (wrong patterns, missing config) | 0-1 (framework-aware from start) |
| Conventions | You explain every time | Auto-loaded from framework files |
| Error handling | Generic or missing | Framework-idiomatic (from _base.md) |
| Project structure | Random or ChatGPT-style | Matches framework best practices |
| CLAUDE.md | You write manually | Generated with conventions + commands |
| Quality gates | Hope for the best | Build + lint + test enforced per phase |
Why fewer tokens: Protocols eliminate back-and-forth. Framework files eliminate "use X pattern" instructions. Clarification-first prevents rework. Phased execution prevents context bloat.
| Sonnet | Opus | |
|---|---|---|
| Speed | ~3x faster output | Slower, more deliberate |
| Cost | Lower per token | Higher per token |
| Best for | Pattern-based execution, templates, formulaic tasks | Reasoning, analysis, architecture, debugging |
| Commands | /scaffold /refactor /test /deploy /doc /api /component /deps |
/plan /review /onboard /debug /migrate /secure /perf |
Recommended workflow: Start session with Opus for planning/analysis, switch to Sonnet for execution.
/model opus → /plan, /review, /onboard, /debug
/model sonnet → /scaffold, /test, /deploy, /api, /component
| Task | Tokens (with Claude Architect) | Without Claude Architect |
|---|---|---|
| Scaffold full-stack app | ~15-25k | ~50-80k |
| Onboard existing project | ~8-12k | ~20-30k (manual CLAUDE.md) |
| Plan a feature | ~3-5k | ~5-10k |
| Code review | ~3-6k | ~5-10k |
| Generate API endpoints | ~5-10k | ~15-25k |
| Generate tests | ~5-10k | ~10-20k |
| Debug a bug | ~5-10k | ~10-30k |
| Security audit | ~5-8k | ~15-25k |
| Deploy config | ~3-6k | ~8-15k |
Savings come from: no convention re-explaining (~2-5k saved per task), no rework from wrong patterns (~5-15k saved), structured protocols prevent rambling (~3-8k saved).
Do: Use constraints, reference existing files by path, /clear every 3-4 interactions, re-anchor with Read CLAUDE.md and Plan.md
Don't: Vague prompts, @-import large files, let context grow past 5 phases
Edit ~/.claude/CLAUDE.md (keep under 50 lines).
Create custom commands in ~/.claude/commands/:
cat > ~/.claude/commands/seed.md << 'EOF'
Generate seed data for: $ARGUMENTS
Rules: Use Faker, match existing model schemas, 50 records per entity, idempotent
EOFAdd to .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(git add:*)", "Bash(git status:*)", "Bash(git commit:*)",
"Bash(npm run *)", "Bash(npx *)", "Edit(**)"
]
}
}cd your-project && claude
/onboard
Claude will: detect stack → analyze structure + patterns → report → generate CLAUDE.md + docs/ → offer hooks/permissions. Never modifies source code.
Common command chains for typical development tasks:
/scaffold → /test → /deploy → /doc
/onboard → /secure → /deps → /review
/debug → fix → /test → /review
/plan → /api or /component → /test → /review
/deps → /secure → /perf → /deploy
/migrate → /test → /secure → /deploy
| Problem | Fix |
|---|---|
| Command not found | Verify ls ~/.claude/commands/scaffold.md, restart Claude |
| Skipped plan step | Add: "Plan first. Do NOT code until I approve." |
| Drift after many phases | /clear then: "Read CLAUDE.md and Plan.md. Continue Phase N." |
| Outdated patterns | Be specific about framework version in your spec |
| Build fails | Run: "Build + lint + test. Fix all errors." |
| Fix loop | "Stop. Diagnose root cause. Offer rollback." |
~/.claude/
├── CLAUDE.md ← global defaults
└── commands/
├── scaffold.md onboard.md plan.md review.md migrate.md debug.md refactor.md test.md deploy.md doc.md api.md component.md secure.md deps.md perf.md
└── frameworks/
├── _index.md ← detection matrix
├── typescript/ ← _base + nextjs, react, vue, nuxt, svelte, sveltekit, nestjs, astro, remix, api
├── python/ ← _base + django, fastapi, flask, scrapy
├── go/ ← _base + web (gin/echo/fiber)
├── rust/ ← _base + web (actix/axum/rocket), tauri
├── dotnet/ ← _base + aspnet-core, blazor, maui
├── java/ ← _base + spring-boot, quarkus
├── kotlin/ ← _base + ktor
├── php/ ← _base + laravel, symfony
├── ruby/ ← _base + rails, sinatra
├── swift/ ← _base + swiftui, vapor
├── mobile/ ← _base + react-native-expo, flutter
└── cpp/ ← _base + cmake
MIT — use it, fork it, share it.