context-degradation

Detect and quantify context degradation patterns in long agent sessions.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/salmanparacha/speckitplus-calculator --skill context-degradation-salmanparacha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-degradation
Source: https://github.com/salmanparacha/speckitplus-calculator/tree/main/.claude/skills-nocontext/context-degradation
Command: npx skills add https://github.com/salmanparacha/speckitplus-calculator --skill context-degradation-salmanparacha

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Context degradation undermines reliability when context grows, causing performance drops and inconsistent outputs in long-running agent conversations.

Core Features & Use Cases

  • Detection of degradation patterns (lost-in-middle, context poisoning, distraction) across extended contexts
  • Analytical guidance to identify risk regions and implement robust context-management strategies
  • Practical tooling and references to support engineers designing resilient agent systems

Quick Start

Run the analyzer on a long conversation to identify lost-in-middle and related context degradation patterns.

Frequently Asked Questions about context-degradation

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

FAQPage Schema
What is context degradation in long-running LLM agent sessions?

Context degradation is the reliability drop and inconsistent output that emerges as context grows in long-running LLM agent conversations. It undermines performance through patterns like lost-in-middle, context poisoning, and distraction.

How do I detect lost-in-middle and context poisoning patterns in long conversations?

You detect lost-in-middle and context poisoning patterns by running the analyzer on a long conversation. It identifies risk regions and quantifies degradation patterns to help diagnose reliability issues.

Can I use this to debug context degradation in extended debugging sessions?

Yes, you can apply the analyzer to long-running debugging sessions, design reviews, and extended agent conversations to identify risk regions and implement robust context-management strategies.

Do I need numpy installed to analyze context degradation patterns?

Yes, numpy is a required dependency to run the analyzer and process the numerical data needed to identify and quantify context degradation patterns in long agent sessions.

What is the best way to mitigate context degradation when context grows in agent systems?

The best way to mitigate context degradation is to analyze long conversations for specific patterns like distraction and lost-in-middle, then apply the provided tooling, references, and safety checks to implement robust context-management strategies.

Why does my LLM output quality drop in the middle of long context sessions?

Output quality drops in the middle of long context sessions due to the lost-in-middle degradation pattern. As context grows, attention mechanisms struggle, causing performance drops and inconsistent outputs in extended agent conversations.