From father-time
Check your current session's health — real context usage from JSONL token data, compaction proximity, session weight, and rate limit status. Use when asking about session size, compaction, context window, or rate limits.
How this skill is triggered — by the user, by Claude, or both
Slash command
/father-time:session-healthThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Show the user real session health data — not estimates. Parse actual token counts from the JSONL transcript.
Show the user real session health data — not estimates. Parse actual token counts from the JSONL transcript.
For current session only:
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --current
For all sessions:
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py"
For a specific project:
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" "project-name-fragment"
When invoked directly (not via time-menu), ask the user first with AskUserQuestion: Question: "Which sessions?" Header: "Health" Options:
To override the compaction threshold (default 1M):
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --threshold 800000
Combined:
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --threshold 800000 "project-name-fragment"
For structured output (programmatic consumption — preferred when you need to extract specific fields rather than display them):
python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --format json --current
Run python "${CLAUDE_PLUGIN_ROOT}/scripts/session_health.py" --help for the full flag and exit-code reference.
The script parses JSONL transcripts and reads actual usage blocks from API responses to get:
input_tokens + cache_read_input_tokens + cache_creation_input_tokens from the last assistant turn = actual context window sizecompact_boundary markers existThe JSONL contains usage data on every assistant message:
"usage": {
"input_tokens": 42,
"output_tokens": 1500,
"cache_read_input_tokens": 450000,
"cache_creation_input_tokens": 2000
}
Real context size = input_tokens + cache_read + cache_creation from the last turn. This is the actual number of tokens sent to the API, which equals the current context window usage.
The default context window is 1M (Opus 4.6), but compaction may trigger earlier depending on the user's settings.
--thresholdNo guessing. No heuristics. Real numbers from the API.
Different users have different compaction thresholds. If the user tells you their compaction threshold (e.g., "my compaction is at 800K"), pass it via the --threshold flag. If they don't specify, use the default (1M).
Ask the user for their threshold if the percentages seem off or if they mention their numbers don't match.
| Context % | Risk | Action |
|---|---|---|
| < 30% | Low | All clear |
| 30-60% | Moderate | Healthy, keep going |
| 60-80% | High | Consider checkpointing |
| 80%+ | Imminent | Checkpoint NOW, compaction incoming |
Present ALL data from the script output in a table. Include every field — do not omit anything:
| Project | JSONL | Context | Risk | Compactions | Turns | Cache | Tokens |
|---|
Then show rate limits below the table if available. Follow with recommendations if anything needs attention.
npx claudepluginhub afterrealm/marketplace --plugin father-timeReports Claude context window token utilization, consumption breakdown, health status, and optimization recommendations. Use before complex tasks to ensure headroom.
Audits session context weight in Claude Code — estimates tokens from CLAUDE.md, agents, MCP descriptions, rules, skills, and conversation history, reports headroom, and alerts on overflow.
Manages context window in long Claude Code sessions: detects limits via tool counts, triggers smart compaction, preserves critical state, injects dev/research/review behavioral modes.