context-engineering
Skill5 starsChanged 34 days agoMITView on GitHub
Use when context window is getting crowded, when dealing with long training logs, or when preparing prompts with mixed-priority content (system / task / skills / examples). Triggers when assembling prompts >4000 chars, or when observing "Lost in the Middle" symptoms (model ignores mid-prompt content).
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 10 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
HK-hubSkilldeprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
Also in 40 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
HK-hubSkillsource-driven-development
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.
Also in 44 projects that use this
- +6 more from LLl0k0laD
- +1 more from HK-hub
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 repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-validation-kaggleSkill
- agent-nurture-frameworkSkill
- agent-session-memory-protocolSkill
- arxiv-paper-searchSkill
- autogluon-firstSkill
- autogluon-preset-strategySkill
- autogluon-timeseries-strategySkill
- catboost-first-tabularSkill
- claudeceptionSkill
- code-competition-artifact-pipelineSkill
- competition-orchestration-multimodelSkill
- controlled-submission-experimentSkill
- cross-competition-feature-transferSkill
- cv-lb-gap-acknowledgmentSkill
- domain-knowledge-constraints-trapSkill
- ensemble-model-correlation-trapSkill
- feature-engineering-saturation-detectionSkill
- gpu-readiness-assessmentSkill
- gsd-loop-engineeringSkill
- kaggle-cognitive-cost-optimizationSkill
- kaggle-competition-best-practicesSkill
- kaggle-competition-type-strategySkill
- kaggle-data-format-firstSkill
- kaggle-discussion-searchSkill
- kaggle-experiment-sopSkill
- kaggle-oof-lb-validation-protocolSkill
- kaggle-optimal-blendingSkill
- kaggle-submission-format-by-metricSkill
- kaggle-top-performer-replicationSkill
- knowledge-crystallization-feedback-loopSkill
- ladder-drift-and-meta-aware-regressionSkill
- learned-value-beats-heuristic-augmentationSkill
- llm-competition-pipelineSkill
- mcts-pipeline-searchSkill
- mem0-dynamic-graph-memorySkill
- memory-hierarchy-managementSkill
- ml-sweet-spot-principleSkill
- model-ensemble-negative-weight-effectSkill
- multi-agent-rolesSkill
- multi-level-aggregation-overfittingSkill
- okf-visualize-knowledgeSkill
- onnx-minimal-network-designSkill
- per-category-modeling-backfireSkill
- progressive-verification-debuggingSkill
- ptcg-2ply-bounded-searchSkill
- ptcg-bc-large-model-submissionSkill
- retail-eda-frameworkSkill
- rmsle-zero-threshold-asymmetrySkill
- runtime-reflexionSkill
- sc-tir-mathematical-reasoningSkill
- self-evolving-skillsSkill
- skill-governance-and-automationSkill
- spatiotemporal-graph-feature-engineeringSkill
- store-sales-darts-chronos-blendSkill
- tabular-polynomial-features-breakthroughSkill
- three-layer-wisdom-extractionSkill
- time-series-walk-forward-validationSkill
- trueskill-simulation-competition-strategySkill
- ts-day-specific-forecastingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
1
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 83
When every detail must be preserved (use verbatim)
“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
Context
Even with 1M-2M token context windows, stuffing everything degrades performance ("Lost in the Middle" — Liu et al. 2023). This skill encodes Anthropic's 2025 best practices: dynamic compression, intelligent log truncation, and priority-aware token budgeting.
The core insight: context is RAM, treat it like memory management, not a buffer.
Guidance
Three Tools
from framework.src.context_engineering import (
ContextCompressor, LogTruncator, TokenEconomy,
CompressionLevel, BudgetPriority,
)
# 1. Compress long text (LLM outputs, paper abstracts)
compressor = ContextCompressor()
result = compressor.compress(long_paper_abstract,
level=CompressionLevel.MEDIUM,
focus_query="time series forecasting")
# → AGGRESSIVE for very long, MEDIUM for 4K-20K, LIGHT for <4K
# 2. Truncate training logs (preserve errors + samples)
truncated = LogTruncator(max_lines=200).truncate(training_log)
# → 500 lines → 50 lines, all ERROR/WARN kept, METRIC sampled
# 3. Priority-aware token budget
econ = TokenEconomy()
econ.add_critical(system_prompt, "system")
econ.add_high(current_task, "task")
econ.add(relevant_skill_text, BudgetPriority.MEDIUM, "skills")
econ.add(optional_context, BudgetPriority.LOW, "context")
prompt = econ.assemble() # auto-drops LOW when over budgetDecision Workflow
Assembling a prompt?
↓
1. Are there training logs > 100 lines?
→ LogTruncator first (reduce noise 5-10x)
↓
2. Are there paper abstracts / long docs?
→ Compressor + MEDIUM (keep relevant 50%)
↓
3. Total still > 8000 chars?
→ TokenEconomy (prioritize, auto-drop LOW)
↓
4. Send to LLMWhy This Matters
| Without Context Engineering | With It |
| Lost in the Middle (model misses mid-prompt) | Key info always prioritized |
| 40% token waste on redundant/irrelevant content | 50-70% token savings |
| Inconsistent outputs from over-stuffed prompts | Stable, focused outputs |
| Can't fit new context when LLM call limit hit | Always room for one more thing |
Real ROI: agy research confirms 20% accuracy improvement on code generation when context is properly engineered.
When to Apply
When to Use
- Any prompt > 4000 chars
- Training logs in context
- Mixing system + task + skills + examples
- "Model keeps ignoring this instruction"
- Multi-turn conversations with growing history
When NOT to Use
- Short prompts (<1000 chars) — overhead not worth it
- When every detail must be preserved (use verbatim)
- Streaming scenarios (compress after stream ends)
Notes
- Combine with Memory Hierarchy (don't compete): Memory decides what enters context; Engineering decides how to fit it
- Measure first: log token counts before/after to validate savings
- Test with edge cases: 50K chars, all-metrics log, mixed priorities
- See also:
memory-hierarchy-management,runtime-reflexion
References
- Implementation:
framework/src/context_engineering/ - Inspired by: Anthropic Context Engineering Best Practices (2025)
- Research: Liu et al. "Lost in the Middle" (2023), Anthropic prompt caching (2024)
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.

