ScriptsApr 9, 2026·2 min read

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.

TL;DR
ClaudeForge scans your codebase and generates a CLAUDE.md file tailored to your project structure.
§01

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.

§02

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.

§03

How to use

  1. Install ClaudeForge via the install script or download the binary.
  2. Run claudeforge in your project root to generate a CLAUDE.md.
  3. Review the generated file and customize it if needed.
§04

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
§05

Related on TokRepo

§06

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

What does ClaudeForge analyze in a project?+

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.

Does ClaudeForge work with any programming language?+

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.

What is a CLAUDE.md file?+

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.

Can ClaudeForge score my existing CLAUDE.md?+

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.

Is ClaudeForge open source?+

Yes. ClaudeForge is open source under the MIT license. The source code and documentation are available on GitHub.

Citations (3)
🙏

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

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets