What problem does it solve? LLM agents degrade unpredictably as context grows: critical instructions get lost in the middle of long prompts, hallucinated facts poison downstream reasoning, and contradictory retrieved documents silently corrupt outputs. This Skill provides detection patterns, mitigation frameworks, and Python tooling to identify and fix these failures before they cascade. ## Core Features & Use Cases - Five Degradation Patterns: Recognize and mitigate lost-in-middle, context poisoning, distraction, confusion, and clash with pattern-specific detection signals and recovery procedures. - Health Analysis Toolkit: Run composite context health checks combining attention distribution, poisoning detection, and utilization metrics via the included Python scripts. - Four-Bucket Mitigation Framework: Apply Write, Select, Compress, and Isolate strategies matched to the active degradation pattern. - Use Case: An agent's output quality drops after 40K tokens of conversation. Use the ContextHealthAnalyzer to score the session, detect that critical instructions sit in the attention-degraded middle region, and restructure the prompt to place key information at the edges. ## Quick Start Ask the agent to analyze the current conversation context for degradation symptoms and recommend mitigation strategies based on the detected pattern.