Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pedrohcgs/claude-code-my-workflow --skill context-status -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/context-status/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/context-status/

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

Similar skills

SKILL.md skills catalog →

From the same set27

diagnose Walks a failing run from a stable reproduction to a minimal example, ranked hypotheses and a fix. Built for research code. CX Codex +1 ★ 1,671repo stars deploy This skill renders Quarto slides as HTML and syncs the output to docs/ for GitHub Pages. Use it when edited slides are ready to publish. CX Codex +1 ★ 1,671repo stars deep-audit Splits a theory, proof, paper or codebase into components, fans out independent skeptics and fixes every confirmed defect. Built for when one review pass is not enough. CX Codex +1 ★ 1,671repo stars credible-claims A skill for delegated and AI-assisted research: write the brief before the run, the claim record after. Keeps fast execution from passing as credible evidence. CX Codex +1 ★ 1,671repo stars compress-session This skill turns the current conversation into a structured note with decisions, open questions and next steps before auto-compaction eats the context. CX Codex +1 ★ 1,671repo stars commit Runs quality, consistency and passport gates, branches off main, stages named files, and writes a commit whose subject states what now holds true. CX Codex +1 ★ 1,671repo stars coauthor-brief Writes a Markdown handoff brief so a co-author can see what changed, where each artifact stands, and how to run the project on their own machine. CX Codex +1 ★ 1,671repo stars capture-environment This skill snapshots language and package versions, seeds and RNG kind into lockfiles so a rerun matches on another machine. Reach for it before releasing a replication package. CX Codex +1 ★ 1,671repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor