improve-claude-md

improve-claude-md is a skill for Claude Code from dexhorthy/slopfiles. It costs 25 tokens per session (2,158 once invoked), scanned A, a copy of improve-claude-md, MIT.

A workflow for rewriting a CLAUDE.md file, which gives Claude Code project-specific instructions, using conditional XML blocks.

In plain words
What is it for?
Use it when organizing or improving a CLAUDE.md file so project context stays clear and conditional instructions are marked with the required conditions.
Why use it?
It separates always-relevant guidance from task-specific rules, helping the assistant pay attention to instructions that match the current task.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the improve-claude-md plugin — 1 skill shipped together

Good fit Use it when organizing or improving a CLAUDE.md file so project context stays clear and conditional instructions are marked with the required conditions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dexhorthy/slopfiles/improve-claude-md
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dexhorthy/slopfiles --skill improve-claude-md
Clone the repo
git clone --depth 1 https://github.com/dexhorthy/slopfiles

Made for: Claude Code.

Or install improve-claude-md, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for improve-claude-md

README.md
[![agentmods](https://agentmods.dev/badge/skills/dexhorthy/slopfiles/improve-claude-md/github.svg)](https://agentmods.dev/skills/dexhorthy/slopfiles/improve-claude-md)
Your own site
<a href="https://agentmods.dev/skills/dexhorthy/slopfiles/improve-claude-md"><img src="https://agentmods.dev/badge/skills/dexhorthy/slopfiles/improve-claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for improve-claude-md

Your own site · 80×15
<a href="https://agentmods.dev/skills/dexhorthy/slopfiles/improve-claude-md"><img src="https://agentmods.dev/badge/skills/dexhorthy/slopfiles/improve-claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.02158
Opus 5.5 $0.00010 $0.00863
Sonnet 5.5 $0.00005 $0.00432
Haiku 4.5 $0.00003 $0.00216

Measured 2mo ago against content hash dbc3019c52f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

improve-claude-md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to improve-claude-md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/improve-claude-md/skills/improve-claude-md/SKILL.md · 259 lines

How it starts

The opening of the file, as written. The whole thing — 259 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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>

Read the full file on GitHub · 259 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 259 lines · 25 tokens per session scan A dbc3019c52f2

Subscribe to this mod's changes

improve-claude-md is a skill published in the GitHub repository dexhorthy/slopfiles (53 stars, last pushed 7mo ago), licensed MIT. It adds 25 tokens to every session and 2,158 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to improve-claude-md, differing in 0 lines, and is treated as a copy.

Related

improve-claude-md compared with skills from other repositories

improve-claude-md next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
improve-claude-mddexhorthy/slopfilesSkill537mo agoMITA25Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code