context-manager

context-manager is a skill for Claude Code from RockaRhymeLLC/claude-code-skills. It costs 64 tokens per session (1,270 once invoked), scanned B, original, MIT.

A coding-agent skill that monitors how much conversation space remains and saves or restores work state. The context window is the limited amount of project information the agent can keep available at once.

In plain words
What is it for?
It is for checking context usage, saving task state before the conversation is compressed, and restoring that state during long development tasks.
Why use it?
It reduces lost progress when a long task fills that space or the agent needs to restart.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the bmobot-skills plugin — 7 skills shipped together

Good fit It is for checking context usage, saving task state before the conversation is compressed, and restoring that state during long development tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rockarhymellc/claude-code-skills/context-manager
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RockaRhymeLLC/claude-code-skills --skill context-manager
Clone the repo
git clone --depth 1 https://github.com/RockaRhymeLLC/claude-code-skills

Made for: Claude Code.

Or install bmobot-skills, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/rockarhymellc/claude-code-skills/context-manager.svg)](https://agentmods.dev/skills/rockarhymellc/claude-code-skills/context-manager)
Your own site
<a href="https://agentmods.dev/skills/rockarhymellc/claude-code-skills/context-manager"><img src="https://agentmods.dev/badge/skills/rockarhymellc/claude-code-skills/context-manager.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,270 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01270
Opus 5 $0.00032 $0.00635
Sonnet 5 $0.00013 $0.00254
Haiku 4.5 $0.00006 $0.00127

Measured 8d ago against content hash 6678bc884924, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

context-manager scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/state/context-usage.json 2>/dev/null
skills/context-manager/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Manager

Prevent information loss when your Claude Code context window fills up. Automatically tracks usage, saves state, and restores after restart.

When to Activate

  • User says /ctx or /ctx save or /ctx check
  • User asks about context usage or remaining space
  • User is working on a long task that might exhaust context
  • Before starting a large task (reading many files, big implementation)

The Problem

Claude Code has a finite context window. When it fills up:

  • The system compresses earlier messages (lossy)
  • You lose working state, partial progress, and nuanced context
  • Multi-step tasks break halfway through
  • You repeat work you already did

Instructions

/ctx check — Check Current Usage

Read the context-usage.json file (updated by Claude Code hooks):

cat .claude/state/context-usage.json 2>/dev/null

Report to the user:

  • Green (>60% remaining): Plenty of room. Work freely.
  • Yellow (40-60% remaining): Getting warm. Save state before starting big tasks.
  • Red (<40% remaining): Save state now. Consider restarting before continuing.

If no tracking file exists, guide setup (see Setup section).

/ctx save — Save Current State

Capture everything needed to resume after a restart:

  1. Create state file at .claude/state/assistant-state.md:
# Assistant State

**Saved**: {ISO timestamp}
**Reason**: {why saving — manual save, low context, task checkpoint}

## Current Task
{What you're working on right now}

## What's Done
{Completed steps, with file paths and commit hashes}

## What's Next
{Remaining steps, in order}

## Key Context
{Important facts that would be lost — variable names, design decisions,
 user preferences expressed during this session, error messages that
 led to the current approach}

## Open Files
{Files currently being worked on, with relevant line ranges}
  1. Confirm save — tell the user what was captured

/ctx restore — Restore After Restart

At session start, check for saved state:

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 178 lines · 64 tokens per session scan B 6678bc884924

Subscribe to this mod's changes

context-manager is a skill published in the GitHub repository RockaRhymeLLC/claude-code-skills (1 stars, last pushed 6mo ago), licensed MIT. It adds 64 tokens to every session and 1,270 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

self-improve

Extract lessons from the current session, or sweep the project's past sessions when asked, and route them to the appropriate knowledge layer (project AGENTS.md, auto memory, existing skills, or new skills). Use when the user asks to "self-improve", "distill this session", "distill past sessions", "sweep past…

tobihagemann/turbo · 125 tokens

recall-reasoning

Recall the reasoning behind a past change by locating the Claude Code transcript that produced it. Use when the user asks to "recall reasoning", "find reasoning", "look up reasoning", "recall implementation reasoning", "find the rationale", "why did I do X", "recall from transcripts", or "find the transcript for this…

tobihagemann/turbo · 76 tokens

memory-hygiene

A manual tool for sorting saved session memories into Hot, Warm, and Cold groups, and finding memories that may be moved or retired.

HsuanYuLee/polaris · 164 tokens

session-manager

A fallback skill for recording development sessions and restoring project context from an Obsidian vault, a folder of linked notes. It handles explicit resume, handoff, status, and end-of-session requests when automatic capture is unavailable.

Enakoneschniy/claude-dev-stack · 108 tokens

cds-stats

Show project memory statistics: session count, observation counts by type, entity count, top entities, and project planning status.

Enakoneschniy/claude-dev-stack · 29 tokens

cds-search

Search past session observations using the sessions.search MCP tool. Falls back to CLI if the MCP server is not available.

Enakoneschniy/claude-dev-stack · 27 tokens