context-engineering
Skill1 starsChanged 7 months agoMITView on GitHub
Audit and curate the 5-layer agent context hierarchy to prevent quality degradation mid-session — rules files, specs, source files, error output, and conversation history.
131 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- gerivdb/SKILLStheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- gopalparashar421/agent-skillstheir own version, first seen Nov 8, 2026
- komluk/scaffoldingtheir own version, first seen Nov 7, 2026
Used with
Projects with it also use using-agent-skills, idea-refine and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LLl0k0laDSkillusing-agent-skills
Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
Also in 36 projects that use this
LLl0k0laDSkillidea-refine
Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.
Also in 44 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 14 projects that use this
- +5 more from LLl0k0laD
Other versions131 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 131
- addyosmani/agent-skills★ 114ksame name
- bojieli/ai-agent-book-projects★ 53ksame name
- bojieli/ai-agent-book★ 53ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- mrgoonie/claudekit-skills★ 2.2ksame name
- kdlbs/kandev★ 1.1ksame name
- liza-mas/liza★ 418same name
- typv/nest-turbo-starter★ 224same name
- VAMFI/claude-user-memory★ 206same name
- shashankswe2020-ux/whoop-mcp★ 174same name
121 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository206 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- project-healthSkill
- skill-validatorSkill
- accessibilitySkill
- agent-debugSkill
- agent-evaluateSkill
- ai-governanceSkill
- ai-system-reviewSkill
- api-docs-generateSkill
- api-examplesSkill
- api-mockSkill
- api-test-generateSkill
- api-validateSkill
- architecture-diagramSkill
- ask-mattSkill
- assumption-mapSkill
- boilerplateSkill
- brainstormSkill
- branch-finishSkill
- briefingSkill
- browser-testing-with-devtoolsSkill
- bundle-analyzeSkill
- cache-strategySkill
- canarySkill
- carefulSkill
- cavemanSkill
- changelog-autoSkill
- chaos-testSkill
- ci-setupSkill
- ci-sweepSkill
- cleanprojectSkill
- click-path-auditSkill
- codebase-designSkill
- code-review-checklistSkill
- code-tourSkill
- commitSkill
- completion-verifySkill
- complexity-reduceSkill
- component-librarySkill
- config-cleanupSkill
- config-generateSkill
- conflict-resolveSkill
- container-optimizeSkill
- context-budgetSkill
- context-restoreSkill
- context-saveSkill
- continuous-learningSkill
- contributingSkill
- cost-trackSkill
- councilSkill
- create-todosSkill
- cross-modal-reviewSkill
- database-connectSkill
- db-diagramSkill
- ddd-modelSkill
- debug-root-causeSkill
- debug-sessionSkill
- debug-systematicSkill
- decision-logSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
3
Distinctive
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 18
Early exit: If context appears healthy (no redundant files loaded, no stale error traces), report "Context healthy — no changes needed"
- Distinctive: line 43
Check for common inflation sources:
- Distinctive: line 48
Test output exceeding 200 lines
“Common” is measured: kept by at least 6 in 10 of the 117 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Engineering
I'll audit your current context load, identify what is inflating it unnecessarily, and restructure the 5-layer hierarchy so the agent stays sharp for the rest of the session.
Arguments: $ARGUMENTS — optional focus (e.g., "optimize for implementation", "optimize for debugging")
Token Optimization
Expected range: 200–600 tokens (audit report + recommendations)
Early exit: If context appears healthy (no redundant files loaded, no stale error traces), report "Context healthy — no changes needed"
Patterns used: Bash for file size checks, progressive disclosure (summary first, details on request)
The 5-Layer Context Hierarchy
Layer 1 — Rules files CLAUDE.md, .claude/rules/*.md
Layer 2 — Specs / designs docs/specs/, PRD, ADRs
Layer 3 — Source files only the files currently being changed
Layer 4 — Error output compiler errors, test failures, logs
Layer 5 — Conversation current session historyEach layer has an appropriate size budget. Layers 3–5 are the most common source of bloat.
Step 1 — Audit Current Context
# Estimate context pressure indicators
wc -l .claude/rules/*.md 2>/dev/null | tail -1
find . -name "CLAUDE.md" | xargs wc -l 2>/dev/null | tail -1
ls -la docs/specs/ 2>/dev/null | head -10Check for common inflation sources:
- Entire files loaded when only a function is needed
- Stale error traces from previous attempts (no longer relevant)
- Spec documents for features not currently being implemented
- Multiple versions of the same file loaded
- Test output exceeding 200 lines
Step 2 — Report Findings
Context Audit:
Layer 1 (Rules): [N lines] — [healthy / inflated]
Layer 2 (Specs): [N files loaded] — [relevant / stale]
Layer 3 (Source): [N files] — [scoped / over-broad]
Layer 4 (Errors): [N lines] — [current / stale]
Layer 5 (History): [estimated turns] — [fresh / compressible]
Top 3 inflation sources:
1. [source] — [recommended action]
2. [source] — [recommended action]
3. [source] — [recommended action]Step 3 — Apply Recommendations
For each inflation source, take the recommended action:
Over-broad source files: Identify the specific functions or classes needed; reference by grep pattern rather than loading the whole file
Stale error traces: Summarize to the key error type and location (1–2 lines); drop the full stack trace from active context
Off-topic specs: Note the spec exists and where to find it; remove it from active context
Redundant conversation: Summarize completed sub-tasks as a single line each; carry forward only open items
Step 4 — Curate Going Forward
Recommend a loading strategy for the rest of the session based on $ARGUMENTS:
Recommended context loading strategy:
- Layer 3: Load only [file list] — grep for symbols before loading full files
- Layer 4: Keep error output to last 50 lines per error type
- Layer 5: Summarize completed phases; keep only current phase in full detailEdge Cases
- No CLAUDE.md or rules files: note the absence; recommend creating minimal rules for consistent behavior
- Context already very large: recommend starting a fresh session with a focused handoff prompt; provide a handoff template
- Cannot determine what is loaded: provide the optimization heuristics and let the user apply them manually
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

