ClaudeForge: Stop Copy-Pasting Your CLAUDE.md (There’s a Better Way)
By Devy · yoDEV.dev
If you’re already using Claude Code in your projects, you probably know the ritual: you open a new project, copy the CLAUDE.md from the previous one, spend half an hour editing it to adapt it to the new stack, and still end up repeating the same instructions to Claude session after session.
There’s an open source tool that solves exactly this. It’s called ClaudeForge.
What is CLAUDE.md and Why Does It Matter?
Before talking about ClaudeForge, a quick context: the CLAUDE.md file is the persistent instruction file that Claude Code reads at the start of each session. It tells Claude how to work on your specific project: what stack you use, your code conventions, what tools you have available, how to run tests, etc.
A good CLAUDE.md makes Claude Code significantly more useful. An outdated or poorly structured CLAUDE.md, on the other hand, confuses the model or is simply ignored.
The most common problem: files grow out of control (some developers end up with 600+ lines), become difficult to maintain, and don’t reflect the actual changes in the project over time.
What is ClaudeForge
ClaudeForge is an open source toolkit, MIT licensed, created by Alireza Rezvani (CTO of a HealthTech startup in Berlin). Its purpose is to automate the creation, analysis, and maintenance of CLAUDE.md files.
It’s not just a simple template generator. It’s three integrated components:
1. Skill: claudeforge-skill
The intelligent core. It analyzes your repository, scores your current CLAUDE.md from 0 to 100, identifies missing sections, and generates optimized files tailored to your actual tech stack.
2. Slash Command: /enhance-claude-md
The interactive interface. You simply run this command inside Claude Code and the system does the rest: explores your project, detects the context, and shows you what it found before making any changes.
3. Guardian Agent: claude-md-guardian
The most interesting component. It’s a background agent that detects changes in your codebase (new dependencies, new directories, new environment variables) and automatically updates your CLAUDE.md. It uses the Haiku model for efficiency, so it doesn’t consume unnecessary context.
How It Works in Practice
When you run /enhance-claude-md on a new project, ClaudeForge explores your repository and presents you with a summary before touching anything:
"Based on my exploration, here's what I discovered:
📦 Project Type: Full-Stack Application
🛠️ Tech Stack: TypeScript, React, Node.js, PostgreSQL, Docker
👥 Team Size: Small (5 developers)
🚀 Development Phase: MVP
📋 Recommended Structure:
- Root CLAUDE.md (navigation hub, ~100 lines)
- backend/CLAUDE.md (API guidelines, ~150 lines)
- frontend/CLAUDE.md (React guidelines, ~175 lines)
Would you like me to create these files?"
If you already have a CLAUDE.md, the analysis looks like this:
"Quality Score: 65/100
Missing Sections:
- Project Structure (ASCII diagram)
- Setup & Installation
- Architecture
Would you like me to enhance your CLAUDE.md with these sections?"
The quality score evaluates five dimensions: appropriate length, section completeness, format quality, content specificity, and modular organization.
Modular Architecture: The Most Useful Concept
One of ClaudeForge’s most valuable ideas is the hierarchical file structure:
- Root
CLAUDE.md(50–100 lines): Acts as a navigation index with universal project principles backend/CLAUDE.md(~150 lines): API-specific guidelinesfrontend/CLAUDE.md(~175 lines): Component patterns, state, performancedatabase/CLAUDE.md: Migration conventions, queries, indexes
Why does this matter? When Claude Code works in the frontend/ directory, it loads frontend guidelines. When it’s in backend/, it loads backend guidelines. The model doesn’t process irrelevant instructions, which improves response accuracy.
Installation: Less Than 5 Minutes
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.sh | bash
Windows (PowerShell):
iwr https://raw.githubusercontent.com/alirezarezvani/ClaudeForge/main/install.ps1 -useb | iex
After installing, restart Claude Code and run:
/enhance-claude-md
Done. The command guides you from there.
Requirements: Claude Code 2.0 or higher, Git recommended, compatible with macOS, Linux, and Windows.
Is It Worth Trying?
ClaudeForge is at stable v1.0.0, MIT licensed, and already appears in curated lists of tools for Claude Code in the community. To be honest, it’s a relatively new project (17 commits at the time of this article), so some promises like context usage reduction don’t have published benchmarks yet.
That said, the problem it solves is real. If you use Claude Code regularly, maintaining a useful and up-to-date CLAUDE.md is real work. Having an agent that automatically syncs it with your project changes is genuinely useful.
For projects in active development, the Guardian Agent alone justifies the installation.
Repository
github.com/alirezarezvani/ClaudeForge
MIT License · Contributions welcome
Do you already use Claude Code in your projects? How do you structure your CLAUDE.md today? Share in the comments.