What problem does it solve? Long-running LLM agents silently degrade as context grows: critical instructions get lost in the middle of the window, hallucinated facts poison downstream reasoning, irrelevant documents dilute attention, and contradictory sources produce unpredictable outputs. This Skill provides detection signals, thresholds, and mitigation strategies for these failure modes. ## Core Features & Use Cases - Five Degradation Patterns: Recognize and address lost-in-middle, context poisoning, distraction, confusion, and clash with pattern-specific detection signals and recovery procedures. - Detection Scripts: Run the included Python module to measure attention distribution, detect lost-in-middle placement, flag poisoning indicators, and compute a composite context health score. - Mitigation Framework: Apply the Write/Select/Compress/Isolate strategies based on which degradation pattern is active, with empirical thresholds for when to trigger compaction. - Use Case: An agent's output quality drops after 40K tokens of conversation. Use this Skill to diagnose whether critical instructions sit in the attention-degraded middle region, then restructure context placement or trigger compaction before the degradation cliff. ## Quick Start Analyze my agent's conversation context for degradation symptoms and recommend whether to compact, truncate, or restructure it.