ClaudeForge
CLAUDE.md429 starsChanged 11 months agoMITView on GitHub
Top-level guidance for Claude Code when working on this repository. ClaudeForge is a Claude Code plugin (manifest at .claude-plugin/plugin.json) and standalone toolkit for the CLAUDE.md lifecycle: initialise, enhance, sync, and modularise files with a hard 150-line cap, automatic chaining via @path imports, and Karpathy behavioural guardrails. Works in any Claude Code or Claude.cowork project. Five components ship in this repo: Current version: 2.1.0 — see CHANGELOG.md. v1 → v2 upgrade: docs/MIGRATION_V2.md. Chained context (Claude Code auto-imports these): @skill/CLAUDE.md @command/CLAUDE.md @agent/CLAUDE.md…
In this repository5 other files it gives its agents.
- agent/CLAUDE.mdCLAUDE.md
- command/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- skill/CLAUDE.mdCLAUDE.md
- claude-md-enhancerSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Simplicity first: Write the minimum code that solves the stated problem.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Top-level guidance for Claude Code when working on this repository.
Project Overview
ClaudeForge is a Claude Code plugin (manifest at .claude-plugin/plugin.json) and standalone toolkit for the CLAUDE.md lifecycle: initialise, enhance, sync, and modularise files with a hard 150-line cap, automatic chaining via @path imports, and Karpathy behavioural guardrails. Works in any Claude Code or Claude.cowork project.
Five components ship in this repo:
- Skill (
claudeforge-skill, inskill/) — Python modules for analysis, generation, validation. Enforces the 150-line cap. - Slash command (
/enhance-claude-md, incommand/) — interactive init/enhance workflow. Delegates deep codebase scans to the Explore subagent. - Slash command (
/sync-claude-md, incommand/) — walks every CLAUDE.md, prunes stale references, enforces the 150-line cap, repairs the root ↔ sub chain. - Guardian agent (
claude-md-guardian, inagent/) — background sync triggered bySessionStart/PreToolUse/PostToolUsehooks. - Karpathy guidelines skill (
karpathy-guidelines, inskill/karpathy-guidelines/) — behavioural guardrails embedded into every generated CLAUDE.md. Adapted with attribution from the MIT-licensed forrestchang/andrej-karpathy-skills repo.
Current version: 2.1.0 — see CHANGELOG.md. v1 → v2 upgrade: docs/MIGRATION_V2.md.
Quick Navigation
- Skill development
- Slash command development
- Guardian agent development
- Installation, testing & release
Chained context (Claude Code auto-imports these):
@skill/CLAUDE.md @command/CLAUDE.md @agent/CLAUDE.md @docs/CLAUDE.md
Behavioral Guidelines
Behavioural guardrails applied to every coding, review, and refactoring task in this repo. Full skill: ~/.claude/skills/karpathy-guidelines/SKILL.md.
- Think before coding. State load-bearing assumptions; if a request has multiple reasonable interpretations, surface them instead of picking silently. Stop and ask when something is genuinely unclear.
- Simplicity first. Write the minimum code that solves the stated problem. No speculative abstractions, no unrequested configuration, no error handling for conditions that cannot occur.
- Surgical changes. Touch only what the task requires. Match surrounding style. Every changed line should trace directly to the user's request.
- Goal-driven execution. Convert vague requests into verifiable success criteria before coding (failing test first), and state a step-by-step plan with per-step verification for multi-step work.
Repository Layout (top level)
ClaudeForge/
├── .claude-plugin/plugin.json # plugin manifest
├── skill/ # core Python modules + karpathy-guidelines/
├── command/ # /enhance-claude-md, /sync-claude-md
├── agent/ # claude-md-guardian
├── docs/ # operational docs (installation, testing, release)
├── examples/ # usage examples
├── hooks/ # quality hooks (pre-commit)
├── .github/ # CI workflows, issue/PR templates
├── install.sh / install.ps1 # installers
├── README.md / CHANGELOG.md / LICENSE
└── CLAUDE.md # this fileNaming Reference
- Project / display name: ClaudeForge
- GitHub: https://github.com/alirezarezvani/ClaudeForge
- Skill name (frontmatter):
claude-md-enhancer(kept for backwards compatibility); installed asclaudeforge-skill/ - Slash commands:
/enhance-claude-md,/sync-claude-md(names fixed by file name) - Agent:
claude-md-guardian - Standalone skill:
karpathy-guidelines
License
MIT — © 2025 Alireza Rezvani. See LICENSE.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

