Skip to content
Development
Skill

/claude-md

Keep CLAUDE.md current and lean — capture this session's durable learnings into it (default), or `audit` it for stale commands, drift, and bloat. Enforces the line budget either way.

From plugin
dotclaude
87114 skills7 agents8 hooks

Claude Code

$ npx -y skills add poshan0126/dotclaude --skill claude-md --agent claude-code

SKILL.md

claude-md.SKILL.md
name: claude-md
description: Keep CLAUDE.md current and lean — capture this session's durable learnings into it (default), or `audit` it for stale commands, drift, and bloat. Enforces the line budget either way.
argument-hint: "[audit?]"
disable-model-invocation: true

`CLAUDE.md` loads every turn for every developer; this skill is how it earns that. Two modes: default captures learnings from the current session; `audit` checks the whole file against reality.

Capture (default)

Scan THIS conversation for durable, project-level learnings. A learning qualifies only if ALL of these hold:

  • **It would prevent a repeat mistake.** The user corrected you, a command failed in a non-obvious way, or a constraint surprised you.
  • **It's not derivable from the code.** Claude can re-discover file structure and signatures; it can't re-discover "the staging DB is the one named `prod_replica`".
  • **It's durable.** True next month, not just this task. Session-specific state belongs in `/catchup handoff`, not here.
  • **It's not already covered** by CLAUDE.md, a rule in `.claude/rules/`, or enforced by a hook.

For each qualifying learning (usually 0-3 per session — finding none is a fine outcome):

1. Draft it as ONE line, with the why if it isn't obvious: `Use \`make test-fast\` for iteration — \`make test\` spins up Docker (3 min).` 2. Pick its destination: command fixes → Commands section; constraints with a path scope → suggest a path-scoped rule instead; everything else → the matching CLAUDE.md section. 3. If it contradicts an existing line, propose editing that line, not appending a second truth.

Present all candidates with AskUserQuestion (multiSelect — let the user pick which to keep), then apply only the selected ones.

Audit (when `$ARGUMENTS` contains `audit`)

Check every line of CLAUDE.md against reality:

1. **Commands**: does each documented command still exist (`package.json` scripts, Makefile targets, etc.) and match its description? Run `--help`/`--dry-run` variants where cheap. 2. **Paths and names**: do referenced directories, files, and tools still exist? 3. **Duplication**: lines that repeat `.claude/rules/` content, hook-enforced behavior, or standard conventions Claude already knows — propose deletion. 4. **Leftovers**: any `> REPLACE:` template blocks — propose deletion. 5. **Staleness candidates**: claims contradicted by recent code (cross-check anything that smells off against the source).

Report findings as a table (line → problem → proposed fix/deletion), confirm, apply.

Budget check (both modes, always last)

CLAUDE.md non-blank lines at skill start: !`grep -cvE '^[[:space:]]*$' CLAUDE.md 2>/dev/null || echo 0`

Under 25 non-blank lines = healthy. 25-50 = list the longest sections, propose trims. Over 50 = the additions don't go in until something comes out — propose the trade explicitly ("add line X, delete lines Y-Z"). The number above is the pre-edit baseline; after applying changes, recount with `grep -cvE '^[[:space:]]*$' CLAUDE.md 2>/dev/null || echo 0` to confirm the result still fits.

Rules

  • NEVER write without user confirmation.
  • Adding is guilty until proven innocent: every line must pay for itself every session.
  • One line per learning. If it needs a paragraph, it belongs in a rule or in docs, with at most a pointer here.
  • Don't touch `CLAUDE.local.md` — that's the user's personal space.
Read more
@poshan0126
Ships withdotclaude

A lean .claude/ setup for daily development. Seven specialist agents, twelve workflow skills, six modular rules, and eight safety/productivity hooks. No bloat, no model assignments, no opinions you can't override.

87114 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
871
Star history of poshan0126/dotclaude on GitHub, a chart by star-history.com

Other skills on dotclaude.

catchup

catchup

Rebuild working context fast after /clear or a fresh session — reads the handoff note and the branch's changes, then summarizes…

context-budget

context-budget

Estimate per-turn token cost of `.claude/` and `CLAUDE.md` — always-loaded vs path-scoped vs invoked-only, top contributors,…

debug-fix

debug-fix

Find and fix a bug. Default is careful (reproduce, investigate, test). Add `--fast` for emergency production mode (hotfix branch,…

explain

explain

Explain code. Default is a one-sentence summary plus a mental model. Add `verbose` to also get an ASCII diagram, key details, and…

fix-issue

fix-issue

Take a GitHub issue from number to tested fix — read the issue and comments, reproduce, locate the cause, fix with a regression…

onboard

onboard

Get oriented in an unfamiliar codebase fast. An Explore-subagent-driven tour that goes from a one-paragraph overview down to…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about claude-md.

Which coding agents can use claude-md?
claude-md installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.