context-degradation

Diagnose context degradation and generate structured recovery reports for agent sessions.

Updated May 24, 2026
One-click install
npx skills add https://github.com/FVossebeld/agent-skills-for-context-engineering --skill context-degradation-fvossebeld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-degradation
Source: https://github.com/FVossebeld/agent-skills-for-context-engineering/tree/main/skills/context-degradation
Command: npx skills add https://github.com/FVossebeld/agent-skills-for-context-engineering --skill context-degradation-fvossebeld

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill helps diagnose and mitigate context degradation in AI agent systems, addressing issues such as lost-in-middle attention, context poisoning, and cross-context confusion that degrade performance over long conversations.

Core Features & Use Cases

  • Detects attention distribution anomalies and identifies when critical information sits in degraded middle regions.
  • Analyzes context structure, detects poisoning indicators, and provides composite health scores.
  • Use Case: In a long-running session, run diagnostics to trigger mitigation like context trimming, isolation, or selective loading of documents.

Quick Start

Run a health analysis on the current session context to surface degradation patterns and recommended recovery steps.

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 loss of model focus in ongoing agent sessions, causing lost-in-middle attention, context poisoning, and cross-context confusion. This skill diagnoses these issues by analyzing attention distribution, calculating degradation scores, and recommending mitigation strategies.

How do I detect lost-in-middle patterns and context poisoning in multi-task prompts?

You detect lost-in-middle patterns and context poisoning by running a health analysis on your session context. The skill analyzes context structure, identifies attention distribution anomalies where critical information sits in degraded middle regions, and returns a structured report with poisoning indicators.

Can I run context health monitoring for memory-enabled workflows without external dependencies?

Yes, you can run context health monitoring for memory-enabled workflows without external dependencies. The skill operates independently to analyze ongoing agent sessions, determine risk levels, and suggest recovery procedures like context trimming, isolation, or selective document loading.

What is the best way to fix context degradation and recover degraded agent attention?

The best way to fix context degradation is to apply recommended mitigation strategies such as context trimming, isolation, or selective loading of documents. The skill provides a structured report detailing recovery procedures and specific actions based on your calculated degradation score.

When should I run context degradation diagnostics on my ongoing conversations?

You should run context degradation diagnostics during long-running conversations, multi-task prompts, and memory-enabled workflows when you observe performance degradation. The skill quantifies risk levels and returns a structured report detailing attention distribution and recommended recovery steps.