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] |