
Context Degradation
When your agent starts hallucinating facts it just read or ignoring critical instructions buried in a long prompt, you're hitting context degradation. This skill walks through five failure patterns: lost-in-middle (that U-curve attention problem where middle content gets ignored), poisoning (bad tool outputs contaminating everything downstream), distraction (irrelevant docs tanking performance even when correct info is present), confusion (mixing up constraints from different tasks), and clash (contradictory but valid sources). It's built around the insight that these aren't random failures but predictable engineering problems with specific detection signals. The placement strategies and filtering rules are directly applicable if you're building anything that needs to handle contexts over 4K tokens reliably.
- skills.sh installs
- 280
- GitHub stars
- 18.3K
- last updated
- May 26, 2026
Install
$ npx -y skills add muratcankoylan/agent-skills-for-context-engineering --skill context-degradation --agent claude-codeInstalls into .claude/skills of the current project.
Files
Context Degradation Patterns
Diagnose and fix context failures before they cascade. Context degradation is not binary — it is a continuum that manifests through five distinct, predictable patterns: lost-in-middle, poisoning, distraction, confusion, and clash. Each pattern has specific detection signals and mitigation strategies. Treat degradation as an engineering problem with measurable thresholds, not an unpredictable failure mode.
When to Activate
Activate this skill when:
- Agent performance degrades unexpectedly during long conversations
- Debugging cases where agents produce incorrect or irrelevant outputs
- Designing systems that must handle large contexts reliably
- Evaluating context engineering choices for production systems
- Investigating "lost in middle" phenomena in agent outputs
- Analyzing context-related failures in agent behavior
Sponsors
Details
- Repository
- github.com/muratcankoylan/agent-skills-for-context-engineering
- Category
- AI & Agent Building
- License
- MIT
- First seen
- Jun 11, 2026
More from muratcankoylan/agent-skills-for-context-engineering
All 17- Evaluation262
- Context Fundamentals253
- Latent Briefing195
- Harness Engineering189
- Project Development189
- Advanced Evaluation185
- Hosted Agents164
- Bdi Mental States160
- Context Engineering Collection
- Context Engineering Collection4.4K
- Context Compression565
- Context Optimization449
- Filesystem Context378
- Multi Agent Patterns329
- Memory Systems321
- Tool Design291