| name | get-my-context |
| description | Reports the current Claude Code context window usage. Use when the user asks how full your context is, how much room is left, or whether to compact — and use proactively before starting a long-horizon task (multi-file refactor, extended debugging, multi-step plan) to decide pacing. Returns used percentage, remaining percentage, token counts, and active model. |
| allowed-tools | Bash(bash *) |
Current context window status
!bash "${CLAUDE_SKILL_DIR}/get-context.sh" "${CLAUDE_SESSION_ID}"
Treat the line above as ground truth for this session. Report it directly when asked, or use it to decide whether to start new work, wrap up, or suggest /compact. Do not estimate or hedge.
If the reading looks miscalibrated, fix it for the user
The script defaults to a 200,000-token window because plan info isn't exposed to skills. If the active model is a 1M-context variant (model id ends in [1m], or the user has stated they're on Max/Team/Enterprise with Opus, or any other 1M-eligible setup), the reading will be ~5× too high.
Your job is to detect this and fix it for the user, not to make them do it.
When you detect a mismatch:
- Recompute the percentage against 1M and report the corrected number for this turn (e.g. "the script reads 50% on a 200k denominator, but you're on a 1M model — actual usage is ~10%").
- Tell the user you can save the calibration so future invocations are correct without recomputing, and ask for confirmation.
- On confirmation, run:
echo 1000000 > "${CLAUDE_SKILL_DIR}/window.conf"
- Future invocations will read this file and report against 1M directly.
Detection signals (any one is enough; the first is usually the strongest):
- Your own system prompt tells you which model variant you are running. If it identifies you as Opus 4.7/4.6 1M context or Sonnet 4.6 1M context, the script's 200k default is wrong — you are on 1M. (The transcript only records the bare model id like
claude-opus-4-7, no [1m] suffix, even when 1M is active via Max/Team/Enterprise auto-upgrade — so the script can't see this, but you can.)
- The model id in the script output literally ends in
[1m] (Pro/API explicit-suffix case).
- The user has stated their plan in this conversation (e.g. "I'm on Max", "Opus 1M").
- A previous turn established the plan and you remember it from context.
Do not write window.conf preemptively. Only after the user confirms. The 200k default is correct for API users, Pro without [1m], and any model with no 1M variant — so don't assume 1M without a positive signal.