lean-context-layout
Skill16 starsChanged 5 months agoMITView on GitHub
Restructure agent-facing docs so the always-loaded context stays small and the rest is loaded on demand. Use when a repo has bloated AGENTS.md or CLAUDE-style docs, too many always-loaded notes, stale session history, oversized runbooks, or high startup token waste for coding agents.
In this repository94 other files it gives its agents.
- agent-friction-ledgerSkill
- agent-learning-layer-triageSkill
- agent-operations-contractSkill
- agents-best-practicesSkill
- agent-tool-contract-reviewSkill
- anti-slop-reviewSkill
- architecture-deepening-reviewSkill
- assumption-excavationSkill
- authorized-security-routerSkill
- book-to-skillSkill
- bounded-evaluationSkill
- bounded-growth-loopSkill
- bounded-orchestration-contractSkill
- brief-first-executionSkill
- browser-verificationSkill
- bug-evidence-protocolSkill
- codex-review-loopSkill
- compaction-survivalSkill
- complexity-optimizerSkill
- confidence-fragility-reviewSkill
- context-degradation-reviewSkill
- corporate-surfaceSkill
- delivery-baseline-auditSkill
- delivery-preflight-gateSkill
- design-critique-polishSkill
- designmd-brand-kitSkill
- design-register-bootstrapSkill
- diagnoseSkill
- doc-grounded-grillingSkill
- doc-to-lora-evaluatorSkill
- durable-context-maintenanceSkill
- dynamic-workflow-packetsSkill
- editorial-surfaceSkill
- evidence-ledger-researchSkill
- filesystem-context-disciplineSkill
- fluid-interaction-reviewSkill
- frontend-product-builderSkill
- frontend-taste-layerSkill
- git-native-context-contractSkill
- goal-loop-designerSkill
- graph-guided-code-readingSkill
- handoffSkill
- happy-handoffSkill
- html-brief-artifactSkill
- html-diagram-artifactSkill
- hypothesis-diversificationSkill
- idea-to-ship-gatesSkill
- knowledge-base-enrichmentSkill
- local-inference-tuningSkill
- loop-hardening-contractSkill
- loopops-protocolSkill
- loop-readiness-reviewSkill
- lottie-motion-builderSkill
- minimal-diff-builderSkill
- motion-review-gateSkill
- overengineering-reviewSkill
- personal-workspace-routerSkill
- phase-spec-executionSkill
- pipeline-readiness-gateSkill
- plan-to-issuesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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 24
Prefer a compact startup surface:
- Distinctive: line 50
Keep startup files stable.
- Distinctive: line 55
Keep AGENTS.md small and procedural.
- Distinctive: line 57
Prefer compact summaries over completed-session logs in startup files.
- Distinctive: line 62
Do not delete durable project knowledge.
- Distinctive: line 63
Do not hide critical safety or production constraints in optional docs.
- Distinctive: line 64
Do not create six tiny files when one clear compact file would do.
- Distinctive: line 65
Do not optimize only for token count if navigability becomes worse.
≈ “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
Lean Context Layout
Save tokens by changing what loads at startup. Keep the default context small, stable, and operational.
Goal
Separate:
- always-loaded essentials;
- on-demand reference material;
- archival history that should not auto-load.
Default Layout
Prefer a compact startup surface:
- top-level agent entry file with rules and pointers;
- quick-start commands;
- architecture map or repo map entrypoint;
- common mistakes or sharp edges;
- optional issue-specific or domain-specific notes loaded only when needed.
Everything else should move behind explicit paths in docs/, .claude/, docs/ai/, or equivalent repo-local structures.
Workflow
- Measure the current startup burden:
- which files are always loaded;
- which of them are large, stale, duplicated, or historical;
- which content is needed every session versus occasionally.
- Identify the four startup essentials:
- how to work here;
- how to run or test;
- where the code lives;
- what recurring mistakes to avoid.
- Move long histories, completed tasks, old sessions, generated artifacts, and bulky narrative docs out of the always-loaded path.
- Replace bulky text with short index pointers:
- “for X, read Y”;
- “for domain map, open Z”;
- “for completed work, see archive path”.
- Keep startup files stable. Frequent churn reduces cache utility and raises reread cost.
- Re-measure after restructuring and report the delta.
Codex And agentsgen Guidance
- Keep
AGENTS.mdsmall and procedural. - Push deeper material into
docs/ai/or other explicit reference paths. - Prefer compact summaries over completed-session logs in startup files.
- Preserve enough orientation that a fresh agent can still start productively.
Guardrails
- Do not delete durable project knowledge; relocate and index it.
- Do not hide critical safety or production constraints in optional docs.
- Do not create six tiny files when one clear compact file would do.
- Do not optimize only for token count if navigability becomes worse.
Final Report
Include old layout, new layout, what moved, what stayed always-loaded, and the expected token savings.
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.

