Help us improve
Share bugs, ideas, or general feedback.
From claudeforge
Initializes or enhances CLAUDE.md files for the project, chaining to existing AGENTS.md/.cursorrules/.windsurfrules via @-imports. Delegates codebase scans to the Explore subagent and enforces a 150-line cap.
npx claudepluginhub alirezarezvani/claudeforgeHow this command is triggered — by the user, by Claude, or both
Slash command
/claudeforge:enhance-claude-md [--init | --enhance | <path-to-CLAUDE.md>]Files this command reads when invoked
This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# CLAUDE.md Enhancer Command This command uses the `claude-md-enhancer` skill to initialize or enhance CLAUDE.md files for your project. --- ## Phase 1: Discovery - Check Current State ### Check if CLAUDE.md exists !`ls -la CLAUDE.md 2>/dev/null || echo "CLAUDE.md not found"` ### Check for modular CLAUDE.md files !`find . -name "CLAUDE.md" -type f -not -path "./node_modules/*" -not -path "./.git/*" | head -10` ### Get repository status !`git status --short 2>/dev/null || echo "Not a git repository"` ### Check project structure !`ls -la` ### Check for sibling agent / rule files ...
/setup-claude-mdGenerates or updates CLAUDE.md with analyzed project structure, organization rules, and code quality commands. Preserves custom sections if file exists.
/initAnalyzes codebase at given path and generates CLAUDE.md with project conventions, architecture, build commands, and patterns.
/gen-claudeGenerate or enhance CLAUDE.md with project-specific guidance by analyzing codebase structure, languages, frameworks, linters, and build tools.
/create-mdAnalyzes project structure and generates CLAUDE.md files in root and key subdirectories with overview, setup/run commands, code styles, workflows, and conventions.
/aiwg-regenerate-claudeRegenerates CLAUDE.md for Claude Code integration via intelligent merge: analyzes project state and tech stack, preserves team content, updates AIWG and Claude-specific sections only. Supports --no-backup, --dry-run, --full flags.
/initCreates CLAUDE.md and AGENTS.md templates in the project root by scanning the codebase to populate project details like name, stack, and architecture, leaving TODOs where data is undetermined, and confirms creation with TODO list.
Share bugs, ideas, or general feedback.
This command uses the claude-md-enhancer skill to initialize or enhance CLAUDE.md files for your project.
!ls -la CLAUDE.md 2>/dev/null || echo "CLAUDE.md not found"
!find . -name "CLAUDE.md" -type f -not -path "./node_modules/*" -not -path "./.git/*" | head -10
!git status --short 2>/dev/null || echo "Not a git repository"
!ls -la
If AGENTS.md, .cursorrules, or .windsurfrules exists, ClaudeForge will preserve it and chain it from the root CLAUDE.md via @AGENTS.md (or the equivalent) instead of overwriting. Detect them now:
!for f in AGENTS.md .cursorrules .windsurfrules; do [ -f "$f" ] && echo "found: $f ($(wc -l < "$f") lines)" || echo "absent: $f"; done
For non-trivial repositories, delegate the codebase walk to the Explore subagent so the discovery does not bloat this command's context window. Ask it a single, scoped question — for example:
Walk this repository and report: project type (web_app / api / fullstack / cli / library / mobile / desktop), languages and frameworks detected, primary tech stack files (package.json, requirements.txt, pyproject.toml, go.mod, Cargo.toml), team-size indicators (number of contributors, CODEOWNERS), workflow indicators (.github/workflows, Dockerfile, CI configs), and any subdirectories that warrant their own CLAUDE.md (backend/, frontend/, database/, docs/, .github/). Return findings as a compact JSON object. Under 250 words.
Use the general-purpose subagent only for research that requires synthesising findings across multiple agents (e.g. comparing detected stack against template registry). Keep agent prompts self-contained and ask for short, structured reports.
Based on the discovery above, I need to determine the appropriate action:
If CLAUDE.md does NOT exist → Interactive Initialization Workflow If CLAUDE.md exists → Analysis and Enhancement Workflow
The claude-md-enhancer skill will:
The claude-md-enhancer skill will:
I can invoke the claude-md-enhancer skill directly to handle the appropriate workflow based on what I discovered above.
The skill provides:
Every generated or enhanced CLAUDE.md MUST include a ## Behavioral Guidelines section summarising the four Karpathy principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution) with a link to the installed karpathy-guidelines skill.
The claude-md-enhancer skill inserts this section automatically — both in template_selector.customize_template() for new files and in generator.merge_with_existing() for enhanced files. Do not strip it during enhancement; if it is missing from an existing CLAUDE.md, treat that as a required addition.
The full skill is installed at ~/.claude/skills/karpathy-guidelines/SKILL.md (or ./.claude/skills/karpathy-guidelines/SKILL.md for project-level installs).
For ongoing maintenance and automatic updates throughout your project lifecycle, I can invoke the claude-md-guardian agent instead:
When to use the agent:
Agent benefits:
I'm ready to proceed. What would you like me to do?
For new projects: I'll run the interactive initialization workflow (skill) For existing projects: I'll analyze your current CLAUDE.md and suggest improvements (skill) For maintenance: I'll invoke claude-md-guardian agent to check for updates and synchronize
Please confirm how you'd like to proceed, or let me know if you have specific requirements (e.g., "Create a CLAUDE.md for my Python FastAPI project" or "Invoke claude-md-guardian to update my CLAUDE.md").