docs-optimise
Skill4 starsChanged 16 days agoMITView on GitHub
Propose a restructure of this project's agent instruction files (CLAUDE.md, @-imports, .claude/rules/, nested CLAUDE.md) so less loads at session start — one canonical home per fact, progressive disclosure. Proposal only, never edits tracked files. Trigger on "optimise CLAUDE.md", "my CLAUDE.md is too big", "shrink the always-loaded context", "restructure the instruction files".
In this repository14 other files it gives its agents.
- .claude/agents/CLAUDE.mdCLAUDE.md
- CLAUDE/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- acceptance-testSkill
- configureSkill
- docs-qaSkill
- hooks-daemonSkill
- issue-sdlcSkill
- modeSkill
- releaseSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 26
Follow references/procedure.md to classify each always-loaded section and write the proposal.
≈ “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.
Files
Documentation Optimise
This skill is a shim. The classification rules, the report layout and the output paths are in references/procedure.md; the rules it applies are cited, not restated:
- how Claude Code loads instruction files:
contracts/claude-code-instructions/in the daemon checkout (META.jsonnames the audited Claude Code version) - the daemon's documentation ruleset (R6, R7a, R7d):
CLAUDE/DocumentationStrategy.md
What to do
- Measure first: run
.claude/skills/docs-optimise/scripts/footprint.sh(it wrapsdocs-qa --footprint --json). It lists what loads at session start versus on demand, with line and byte totals. - Follow references/procedure.md to classify each always-loaded section and write the proposal.
- Tell the user where the proposal is and how to apply the patch.
/docs-optimise # the whole instruction-file set
/docs-optimise CLAUDE.md # focus on one fileContract
- Proposal only. Everything is written under
untracked/scratch/docs-optimise/<run-id>/. It never edits a tracked file and never adds an allowlist entry. - It never proposes edits to the daemon-injected
<hooksdaemon>block,CLAUDE.local.mdor files under~/.claude/; they are counted, not moved. - It owns placement and footprint only. Its report ends by naming
/docs-qa(re-verify SSoT on the touched files after the patch is applied) and/doctor prompt-audit(outdated, missing-reference or contradictory content); neither is re-implemented here.
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
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.

