context-status — Claude Code skill: session status and setup
This skill checks estimated context use, the active plan, and session preservation. Use it to see what may remain after compaction.
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a claude-codeWhat context-status does
The skill checks the context estimate, looks for an active plan in quality_reports/plans/, and finds the latest session log in quality_reports/session_logs/. It also reports whether pre- and post-compaction hooks are configured and what session state is set to be preserved.
The estimate comes from session monitoring files and may rely on transcript size or tool-call count. It is approximate; Claude Code’s built-in /context command shows exact usage. Claude Code triggers compaction automatically, while plans, logs, and MEMORY.md are saved on disk.
The workflow uses Bash commands and file reads; editing tools are disallowed. It reports the current session without changing its state.
What it helps with
- estimate how much context the session has used
- locate the active plan and check its status
- find the latest session log
- check whether session preservation hooks are configured
Example prompts for the agent
- Check this session’s estimated context use and whether auto-compact is near.
- Find the active plan and report its current unfinished task.
- Tell me what session state will be preserved during compaction.
How to install context-status
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a claude-code2Manually: put the files in place
~/.claude/skills/context-status/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/context-status/
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a codex2Manually: put the files in place
.agents/skills/context-status/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a cursor2Manually: put the files in place
.cursor/skills/context-status/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pedrohcgs/claude-code-my-workflow context-status2Manually: put the files in place
.github/skills/context-status/SKILL.md1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a gemini-cli2Platform CLI
gemini skills install https://github.com/pedrohcgs/claude-code-my-workflow --path .claude/skills/context-statusManually: put the files in place
.devin/skills/context-status/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about context-status
How do I install context-status in Claude Code?
Run npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a claude-code. The skill file is placed at ~/.claude/skills/context-status/SKILL.md.
What does context-status do?
It reports estimated context use, the active plan, the latest session log, and preservation hook status. Use /context for exact context usage.
How accurate is the context usage estimate?
It is an approximation based on transcript size or tool-call count. Claude Code’s built-in /context command gives the exact usage.
Source text
SKILL.md · MIT
---
name: context-status
description: |
Show current context status and session health.
Use to check how much context has been used, whether auto-compact is
approaching, and what state will be preserved.
allowed-tools: ["Read", "Bash", "Glob"]
disallowed-tools: ["Edit", "MultiEdit"]
metadata:
author: Claude Code Academic Workflow
version: 1.0.0
---
# /context-status — Check Session Health
Show the current session status including context usage estimate, active plan,
and preservation state.
## What This Skill Shows
1. **Context usage estimate** — Approximate % of context window used
2. **Active plan** — Current plan file and status
3. **Session log** — Most recent session log
4. **Preservation state** — What will survive compaction
## Workflow
### Step 1: Check the Context Estimate
The context-monitor hook writes its estimate to `context-pct.txt` (and its counters and threshold flags to `context-monitor-cache.json`) in this project's session directory:
```bash
d=~/.claude/sessions/$(printf '%s' "${CLAUDE_PROJECT_DIR:-$PWD}" | python3 -c 'import sys,hashlib;print(hashlib.md5(sys.stdin.read().encode()).hexdigest()[:8])')
cat "$d/context-pct.txt" 2>/dev/null; cat "$d/context-monitor-cache.json" 2>/dev/null | head -20
```
### Step 2: Find Active Plan
```bash
ls -lt quality_reports/plans/*.md 2>/dev/null | head -3
```
### Step 3: Find Session Log
```bash
ls -lt quality_reports/session_logs/*.md 2>/dev/null | head -1
```
### Step 4: Report Status
Format the output:
```
📊 Session Status
─────────────────────────────────
Context Usage: ~XX% (estimated)
Auto-compact: [approaching | not imminent]
📋 Active Plan
File: quality_reports/plans/YYYY-MM-DD_description.md
Status: [draft | approved | in_progress | completed]
Task: [current unchecked task or "none"]
📝 Session Log
File: quality_reports/session_logs/YYYY-MM-DD_description.md
✓ Preservation Check
• Pre-compact hook: [configured | missing]
• Post-compact restore: [configured | missing]
• Session state will be saved before compaction
```
## Notes
- Context % comes from Claude Code's own `context_window.used_percentage` where the status line shows it; the hook's `context-pct.txt` holds an estimate from transcript size (falling back to a tool-call count). The built-in `/context` shows exact usage
- Actual compaction is triggered by Claude Code automatically
- All important state is saved to disk (plans, logs, MEMORY.md)
© Claude Code Academic Workflow · MIT · pedrohcgs/claude-code-my-workflow