context-health-monitor

Detects context degradation signals and writes state dumps to .gsd/STATE.md before sessions fail.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/amanpal3/SKILLs --skill context-health-monitor-amanpal3
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-health-monitor
Source: https://github.com/amanpal3/SKILLs/tree/main/.agent/plugins/gsd/.agents/skills/context-health-monitor
Command: npx skills add https://github.com/amanpal3/SKILLs --skill context-health-monitor-amanpal3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long AI coding sessions suffer from "Context Rot" — quality degrades as the agent repeats failed debugging attempts, goes in circles, or loses track of decisions, and abrupt session termination can wipe out all progress. ## Core Features & Use Cases - 3-Strike Rule: After 3 failed debugging attempts on the same issue, the agent stops, documents what was tried, and recommends a fresh session instead of thrashing. - Circular Detection: Recognizes when the same approach is being retried and forces a fundamentally different strategy or a pause. - Auto-Save Protocol: Writes a state snapshot to .gsd/STATE.md immediately when a warning threshold is hit, before recommending /pause, so state survives hard session termination. - Use Case: During a long refactoring session, the agent fails to fix a test three times. The skill triggers a state dump capturing attempts, hypothesis, and next steps, then the user resumes later with /resume and full context. ## Quick Start Ask the agent to monitor this session for repeated failures and save a state dump to .gsd/STATE.md if debugging stalls.

Frequently Asked Questions about context-health-monitor

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

FAQPage Schema
How do I prevent an AI coding agent from losing progress in long sessions?▼

Use an auto-save protocol that writes a state snapshot to .gsd/STATE.md whenever a warning threshold is hit, before recommending a pause. This preserves the current phase, task, and next step even if the session terminates abruptly.

What is context rot in AI agent sessions?▼

Context rot is the quality degradation that occurs as an agent processes more information in one session, showing up as repeated failed debugging, circular approaches, and backtracking. Monitoring warning signals and triggering state dumps mitigates it.

How does the 3-strike rule work for AI debugging?▼

If debugging the same issue fails three times, the agent stops attempting fixes, documents what was tried, the errors, and the current hypothesis in .gsd/STATE.md, then recommends starting a fresh session instead of continuing.

Can this skill work with /pause and /resume commands?▼

Yes. The skill integrates with /pause for proper session handoff and /resume to reload the state dump context. State is saved proactively before /pause is recommended, so progress survives even hard terminations.

When should an AI agent stop debugging and ask the user?▼

The agent should stop after three failed attempts on the same issue, when it detects it is retrying the same approach, or when it is uncertain about a decision. It logs uncertainty in .gsd/DECISIONS.md and asks for guidance rather than guessing.