Agent skill · AI & Agents

context-degradation

This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.

guanyanggithub.com/guanyangGitHub ↗
claude-codeships scriptsMIT
Install
npx skills add guanyang/open-agent-hub --skill context-degradation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 19 KB
Bundled scripts: yes
Path: skills/context-degradation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 940
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 Do not activate this skill for adjacent work owned by other skills: - Explaining foundational context mechanics without an active failure: `context-fundamentals`. - Applying token-efficiency tactics after the failure pattern is known: `context-optimization`. - Designing a compression or handoff summary strategy: `context-compression`

What's inside
Steps it walks through
  1. When to Activate
  2. Core Concepts
  3. Detailed Topics
  4. Lost-in-Middle: Detection and Placement Strategy
  5. Context Poisoning: Prevention and Recovery
  6. Context Distraction: Curation Over Accumulation
  7. Context Confusion: Task Isolation
  8. Context Clash: Conflict Resolution Protocols
  9. Empirical Benchmarks and Thresholds
  10. Counterintuitive Findings
  11. When Larger Contexts Hurt
  12. Practical Guidance
  13. The Four-Bucket Mitigation Framework
  14. Architectural Patterns for Resilience
Ships with 2 files
  • references/patterns.md
  • scripts/degradation_detector.py
More from open-agent-hub
All skills →
About this skill
What does the context-degradation skill do?

This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.

How do I install it?

Run `npx skills add guanyang/open-agent-hub --skill context-degradation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From guanyang/open-agent-hub, a repository with 940 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going