claude-md-efficiency
Skill1 starsChanged 7 months agoMITView on GitHub
Use when MemPalace is installed and you are authoring or auditing a project's CLAUDE.md (or AGENTS.md). When MemPalace is present, CLAUDE.md becomes a thin POINTER document — it tells the agent WHERE to find things so context is loaded on demand, rather than CONTAINING the full context — and it stays very small. Carries two parts — standards that point to a reference DB / reference MemPalace, and customizations the user can toggle on/off. The deterministic assessor + generator live in scripts/claude_md/claude_md_efficiency.py; this skill is the contract. CONDITIONAL on MemPalace being installed — with no MemPalace, a self-contained CLAUDE.md is correct and this discipline does not apply.
In this repository60 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- api-design-from-frontendSkill
- architect-team-pipelineSkill
- bug-fix-pipelineSkill
- cartographer-teamSkill
- claude-design-importSkill
- closeoutSkill
- common-pipeline-conventionsSkill
- contract-first-parallelismSkill
- coverage-mappingSkill
- data-annotationsSkill
- data-dictionarySkill
- data-engineering-explorationSkill
- data-eng-pipelineSkill
- data-lineage-mappingSkill
- delivery-manifestSkill
- design-fidelity-mappingSkill
- dev-api-integration-testingSkill
- diagnostic-research-teamSkill
- documentation-currencySkill
- domain-research-teamSkill
- dynamic-value-discoverySkill
- editability-completenessSkill
- email-testingSkill
- endpoint-trace-mappingSkill
- expensive-verification-debuggingSkill
- frontend-route-mappingSkill
- helpdeskSkill
- intake-and-mappingSkill
- interaction-completenessSkill
- interaction-intuitionSkill
- interactive-mockup-discoverySkill
- intuition-map-lifecycleSkill
- mcp-output-contract-designSkill
- mempalace-integrationSkill
- mini-architect-team-pipelineSkill
- phenotype-absorptionSkill
- phenotypesSkill
- playwright-suite-builderSkill
- playwright-user-flowsSkill
- proposal-refinerSkill
- readme-stylingSkill
- reuse-first-designSkill
- root-cause-test-failuresSkill
- structure-optimizationSkill
- team-spawning-and-review-gatesSkill
- test-prod-safety-classifierSkill
- test-run-monitorSkill
- token-compressionSkill
- ux-test-builderSkill
- verification-planningSkill
- verified-agent-outputSkill
- visual-fidelity-reconciliationSkill
- visual-to-api-designSkill
- visual-verification-teamSkill
- warehouse-sql-miningSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Read is_pointer_style + the signals (over-budget, no-pointers, missing-standards-pointer, missing-customizations).
- Very specific: line 59
If the file is a container (over budget / no pointers), MOVE the inlined context INTO MemPalace (mine it per mempalace-integration) and …
- Distinctive: line 61
Use the generator for a correctly-shaped starting point:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Claude.md Efficiency (CMD-1 … CMD-4)
A large CLAUDE.md that an agent must internalize in full burns context on every
turn. When the project has a memory store to point INTO, CLAUDE.md should stop
being a container and become a pointer: it tells the agent where to find
things and the agent loads that context on demand.
The deterministic pieces — the size budget, the pointer-shape assessor, and the
minimal-pointer generator — live in scripts/claude_md/claude_md_efficiency.py
(stdlib-only, unit-tested). This skill is the contract + the LLM-judgment
workflow. Do not re-implement the deterministic pieces in prose — call the module.
The precondition (CMD-1) — MemPalace must be installed
This discipline applies when (and only when) MemPalace is installed. With a
reachable MemPalace there is somewhere to point INTO, so CLAUDE.md becomes a
pointer. With NO MemPalace there is nowhere to point — a self-contained
CLAUDE.md is correct and this discipline does NOT apply. Detect MemPalace per
mempalace-integration (its availability check); if absent, leave CLAUDE.md
as-is and stop.
What a pointer-style CLAUDE.md is (CMD-2, CMD-3, CMD-4)
- A pointer, not a container (CMD-2). On reading it, the agent must NOT
internalize its entire contents. Instead it tells the agent where to find
things — e.g. "first read your wake-up script, located at XYZ" — so context is
loaded on demand. The canonical first pointer is the MemPalace wake-up
(
mempalace --palace <palace> wake-up). - Very small (CMD-3). It points; it does not contain. The engine enforces a
byte budget (
CLAUDE_MD_POINTER_BUDGET_BYTES); over budget is the strongest signal that context that belongs in MemPalace has been inlined. - Two parts (CMD-4). (a) Standards that point to a reference DB / reference MemPalace (query on demand, never inline); (b) Customizations the user can toggle on/off at their discretion (and the agent's best guess for defaults).
Workflow
Step 1 — Confirm MemPalace is installed (CMD-1)
Per mempalace-integration. If absent → this discipline does not apply; stop.
Step 2 — Assess the current CLAUDE.md
$(command -v python3 || command -v python) scripts/claude_md/claude_md_efficiency.py assess CLAUDE.md --jsonRead is_pointer_style + the signals (over-budget, no-pointers,
missing-standards-pointer, missing-customizations). A clean result means the
file already points + fits the budget. The signals are heuristics — judge them.
Step 3 — Convert to / author a pointer (CMD-2/CMD-4)
If the file is a container (over budget / no pointers), MOVE the inlined context
INTO MemPalace (mine it per mempalace-integration) and replace it with pointers.
Use the generator for a correctly-shaped starting point:
$(command -v python3 || command -v python) scripts/claude_md/claude_md_efficiency.py \
generate --project "<name>" --palace "<palace>" --out CLAUDE.mdThen fill the standards section with the project's actual reference pointers and
the customizations section with the real toggles. Every fact you remove from
CLAUDE.md must be reachable from MemPalace via a pointer — never delete context
that is not stored somewhere the agent can load on demand.
Step 4 — Verify
Re-run the assessor; confirm is_pointer_style is true and no high-severity
signal remains.
Honest boundary
The assessor's signals are heuristics — a pointer-marker count + a byte
budget, not a proof that every fact is reachable from MemPalace. over-budget
can fire on a legitimately information-dense pointer file, and a clean result does
not prove the pointers actually resolve. The engine narrows where to look; the
judgment (is the context truly in MemPalace and reachable?) is yours. And NEVER
shrink CLAUDE.md by deleting context that was not first stored in MemPalace —
that is data loss dressed as efficiency.
Cross-references
scripts/claude_md/claude_md_efficiency.py— the deterministic assessor + generator (the machine).skills/mempalace-integration— the MemPalace availability check + the mine/wake-up flow this discipline points INTO (CMD-1, CMD-4a).skills/documentation-currency— the sibling doc-currency discipline; a pointer CLAUDE.md is still an inventory doc kept current.
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.

