What problem does it solve?
Long AI agent sessions silently degrade: after 40+ tool calls or a context compaction event, the agent forgets rules it followed earlier, drifts from naming conventions, and contradicts prior decisions. Hooks do not fix this because post-compaction injections get ignored. This Skill provides a behavioral protocol that detects degradation signals and anchors critical rules before damage occurs.
Core Features & Use Cases
- Health Signal Monitoring: Tracks tool call counts and drift signals with a Green/Yellow/Red zone model, triggering checkpoints, rule recitation, or session splits at defined thresholds.
- Context Anchoring After Compaction: Defines a re-read, recite, verify protocol to restore critical rules from files after any compaction event.
- Compaction-Safe Patterns: Enforces keeping critical instructions in files (CLAUDE.md, CONTEXT.md) rather than conversation, so rules survive compaction.
- Use Case: During a large multi-file refactoring exceeding 60 tool calls, the agent stops, writes a handoff document, re-reads project rules, and splits the work into a fresh session instead of producing drifted, inconsistent code.
Quick Start
Ask the agent to apply the session-guard protocol to monitor this long refactoring session and checkpoint or split before context degrades.