ClaudeForge — Auto-Generate CLAUDE.md for Any Project
Generate and maintain CLAUDE.md files automatically. Scans your codebase, scores existing docs, and creates context-specific instruction files for Claude Code. MIT, 340+ stars.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install a3d1ca2b-33ca-11f1-9bc6-00163e2b0d79 --target codexDry-run first, confirm the writes, then run this command.
What it is
ClaudeForge is a CLI tool that automatically generates and maintains CLAUDE.md files for any project. It scans your codebase, analyzes the project structure, scores existing documentation, and produces context-specific instruction files that help Claude Code understand your project. The result is a CLAUDE.md that gives Claude accurate context about your tech stack, conventions, and constraints.
ClaudeForge is for developers who use Claude Code and want to maximize its effectiveness by providing structured project context without writing CLAUDE.md files manually.
The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.
How it saves time or tokens
Writing a good CLAUDE.md by hand requires understanding what Claude Code needs to know and keeping it updated as the project evolves. ClaudeForge automates both: it detects your language, framework, build system, test setup, and directory structure, then generates instructions that reduce Claude Code's guessing and token-wasting exploration.
How to use
- Install ClaudeForge via the install script or download the binary.
- Run
claudeforgein your project root to generate a CLAUDE.md. - Review the generated file and customize it if needed.
Example
# Install ClaudeForge
curl -fsSL https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.sh | bash
# Generate CLAUDE.md for your project
cd /path/to/your/project
claudeforge
# Score an existing CLAUDE.md
claudeforge score
# Regenerate with a specific focus
claudeforge --focus backend
Related on TokRepo
- AI Tools for Coding -- Developer tools for AI-assisted coding
- AI Tools for Documentation -- Documentation generation tools
Common pitfalls
- ClaudeForge generates a starting point, not a finished product. Review the output and add project-specific rules (e.g., forbidden patterns, deployment procedures) that static analysis cannot detect.
- Running ClaudeForge on a monorepo produces a generic top-level CLAUDE.md. For monorepos, run it in each package directory to generate targeted context files.
- The generated CLAUDE.md may include stale information if your project structure changed since the last run. Re-run ClaudeForge periodically or after major refactors.
Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.
Frequently Asked Questions
ClaudeForge analyzes the project language, framework, package manager, build system, test framework, directory structure, and existing documentation. It uses this information to generate a CLAUDE.md with relevant instructions and constraints.
ClaudeForge supports projects in Python, JavaScript/TypeScript, Go, Rust, Java, and other common languages. It detects the language from file extensions, package files, and build configuration.
A CLAUDE.md file provides instructions and context for Claude Code. It tells Claude about your project structure, coding conventions, deployment procedures, and constraints. Claude Code reads this file automatically when working in your project.
Yes. The claudeforge score command evaluates your existing CLAUDE.md against best practices for completeness, accuracy, and specificity. It suggests improvements to make Claude Code more effective.
Yes. ClaudeForge is open source under the MIT license. The source code and documentation are available on GitHub.
Citations (3)
- ClaudeForge GitHub— ClaudeForge generates CLAUDE.md files automatically
- Anthropic Claude Code Documentation— CLAUDE.md provides project context for Claude Code
- ClaudeForge README— Codebase scanning and documentation scoring
Related on TokRepo
Source & Thanks
Created by Alireza Rezvani. Licensed under MIT.
ClaudeForge — ⭐ 340+
Thanks to Alireza for building a tool that makes Claude Code adoption significantly easier.
Discussion
Related Assets
Cursor Rules MDC Generator — Auto-Generate from Docs
Auto-generate Cursor .mdc rule files for any library using Exa semantic search and LLM-powered documentation extraction.
RuleForge — Generate AI Assistant Rules from Repo
RuleForge is a CLI that scans a repo and generates rule files (CLAUDE.md, .cursorrules, Copilot instructions) so agents follow consistent boundaries.
RSS-Bridge — Generate RSS Feeds for Any Website
A self-hosted PHP application that generates RSS and Atom feeds for websites that do not provide them, with support for hundreds of sites.
AI Commit — Auto-Generate Git Commits with AI
CLI tool that generates conventional commit messages from your staged changes using AI. Supports Claude, GPT-4, and local models. One command for perfect commit messages. 3,000+ stars.