Improve Claude MdSAFE
Overview
An agent skill published by humanlayer.
4b3fa078ccc8OBSERVED · 2026-10-20Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: improve-claude-md description: improve a CLAUDE.md file using <important if> blocks to improve instruction adherence --- When the user provides a CLAUDE.md file (or asks you to improve one), rewrite it following the principles and structure below. ## Core Problem Claude Code injects a system reminder with every CLAUDE.md that says: > "this context may or may not be relevant to your tasks. You should not respond to this context unless it is highly relevant to your task." This means Claude will ignore parts of your CLAUDE.md it deems irrelevant. The more content that isn't applicable to the current task, the more likely Claude is to ignore everything — including the parts that matter. ## Solution: `<important if="condition">` Blocks Wrap conditionally-relevant sections of the CLAUDE.md in `<important if="condition">` XML tags. This exploits the same XML tag pattern used in Claude Code's own system prompt, giving the model an explicit relevance signal that cuts through the "may or may not be relevant" framing. ## Principles ### 1. Foundational context stays bare, domain guidance gets wrapped Not everything should be in an `<important if>` block. Context that is relevant to virtually every task — project identity, project map, tech stack — should be left as plain markdown at the top of the file. This is onboarding context the agent always needs. Domain-specific guidance that only matters for certain tasks — testing patterns, API conventions, state management, i18n — gets wrapped in `<important if>` blocks with targeted conditions. The rule of thumb: if it's relevant to 90%+ of tasks, leave it bare. If it's relevant to a specific kind of work, wrap it. ### 2. Conditions must be specific and targeted Bad — overly broad conditions that match everything: ``` <important if="you are writing or modifying any code"> - Use absolute imports - Use functional components - Use camelCase filenames </important> ``` Good — each rule has its own narrow trigger: ``` <important if="you are adding or modifying imports"> - Use `@/` absolute imports (see tsconfig.json for path aliases) - Avoid default exports except in route files </important> <important if="you are creating new components"> - Use functional components with explicit prop interfaces </important> <important if="you are creating new files or directories"> - Use camelCase for file and directory names </important> ``` ### 3. Keep it short, use progressive disclosure sparingly Do not shard into separate files that require the agent to make tool calls to discover, unless the extra context is incredibly verbose or complex. The whole point of `<important if>` blocks is that everything is inline but conditionally weighted — the agent sees it all but only attends to what matches. Prefer to keep the file concise. ### 4. Less is more - Frontier models can reliably follow a few hundred. Claude Code's system prompt and tools already use ~50 of those. Your CLAUDE.md should be as lean as possible. - Cut any instruction that a linter, formatter, or pre-commit hook can enforce - Cut any instruction the agent can discover from existing code patterns. LLMs are in-context learners — if your codebase consistently uses a pattern, the agent will follow it after a few searches. - Cut code snippets. They go stale and bloat the file. Use file path references instead (e.g., "see `src/utils/example.ts` for the pattern"). ### 5. Keep all commands Do not drop commands from the original file. The commands table is foundational reference — the agent needs to know what's available even if some commands are used less frequently. ## Output Structure When rewriting a CLAUDE.md, produce this structure: ``` # CLAUDE.md [one-line project identity — what it is, what it's built with] ## Project map [directory listing with brief descriptions] <important if="you need to run commands to build, test, lint, or generate code"> [commands table — all commands from the original] </important> <important if="<specific trigger for rule 1>"> [rule 1] </important> <important if="<specific trigger for rule 2>"> [rule 2] </important> ... more rules, each with their own block ... <important if="<specific trigger for domain area 1>"> [guidance] </important> ... more domain sections ... ``` ## How to Apply When given an existing CLAUDE.md to improve: 1. **Identify the project identity** — extract a single sentence describing what this is. Leave it bare at the top. 2. **Extract the directory map** — keep it bare (no `<important if>` wrapper). This is foundational context. 3. **Extract the tech stack** — if present, keep it bare near the top. Condense to one or two lines. 4. **Extract commands** — keep ALL commands from the original. Wrap in a single `<important if>` block. 5. **Break apart rules** — split any list of rules into individual `<important if>` blocks with specific conditions. You can group rules, but never group unrelated rules under one broad condition. 6. **Wrap domain sections** — testing, API patterns, state management, i18n, etc. each get their own block with a condition describing when that knowledge matters. 7. **Delete linter territory** — remove style guidelines, formatting rules, and anything enforceable by tooling. Suggest replacing with pre-push or pre-commit hooks. 8. **Delete code snippets** — replace with file path references. 9. **Delete vague instructions** — remove anything like "leverage the X agent" or "follow best practices" that isn't concrete and actionable. ## Example Input: ```markdown # CLAUDE.md This is an Express API with a React frontend in a Turborepo monorepo. ## Commands | Command | Description | |---|---| | `turbo build` | Build all packages | | `turbo test` | Run all tests | | `turbo lint` | Lint all packages | | `turbo dev` | Start dev server | | `turbo storybook` | Start Storybook | | `turbo db:generate` | Generate Prisma client | | `turbo db:migrate` | Run database migrations | | `turbo analyze` | Bundle
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
4b3fa078ccc8full audit observations/trust-audit/skill/humanlayer__improve-claude-md.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-20 | 4b3fa078ccc8 | SAFE | B | 89 | first audit |
Questions
Is improve-claude-md — humanlayer/skills safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can improve-claude-md — humanlayer/skills access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does improve-claude-md — humanlayer/skills work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4b3fa078ccc8), read on 2026-10-20. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/humanlayer/improve-claude-md/)
Not your listing, or something out of date? Claim or update your listing.