session-health
Skill150 starsChanged 12 days agoMITView on GitHub
Check whether the current session has coherent guidance, focus, handoff state, working-tree ownership, and enough context to proceed safely. Use when starting, resuming, or diagnosing a confused session. Not for auditing the machine or deployed AI infrastructure; use $system-audit.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- Cal-Starfur/claude-skillstheir own version, first seen Jun 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- NinjaSln-labs/agent-skills★ 1same name
- Cal-Starfur/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository89 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beamer-deckSkill
- bib-coverageSkill
- bib-filterSkill
- bib-parseSkill
- brief-compliance-checkSkill
- camera-readySkill
- causal-designSkill
- checkpointSkill
- code-archaeologySkill
- compile-knowledgeSkill
- computational-experimentsSkill
- cross-language-checkSkill
- data-analysisSkill
- devils-advocateSkill
- docs-consistencySkill
- docxSkill
- experiment-designSkill
- grill-meSkill
- handoffSkill
- ideasSkill
- init-project-courseSkill
- init-project-lightSkill
- init-project-orchestrationSkill
- init-projectSkill
- insights-deckSkill
- interview-meSkill
- knowledge-lintSkill
- latex-diffSkill
- latex-health-checkSkill
- latex-polishSkill
- latex-postersSkill
- latex-scaffoldSkill
- latexSkill
- latex-templateSkill
- lean-checkSkill
- math-proofSkill
- mcp-builderSkill
- method-auditSkill
- multi-perspectiveSkill
- numerical-checkSkill
- pdfSkill
- pipeline-manifestSkill
- playwright-cliSkill
- postmortemSkill
- pre-commit-auditSkill
- pre-submission-reportSkill
- project-deckSkill
- project-safetySkill
- proof-readabilitySkill
- proofreadSkill
- python-envSkill
- quarto-deckSkill
- reorgSkill
- replication-auditSkill
- replication-packageSkill
- retarget-journalSkill
- review-clusterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
If found: show filename, first 3 lines, and whether it contains "APPROVED" or is still "DRAFT"
- Distinctive: line 30
If none: report "No active plan"
- Distinctive: line 35
If found: show filename and first 3 lines
- Distinctive: line 36
If none: report "No session log found"
- Very specific: line 40
Check when .context/current-focus.md was last modified:
- Very specific: line 42
If older than 3 days: warn "Focus file is stale — consider running update-focus"
- Distinctive: line 53
If > 5: warn "Many open loops — consider triaging"
- Distinctive: line 86
When context is high (>60%), include these reference tables in the output:
- Distinctive: line 112
When the context monitor fires a warning
- Distinctive: line 113
Before starting a large task (to check remaining capacity)
- Distinctive: line 114
After resuming a session (to verify state was preserved)
- Distinctive: line 115
When unsure if preservation hooks are working
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Status: Session Health Check
On-demand diagnostic showing context usage, preservation state, and open work items. Fast and lightweight — no vault queries.
What to Check
1. Context Usage Estimate (host-aware)
Use the active client's native context meter when it is exposed. A client adapter may provide a tool-call counter, but it is optional and must never be treated as shared memory. If no meter is available, report SKIPPED (client does not expose context telemetry); do not guess a percentage from conversation length.
Calculate:
- Tool calls so far
- Estimated percentage (calls / 150)
- Which thresholds have fired (from the
firedarray) - Time since last warning
2. Active Plan
Find the latest file in log/plans/:
- If found: show filename, first 3 lines, and whether it contains "APPROVED" or is still "DRAFT"
- If none: report "No active plan"
3. Latest Session Log
Find the latest non-compact .md file in log/ (skip files with -compact in the name):
- If found: show filename and first 3 lines
- If none: report "No session log found"
4. Focus Freshness
Check when .context/current-focus.md was last modified:
- Show the modification date
- If older than 3 days: warn "Focus file is stale — consider running
update-focus" - Show the first 5 lines (headline)
5. Preservation and Continuity
Verify the client-neutral continuity files first: applicable root guidance, .context/ai-handoff.md, .context/current-focus.md, latest approved plan, and portable memory index. Then read docs/reference/ai-surface-availability.md or run the staged AI-infrastructure doctor to report each client hook adapter as CONFIGURED, UNAVAILABLE, or NOT APPLICABLE. Missing optional lifecycle hooks are informational when the files-first layer is healthy.
6. Open Loops
Count unchecked items (- [ ]) in .context/current-focus.md:
- Report the count
- If > 5: warn "Many open loops — consider triaging"
Output Format
Present as a compact status panel:
## Session Health
| Metric | Value |
|--------|-------|
| Context usage | ~XX% (N/150 tool calls) |
| Thresholds fired | none / info / warning / critical |
| Active plan | filename (DRAFT/APPROVED) / none |
| Latest log | filename / none |
| Focus freshness | N days ago / stale warning |
| Open loops | N items |
### Preservation Hooks
| Hook | Status |
|------|--------|
| Files-first continuity | HEALTHY / DEGRADED |
| Current client lifecycle adapter | CONFIGURED / UNAVAILABLE / NOT APPLICABLE |
| Context telemetry | AVAILABLE / SKIPPED |
### Recommendations
[Only if there are issues — e.g., stale focus, missing hooks, high context usage]7. Compaction Guidance
When context is high (>60%), include these reference tables in the output:
When to compact:
| Phase Transition | Compact? | Why |
| Research to Planning | Yes | Research context is bulky; plan is the distilled output |
| Planning to Implementation | Yes | Plan is in a file; free up context for code |
| Implementation to Testing | Maybe | Keep if tests reference recent code |
| Debugging to Next feature | Yes | Debug traces pollute context |
| Mid-implementation | No | Losing file paths and partial state is costly |
| After a failed approach | Yes | Clear dead-end reasoning |
What survives compaction:
| Persists | Lost |
| CLAUDE.md / AGENTS.md + rules | Intermediate reasoning |
| Task list | File contents previously read |
MEMORY.md + .context/ | Multi-step conversation context |
| Git state | Tool call history |
| Files on disk | Verbal preferences |
.context/ai-handoff.md | — |
When to Use
- When the context monitor fires a warning
- Before starting a large task (to check remaining capacity)
- After resuming a session (to verify state was preserved)
- When unsure if preservation hooks are working
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

