Rewrite your CLAUDE.md with <important if> blocks so Claude actually obeys it
Audit a CLAUDE.md, keep commands and foundational context bare, wrap domain guidance in narrowly-triggered <important if> blocks, delete linter territory and stale snippets
- What
- Audit a CLAUDE.md, keep commands and foundational context bare, wrap domain guidance in narrowly-triggered <important if> blocks, delete linter territory and stale snippets
- Cost
- Free
- Needs
- a CLAUDE.md file to improve (or the intent to write a better one) — the skill is a rewriting methodology, not software to install
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor — @humanlayer's skill for rewriting a CLAUDE.md so Claude Code actually follows it. The core insight: Claude Code injects a system reminder saying CLAUDE.md content "may or may not be relevant" to the task, so the model silently ignores parts it deems irrelevant — including the parts that matter. The fix is wrapping conditionally-relevant sections in `<important if="condition">` XML tags, exploiting the same XML pattern as Claude Code's own system prompt to give an explicit relevance signal. The workflow: keep foundational context bare (project identity, project map, tech stack — relevant to 90%+ of tasks), keep ALL commands in one `<important if>` block (foundational reference), then break every rule and domain section into narrowly-triggered blocks (imports, components, API routes, tests, state management), while deleting linter/formatter territory, anything discoverable from existing code, code snippets (replace with file-path references) and vague instructions. Includes a full before/after example of a bloated Express+React CLAUDE.md distilled into a lean conditional one. Honest caveats: methodology, not tooling — you need an existing CLAUDE.md to improve; the trick exploits an undocumented behavior of the system prompt, so it could weaken with future Claude Code updates. MIT licensed. Skill Harbor never reviews the code, review it yourself before use. Discovered via skills.sh.
Version:
Install
Prerequisites: a CLAUDE.md file to improve (or the intent to write a better one) — the skill is a rewriting methodology, not software to install Install "Rewrite your CLAUDE.md with <important if> blocks so Claude actually obeys it" for me. It teaches my agent @humanlayer's CLAUDE.md rewrite workflow: audit the file for project identity/map/tech stack/commands/rules/domain guidance, keep foundational context bare, wrap domain guidance in narrowly-triggered <important if> blocks, keep all commands, and delete linter territory, stale snippets and vague instructions — with a full before/after worked example. MIT-licensed. Repository: https://github.com/humanlayer/skills/blob/main/plugins/improve-claude-md/skills/improve-claude-md/SKILL.md 1. Fetch the SKILL.md file (and any helper files) from the repository path into a temporary folder and summarize what it does in one or two sentences. 2. Safety check: review the SKILL.md and scripts for anything suspicious (unexpected network calls, shell commands, credential harvesting). This repo should contain zero secrets in code, credentials only via the secure vault, allowed hosts declared in the SKILL.md. Verify that holds here; STOP on any red flag and tell me. 3. Install it as a skill: copy SKILL.md and its helper files into the agent's skills directory, in a folder named "improve-claude-md". 4. Verify with no network calls: frontmatter valid, files in place. 5. Report what was installed, where, and what I still need to do myself (e.g. hand the agent the CLAUDE.md to rewrite; nothing else — it's a methodology). GitHub is optional: if I have a GitHub account or the gh CLI, you may use it; otherwise public access is fine. Never require it unless it's in the prerequisites above. Rules: don't touch anything outside the temp folder and the install target. If anything looks off, stop and ask me.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.