claude-md-generator
Use when the user asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.
npx skills add Varnan-Tech/opendirectory --skill claude-md-generator --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# CLAUDE.md Generator Read the codebase. Write a CLAUDE.md that tells Claude exactly what it needs: no more, no less. --- **Critical rule:** A good CLAUDE.md is under 100 lines. It contains only information Claude cannot derive from reading the code itself. Do not auto-write the file: always show the draft and wait for user approval first. **Code snippet rule:** Never include inline code examples in CLAUDE.md. Instead use `file.ts:42` references. Code in CLAUDE.md wastes tokens and goes stale. --- ## Step 1: Detect Mode Determine which of three modes to run: **create**: No CLAUDE.md exists. Write one from scratch. **update**: A CLAUDE.md exists. Improve it without discarding custom content. **audit**: Score all CLAUDE.md files in the project A-F and output a quality report. If the user says "audit", "check", "review", or "grade" my CLAUDE.md, run audit mode. ```bash # Discover ALL CLAUDE.md locations find . -name "CLAUDE.md" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null ls ~/.claude/CLAUDE.md 2>/dev/null && echo "Global CLAUDE.md found" ls .claude.local.md 2>/dev/null && echo ".claude.local.md found" ``` If multiple CLAUDE.md files are found: list them. Ask: "Foun
- Step 1: Detect Mode
- Step 2: Audit Mode (skip to Step 3 if create/update)
- Step 3: Scan Project Structure
- Step 4: Extract Build and Test Commands
- Step 5: Find Code Style and Gotchas
- Step 6: Generate CLAUDE.md Draft with Gemini
- Step 7: Self-QA
- Step 8: Present Draft and Wait for Approval
- What NOT to Include
Discover ALL CLAUDE.md locations find . -name "CLAUDE.md" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null ls ~/.claude/CLAUDE.md 2>/dev/null && echo "Global CLAUDE.md found" ls .claude.local.md 2>/dev/null && echo ".claude.local.md found" Project type and package manager ls package.json yarn.lock pnpm-lock.yaml bun.lockb requirements.txt pyproject.toml Cargo.toml go.mod 2>/dev/null Top-level directory structure find . -maxdepth 2 -type d \ npm/yarn/pnpm/bun scripts cat package.json 2>/dev/null \
What does the claude-md-generator skill do?
Use when the user asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.
How do I install it?
Run `npx skills add Varnan-Tech/opendirectory --skill claude-md-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Varnan-Tech/opendirectory, a repository with 571 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
