Context Health Monitor

Detect context complexity thresholds and trigger state dumps in agent sessions.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/apsulli/gmail-intel --skill context-health-monitor-apsulli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Context Health Monitor
Source: https://github.com/apsulli/gmail-intel/tree/main/.opencode/skills/context-health-monitor
Command: npx skills add https://github.com/apsulli/gmail-intel --skill context-health-monitor-apsulli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context Health Monitor detects and mitigates context degradation during long AI agent sessions by triggering state dumps and decision logs before quality deteriorates.

Core Features & Use Cases

  • Self-monitoring of context complexity across an ongoing session
  • Automatic state dumps to .gsd/STATE.md when warning thresholds are hit
  • Documentation of decisions to .gsd/DECISIONS.md to support review and handoff
  • Guidance to pause or reset sessions via /pause or /resume for fresh context
  • Optional integration hooks for external tooling

Quick Start

Activate the Context Health Monitor to automatically detect context rot and generate a state dump when warning signs are detected.

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 context rot in long-running AI agent sessions?

To prevent context rot in long-running AI agent sessions, you need a context health monitor to detect when complexity grows beyond a safe threshold, triggering automatic state dumps and decision logs before reasoning quality degrades.

How does automatic state capture work for degraded AI reasoning?

Automatic state capture works by monitoring session complexity and writing a state dump to .gsd/STATE.md when warning thresholds are hit, preserving your workflow context for safe recovery and review before quality deteriorates.

When should I trigger a decision log during an AI agent task?

You should trigger a decision log during an AI agent task when context complexity exceeds safe thresholds, documenting key choices to .gsd/DECISIONS.md to support handoff, review, and safe recovery workflows.

Can I pause and resume agent sessions to reset context complexity?

Yes, you can pause and resume agent sessions to reset context complexity. The monitor provides guidance to use /pause or /resume commands, allowing you to start with fresh context after hitting warning thresholds.

What is the best way to self-monitor context complexity in autonomous agents?

The best way to self-monitor context complexity in autonomous agents is to activate a context health monitor that continuously evaluates session state, automatically capturing state dumps and decision logs when warning signs are detected.

Do I need external tooling to capture state dumps for AI sessions?

No, you do not need external tooling to capture state dumps for AI sessions, as the monitor writes directly to .gsd/STATE.md and .gsd/DECISIONS.md, though optional integration hooks are available if you want to connect external systems.