agentleFS
CrystalPlatformsCrystalPlatforms/ADM-CLI/.claude/skills/improve-claude-md/SKILL.md

improve-claude-md

Skill1 starsChanged 6 months agoMITView on GitHub

Audit and improve CLAUDE.md files by wrapping conditionally-relevant sections in <important if> tags, removing linter territory, and ensuring project accuracy. Use when user wants to optimize their CLAUDE.md for better agent performance.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. PackmindHub/packmind★ 323same name
    2. zhangliang0115/ai-plugin★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository13 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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
  1. Distinctive:

    If the file exists, read its full contents.

    line 28
  2. Distinctive:

    Read (never modify) project files to build context.

    line 33
  3. Distinctive:

    Wait for user approval before proceeding to the next section

    line 86
  4. Distinctive:

    Only after explicit confirmation, write the file

    line 104
  5. Distinctive:

    Never delete content without explaining why.

    line 109
  6. Distinctive:

    If unsure whether something is linter territory, ask — don't assume.

    line 110

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Improve CLAUDE.md — Structured Optimization

Audit an existing CLAUDE.md (or create one from scratch) by scanning the project, scoring the file across eight dimensions, and rewriting it section-by-section with user approval at each step.

Usage

/improve-claude-md                 -- improve ./CLAUDE.md in current project
/improve-claude-md path/to/file    -- improve a specific file

Core Principle

Wrap conditionally-relevant sections in <important if="condition"> XML tags. This prevents the system reminder from dismissing instructions as "may or may not be relevant" — the condition tells the agent exactly when the guidance applies.

Foundational context (identity, directory map) stays bare. Everything else gets a targeted condition.

Workflow

Step 1 — Intake

  1. Identify the target file. Default: ./CLAUDE.md. Check for AGENTS.md symlinks.
  2. If the file exists, read its full contents. If not, confirm the user wants to create one from scratch.
  3. Confirm scope: "I'll audit and improve this file. Ready to proceed?"

Step 2 — Project Scan

Read (never modify) project files to build context. Adapt the scan to what exists:

CategoryFiles to check
Language/Frameworkpackage.json, Cargo.toml, pyproject.toml, go.mod, Gemfile
CommandsMakefile, justfile, Taskfile.yml, package.json scripts
CI/CD.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile
Linters/Formatters.eslintrc*, .prettierrc*, biome.json, ruff.toml, rustfmt.toml
Testingvitest.config.*, jest.config.*, pytest.ini, phpunit.xml
Configtsconfig.json, docker-compose.yml, .env.example
StructureTop two levels of the directory tree

Present a one-paragraph summary: "This is a TypeScript monorepo using pnpm, Vitest, ESLint + Prettier, deployed via GitHub Actions." Ask the user to confirm or correct before proceeding.

Step 3 — Audit

Score the existing CLAUDE.md across eight dimensions. Present findings one dimension at a time (exhaust each before moving on).

Reasoning approach: Many findings are cross-dimensional — e.g., a vague instruction nested inside a domain section, or a code snippet that duplicates linter rules. Hold all 8 dimensions in mind simultaneously while scoring each one. Reason silently through the full file before writing the scorecard. Recommended for this step: opus-4.7 with extended thinking (high effort).

Dimensions:

  1. Identity — Is there a clear one-sentence project description? Is it bare (unwrapped)?
  2. Directory map — Present or absent? Accurate against the actual project structure?
  3. Commands — Are build/test/lint/deploy commands listed? Wrapped in a single <important if="you need to run commands"> block?
  4. Rules granularity — Are rules individually wrapped with specific conditions, or monolithic?
  5. Domain sections — Are testing, API, state management, deployment sections wrapped with appropriate conditions?
  6. Linter overlap — Identify instructions that duplicate what the project's linters/formatters already enforce. These are deletion candidates.
  7. Code snippets — Are there inline code blocks that should be file path references instead?
  8. Vague instructions — "Follow best practices," "keep code clean," etc. These add noise and should be deleted.

Output a scorecard:

Dimension          | Status     | Action
-------------------|------------|---------------------------
Identity           | Good       | None
Directory map      | Missing    | Generate from project scan
Commands           | Unwrapped  | Wrap in <important if>
Rules granularity  | Monolithic | Split into individual blocks
Domain sections    | Partial    | Add testing, API sections
Linter overlap     | 3 items    | Delete
Code snippets      | 2 found    | Replace with file refs
Vague instructions | 1 found    | Delete

Step 4 — Rewrite

Address each scorecard action, one section at a time:

  1. Show the before (current content or "missing")
  2. Show the after (proposed content)
  3. Explain the rationale (why this change improves agent performance)
  4. Wait for user approval before proceeding to the next section

Transformation rules:

  • Identity → one bare sentence at the top
  • Directory map → bare, accurate against project scan
  • Commands → single <important if="you need to run commands to build, test, lint, or deploy"> block
  • Rules → split into individual <important if> blocks with specific conditions (see important-if-catalog.md)
  • Domain sections → wrap each with a relevant condition
  • Linter overlap → delete entirely
  • Code snippets → replace with file path references
  • Vague instructions → delete entirely

Reference claude-md-template.md for the ideal structure.

Step 5 — Verify & Apply

  1. Present the complete proposed file for final review
  2. Walk through the acceptance checklist
  3. Only after explicit confirmation, write the file

Skill-Specific Rules

  • Present diffs section-by-section, not all at once.
  • Never delete content without explaining why.
  • If unsure whether something is linter territory, ask — don't assume.

Acceptance Checklist

  • Project scanned and summary confirmed by user
  • Audit scorecard presented and discussed
  • Identity section is one bare sentence
  • Directory map is accurate and bare
  • Commands wrapped in single <important if> block
  • Each rule wrapped individually with a specific condition
  • Domain sections wrapped with relevant conditions
  • No linter-enforceable instructions remain
  • No inline code snippets (replaced with file references)
  • No vague instructions remain
  • User approved final output before file was written

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.