Guide for setting up Claude Code infrastructure in new or existing projects
This skill guides the process of setting up Claude Code infrastructure in a project. It handles stack detection, template selection, and file generation. Use this when setting up Claude Code for a new project or adding it to an existing codebase.
| Stack | Detection Files | Primary Use |
|---|---|---|
| TypeScript | tsconfig.json, *.ts, *.tsx |
React/Node fullstack |
| Python | pyproject.toml, requirements.txt |
FastAPI/Django backend |
| Rust | Cargo.toml, *.rs |
Axum/Actix backend |
Look for:
tsconfig.json
package.json (with "typescript" in dependencies/devDependencies)
*.ts or *.tsx files in src/
Indicators of specific frameworks:
next.config.js → Next.jsvite.config.ts → Viteexpress in package.json → Express backendprisma/ directory → Prisma ORMLook for:
pyproject.toml
requirements.txt
setup.py
*.py files
Indicators of specific frameworks:
fastapi in dependencies → FastAPIdjango in dependencies → Djangoflask in dependencies → Flaskalembic/ directory → Alembic migrationsLook for:
Cargo.toml
Cargo.lock
src/main.rs or src/lib.rs
Indicators of specific frameworks:
axum in Cargo.toml → Axumactix-web in Cargo.toml → Actix-webdiesel in Cargo.toml → Diesel ORMsqlx in Cargo.toml → SQLxBased on detected stack, select appropriate skills:
| Skill | Purpose |
|---|---|
git-workflow |
Git conventions, branching |
dev-docs-workflow |
Context management |
code-review-workflow |
Review checklists |
skill-developer |
Creating new skills |
| Skill | Purpose | When to Include |
|---|---|---|
api-validation |
Request validation | Any API project |
auth-guidelines |
Security patterns | Auth features |
error-handling |
Error patterns | All projects |
error-tracking |
Sentry integration | Production apps |
| Skill | Purpose |
|---|---|
backend-dev-guidelines |
Express/Node patterns |
frontend-dev-guidelines |
React/MUI patterns |
database-guidelines |
Prisma patterns |
testing-guidelines |
Jest/Vitest patterns |
state-management |
TanStack/Zustand |
| Skill | Purpose |
|---|---|
python-backend-guidelines |
FastAPI/Django patterns |
python-database-guidelines |
SQLAlchemy patterns |
python-testing-guidelines |
pytest patterns |
| Skill | Purpose |
|---|---|
rust-backend-guidelines |
Axum/Actix patterns |
rust-database-guidelines |
Diesel/SQLx patterns |
rust-testing-guidelines |
cargo test patterns |
rust-error-handling |
Result/Option patterns |
rust-ownership |
Borrow checker patterns |
| Variable | Source | Example |
|---|---|---|
{{PROJECT_NAME}} |
Directory name | "my-app" |
{{FRAMEWORK_VERSION}} |
Constant | "1.0.0" |
{{STACK_NAME}} |
Manifest displayName | "TypeScript/React/Node" |
{{STACK_VERSION}} |
Manifest version | "1.0.0" |
{{TIMESTAMP}} |
Current date | "2025-12-07" |
Every CLAUDE.md should include:
After initialization:
project/
├── CLAUDE.md # Generated from template
├── .claude/
│ ├── settings.json # Hook configurations
│ ├── hooks/ # Automation hooks
│ ├── skills/ # Skill files
│ ├── commands/ # Slash commands
│ ├── agents/ # Specialized agents
│ ├── templates/ # Scaffolding templates
│ └── cache/ # Session cache
└── dev/
└── active/ # Dev docs workspace
After scaffolding, users should customize:
For project-specific patterns not covered by standard skills.
/init-claude-code/init-claude-codeIf project has multiple config files:
If no config files found:
Some skills may not exist yet:
| Topic | Link |
|---|---|
| Stack Detection | [mdc:resources/detection-patterns.md] |
| Skill Matrix | [mdc:resources/skill-matrix.md] |
| Template Guide | [mdc:resources/template-guide.md] |