context-degradation

Detect and diagnose five context degradation patterns in long-running AI agent conversations.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/marinvch/ai-os --skill context-degradation-marinvch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-degradation
Source: https://github.com/marinvch/ai-os/tree/main/.agents/skills/context-engineering-collection/skills/context-degradation
Command: npx skills add https://github.com/marinvch/ai-os --skill context-degradation-marinvch

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Long-context conversations in AI agent ecosystems can suffer from attention misallocation, context poisoning, and task-switch confusion, leading to degraded reliability and poorer decision quality.

Core Features & Use Cases

  • Detects lost-in-middle attention patterns in extended dialogues to surface critical gaps.
  • Provides poisoning and contradiction indicators to safeguard context integrity over long sessions.
  • Delivers actionable recommendations to reorganize, isolate tasks, and implement guardrails for multi-turn reasoning.

Quick Start

Run analyze_agent_context on a long-running conversation to get a health snapshot and degradation recommendations.

Frequently Asked Questions about context-degradation

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

FAQPage Schema
How do I detect lost-in-middle attention patterns in long-running AI agent conversations?

To detect lost-in-middle attention patterns in long-running AI agent conversations, run the analyze_agent_context function. It identifies attention misallocation across extended dialogues and provides a health snapshot with actionable recommendations.

What is context poisoning in multi-turn agent sessions and how do I diagnose it?

Context poisoning in multi-turn agent sessions is the introduction of contradictions or misleading information that degrades reliability. You can diagnose it using poisoning detection and health scoring to identify contradictions and safeguard context integrity.

How do I identify task-switch confusion and distraction in long-context retrieval-heavy workflows?

To identify task-switch confusion and distraction in long-context retrieval-heavy workflows, apply attention mapping and health analysis. These detect the five degradation patterns—lost-in-middle, poisoning, distraction, confusion, and clash—to surface critical gaps.

Can I get actionable recommendations to implement safety guardrails for multi-turn reasoning?

Yes, you can get actionable recommendations to implement safety guardrails for multi-turn reasoning. The health scoring mechanism provides specific guidance to reorganize context, isolate tasks, and establish guardrails that mitigate degradation.

What are the limitations when diagnosing context degradation patterns in long-context tasks?

A limitation when diagnosing context degradation patterns in long-context tasks is that the analysis depends on the provided conversation data. It surfaces five specific degradation patterns but requires applying the recommended reorganization and guardrails manually to improve reliability.