FORGE
Project onboarding and CLAUDE.md generation. Use when: starting work on a new codebase, setting up a project for the first time, creating or updating a project CLAUDE.md, generating module summaries, or when opening a project with no CLAUDE.md file. Forges a complete project knowledge base so Claude understands the codebase from day one.
FORGE
Onboard any project. Generate a CLAUDE.md. Make Claude understand your codebase.
Usage
/forge - Forge the current project (auto-detect)
/forge <path> - Forge a specific project directory
/forge update - Update an existing project's CLAUDE.md
/forge check - Verify project knowledge completeness
What FORGE Does
FORGE performs a deep scan of a codebase and generates a comprehensive CLAUDE.md file that gives Claude full context about the project. It's the difference between Claude guessing at your architecture and Claude knowing it.
The Forging Process
- Detect project type — language, framework, build tools, package manager
- Scan directory structure — map the project layout, identify key directories
- Read configuration files —
package.json,pyproject.toml,Cargo.toml,tsconfig.json, etc. - Analyze entry points — find main files, API routes, CLI entry points
- Map dependencies — external packages, internal module relationships
- Identify patterns — architecture style (MVC, hexagonal, etc.), testing approach, CI/CD
- Generate CLAUDE.md — structured project context file
What Gets Generated
# Project Name
## Overview
Brief description, purpose, key technologies.
## Architecture
Directory structure, key patterns, data flow.
## Key Files
Entry points, configuration, critical modules.
## Development
How to install, run, test, build, deploy.
## Conventions
Naming, file organization, coding patterns used.
## Important Context
Things Claude should know that aren't obvious from code.
AUTO-EXECUTE Protocol
When this skill is invoked:
- Check for existing CLAUDE.md — if present, read it first
- Scan the project root:
lsthe top-level directory- Read
package.json,pyproject.toml,Cargo.toml, or equivalent - Read
README.mdif present - Check for
.env.exampleor.env.template
- Scan source directories:
- Glob for source files (
**/*.py,**/*.ts,**/*.rs, etc.) - Read key entry points (main files, index files, app files)
- Identify test directories and patterns
- Glob for source files (
- Scan configuration:
- Build tools (webpack, vite, esbuild, cargo)
- Linting (eslint, ruff, clippy)
- CI/CD (GitHub Actions, GitLab CI)
- Docker/containerization
- Detect architecture patterns:
- Look for common patterns (routes/, controllers/, models/, services/)
- Identify state management, API patterns, database layers
- Generate CLAUDE.md — write to project root
- Report findings — summarize what was discovered
When to Use
- Opening a project for the first time
- Joining a new team or codebase
- A project has no CLAUDE.md and Claude keeps making wrong assumptions
- After major refactoring that changed project structure
- When Claude says "I'm not sure about the architecture"
Safety
- FORGE will never overwrite an existing
CLAUDE.mdwithout asking first - If a
CLAUDE.mdexists, FORGE reads it and offers to update (not replace) - FORGE only reads files — it does not execute any code from the project
Prerequisites
- Claude Code with file read/write access
- A project directory with source code to scan
- No external packages required
Quality Checklist
A properly forged CLAUDE.md should:
- Accurately describe the project's purpose
- List all major dependencies and their roles
- Map the directory structure with explanations
- Document how to install, run, test, and build
- Identify naming conventions and coding patterns
- Note any non-obvious architecture decisions
- Be concise enough to fit in context without waste
Tips
- Run
/forge checkperiodically to verify the CLAUDE.md is still accurate - After major changes, run
/forge updateinstead of a full re-forge - FORGE reads your code — it doesn't execute it. Safe to run on any project.
- The generated CLAUDE.md is a starting point. Edit it to add context only you know.
Know the codebase. Then write the code.