context-degradation

Diagnose context degradation in long-running agent conversations with pattern-based detection and risk scoring.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/jaaaackieLai/deep-learning-claude-code --skill context-degradation-jaaaackielai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-degradation
Source: https://github.com/jaaaackieLai/deep-learning-claude-code/tree/main/skills/context-engineering/context-degradation
Command: npx skills add https://github.com/jaaaackieLai/deep-learning-claude-code --skill context-degradation-jaaaackielai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill provides patterns and utilities to diagnose and mitigate context degradation in long-running agent conversations, including lost-in-middle, context poisoning, distraction, and context clash.

Core Features & Use Cases

  • Pattern-based detection of degradation signals across long contexts
  • Health scoring, risk analysis, and actionable mitigation recommendations
  • Reusable Python utilities to simulate and analyze context health in experiments or production

Quick Start

Provide a context health analysis for the current session to surface degradation indicators.

Frequently Asked Questions about context-degradation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect context degradation in long-running agent conversations?

Detect context degradation by applying pattern-based analysis to long-running agent conversations, identifying lost-in-middle, context poisoning, distraction, and context clash signals to generate health scoring and mitigation recommendations.

What is lost-in-middle context poisoning and when does it occur?

Lost-in-middle context poisoning occurs in long-running agent conversations when critical information is overlooked due to context length, causing distraction and context clash; it requires pattern-based detection and health analytics to diagnose accurately.

How do I analyze context health and score degradation risks in Python?

Analyze context health and score degradation risks using included Python utilities with numpy that implement pattern-based detection on conversation data, outputting risk analysis and actionable mitigation guidance for agent sessions.

Does this context degradation diagnosis require numpy?

Yes, context degradation diagnosis requires numpy to run the included Python utilities that simulate, analyze, and score context health across long-running agent conversations.

What's the best way to mitigate context clash and distraction in agent sessions?

Mitigate context clash and distraction by running a context health analysis to surface degradation indicators, then applying the actionable mitigation recommendations generated by the Python utilities based on risk scoring.

When should I not use automated context degradation detection?

Automated context degradation detection is not suited for short or single-turn conversations where lost-in-middle, context poisoning, and context clash patterns do not accumulate enough signals for reliable health scoring.