hatch3r/hatch3r/hatch3r-context-health
Claude Code and agent skill by hatch3r/hatch3r
- community
Checking that the SKILL.md file is still in the repository.
Monitors and maintains conversation context health during long sessions. Use when context may be degrading, after many turns, or when experiencing repeated errors.
Install
npx vskill@latest install hatch3r/hatch3r/hatch3r-context-healthSKILL.md
The same SKILL.md was published earlier as hatch3r/hatch3r/hatch3r-context-health.
Context Health Monitoring
Quick Start
Step 0 — Detect Ambiguity (P8 B1)
Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: original task recall, corrective action authority at Orange/Red (delegate vs checkpoint-and-stop), scope of files to re-read, whether to post progress to platform on Red, and irreversible stop (discard unsaved work) vs preserve.
Fan-out Discipline (P8 B2)
Fan-out scales with task size; token cost never justifies serializing independent work (rules/hatch3r-fan-out-discipline.md P8 B2; agents/shared/efficiency-patterns.md). Emit sub_agents_spawned: { count, rationale, task_structure } in your output.
Step 1: Assess Context Health
Run through the self-assessment checklist:
- Task recall: Can you state the original task, acceptance criteria, and scope boundaries without looking?
- Progress tracking: List what's been completed and what remains.
- Error check: Count recent failed tool calls or incorrect assumptions.
- File currency: List files you've modified — when did you last read each one?
- Scope check: Compare your current work to the original issue description.
Model-Aware Threshold Profiles
Default thresholds assume a large-context model. When the active model is known, apply the matching profile to adjust thresholds:
| Model Tier | Context Window | Token Warning | Turn Limit | File Staleness | |
|---|---|---|---|---|---|
| Small (< 32K) | ~32K tokens | > 60% of window | > 15 turns | > 10 turns | |
| Medium (32K--128K) | ~128K tokens | > 70% of window | > 25 turns | > 15 turns | |
| Large (128K--200K) | ~200K tokens | > 80% of window | > 30 turns | > 20 turns | |
| Extended (> 200K) | 200K+ tokens | > 85% of window | > 40 turns | > 25 turns |
Profile resolution: read models in .hatch3r/hatch.json; default to Large if unset. A contextHealth section in hatch.json with explicit thresholds overrides the profile. Log the active profile at the start of each check: "Context health using <tier> profile (<window_size> tokens)".
Step 2: Identify Degradation
| Check | Healthy | Degraded | |
|---|---|---|---|
| Task recall | Can state requirements from memory | Need to re-read issue | |
| Progress | Clear forward momentum | Cycling or stuck | |
| Errors | Occasional, different causes | Repeated, same cause | |
| Files | Recently read and current | Stale, may have drifted | |
| Scope | Aligned with acceptance criteria | Drifted to tangential work |
Step 3: Apply Corrective Action
If 0-1 checks degraded (Green): Continue normally
If 2-3 checks degraded (Yellow): Refresh
- Re-read the issue body and acceptance criteria
- Re-read all files you've modified in this session
- Create a progress summary of completed work
- Re-plan remaining steps from the refreshed context
If 4 checks degraded (Orange): Delegate
- Create a handoff document with all context by invoking the
hatch3r-handoff-prepareragent (or thehatch3r-handoff-prepareskill directly) - Spawn a sub-agent using the Task tool with the handoff
- Monitor the sub-agent's output
- Aggregate results
If 5 checks degraded (Red): Checkpoint and Stop
- Save all progress (files changed, tests written)
- Document remaining work and blockers
- Post progress on the issue/work item (GitHub Issue, ADO Work Item, or GitLab Issue — check
platformin.hatch3r/hatch.json) - Recommend fresh conversation
Step 4: Verify Improvement
After corrective action:
- Re-run the assessment checklist
- Confirm health is at Green or Yellow
- Resume work on the original task
Context Poisoning Detection
During context health checks, also scan for signs of context poisoning -- stale or incorrect information that has accumulated in the conversation:
| Signal | Detection | Action | |
|---|---|---|---|
| Outdated file content | You reference a file's content but the file has been modified since you last read it | Re-read the file before continuing | |
| Stale assumptions | A decision was made based on information that has since changed (e.g., a function was refactored) | Re-verify assumptions against current state | |
| Contradictory context | Two pieces of context in the conversation disagree (e.g., "the API uses REST" vs. code showing GraphQL) | Resolve by reading the actual source of truth | |
| Accumulated errors | Multiple tool calls have failed, suggesting the mental model of the codebase is wrong | Reset context by re-reading key files from scratch |
Context poisoning is more dangerous than missing context because it leads to confident-but-wrong decisions.
Error Handling
- Context degradation detected mid-task: If health drops to Orange or Red during implementation, stop the current task, summarize progress so far, and recommend delegating the remainder to a fresh sub-agent with the summary as input.
- Health checks produce conflicting signals: If some checks indicate Green while others indicate Red, trust the worst signal and investigate the specific check that failed before proceeding.
- Unable to estimate token usage: If the platform does not expose token counts, use character-based estimation (1 token per 4 characters) and note the approximation in the report.
Definition of Done
- [ ] Context health assessed with all 5 checks
- [ ] Context poisoning scan completed (no stale assumptions)
- [ ] Degradation level determined (Green/Yellow/Orange/Red)
- [ ] Appropriate corrective action taken
- [ ] Health verified at Green or Yellow after correction
Board Pickup Integration
When board-pickup operates in auto-advance mode, context health is checked between issues. Orange completes the current issue then a fresh agent handles the next; Red mid-issue marks the issue PARTIAL and moves it back to Ready.
Related Skills & Agents
- Command:
hatch3r-board-pickup-- auto-advance mode uses context health for session management
References
- Token counting — Anthropic API docs — accessed 2026-05-31, official-docs (Anthropic). Source for treating the 1-token-per-4-characters figure as an approximation when the platform does not expose exact token counts (Error Handling, Step 1).
- Effective context engineering for AI agents — Anthropic engineering — accessed 2026-05-31, official-docs (Anthropic). Source for the context-degradation and context-window-pressure signals behind the model-aware threshold profiles and the context-poisoning detection table.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hatch3r-context-health/SKILL.md
Popularity
- Repository stars
- 26
- Repository forks
- 6
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hatch3r/hatch3r/hatch3r-context-health)