gsd-context-health-monitor

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long AI coding sessions suffer from "context rot" — repeated failed debugging, circular reasoning, and growing uncertainty that silently degrade output quality and lose progress when sessions terminate abruptly. ## Core Features & Use Cases - 3-Strike Rule: After three failed attempts on the same issue, the agent stops, documents what was tried, and recommends a fresh session instead of guessing further. - Circular Detection & Uncertainty Logging: Recognizes repeated approaches and logs uncertain decisions to .gsd/DECISIONS.md with alternatives considered. - Auto-Save Protocol: Writes a state snapshot to .gsd/STATE.md before recommending /pause, so progress survives hard session terminations. - Use Case: During a long debugging session, the agent fails three times on the same bug; it automatically dumps the hypothesis, attempted fixes, and file states to .gsd/STATE.md, then hands off cleanly via /pause and /resume. ## 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 gsd-context-health-monitor

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

FAQPage Schema
How do I prevent context rot in long AI coding sessions?▼

Monitor for warning signals like three failed debugging attempts, repeated approaches, or expressed uncertainty. When a threshold is hit, write a state dump to .gsd/STATE.md capturing attempts, hypotheses, and next steps, then start a fresh session.

How to save AI agent state before a session ends?▼

Use the auto-save protocol: write a snapshot to .gsd/STATE.md immediately when a warning threshold triggers, before recommending /pause. Include current phase, task, last action, and next step so state survives abrupt termination.

What is the 3-strike rule for AI debugging?▼

The 3-strike rule stops the agent after three failed attempts on the same issue. It must document what was tried, the errors, and the current hypothesis in .gsd/STATE.md, then recommend a fresh session rather than continuing to guess.

Does this work with /pause and /resume commands?▼

Yes, the state dump integrates with /pause for session handoff and /resume for reloading context. The auto-save step runs first so state persists even if the session terminates before the user types /pause.

When should I not rely on automated context monitoring?▼

Threshold-based signals like failure counts can miss subtle quality degradation or trigger on legitimately iterative work. Treat the dumps as a safety net and still manually checkpoint before major refactors or risky changes.