context-management

context-management is a skill for Claude Code from brunob54/superpowers-orchestrator. It costs 84 tokens per session (4,204 once invoked), scanned A, original, MIT.

A skill for preserving useful project context across sessions in files such as state.md, session-log.md, and project-map.md. A project map describes the structure and important parts of a codebase.

In plain words
What is it for?
Use it to save task state, record durable project history, map a project, or prepare a handoff for later work.
Why use it?
It prevents important decisions and progress from being lost when a long task continues in another session.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the superpowers-orchestrator plugin — 32 skills, 2 agents, 5 hooks shipped together

Good fit Use it to save task state, record durable project history, map a project, or prepare a handoff for later work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/brunob54/superpowers-orchestrator/context-management
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 brunob54/superpowers-orchestrator --skill context-management
Clone the repo
git clone --depth 1 https://github.com/brunob54/superpowers-orchestrator

Made for: Claude Code.

Or install superpowers-orchestrator, the plugin that ships this one along with the rest of its 32 skills, 2 agents, 5 hooks.

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-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/brunob54/superpowers-orchestrator/context-management/github.svg)](https://agentmods.dev/skills/brunob54/superpowers-orchestrator/context-management)
Your own site
<a href="https://agentmods.dev/skills/brunob54/superpowers-orchestrator/context-management"><img src="https://agentmods.dev/badge/skills/brunob54/superpowers-orchestrator/context-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/brunob54/superpowers-orchestrator/context-management"><img src="https://agentmods.dev/badge/skills/brunob54/superpowers-orchestrator/context-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,204 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00084 $0.04204
Opus 5.5 $0.00034 $0.01682
Sonnet 5.5 $0.00017 $0.00841
Haiku 4.5 $0.00008 $0.00420

Measured 26d ago against content hash cb8d69596b54, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-management scanned grade A with 0 findings 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 26d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/archive-session-log.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/context-management/SKILL.md · 231 lines

How it starts

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

Context Management

Route first — read this before anything else

User said Go to
"map this project" / "generate project map" / "create project map" / "update project map" Project Map section
"save state" / "compress context" / session ending with ongoing work Procedure section
"archive the session log" session-log.md Format and Maintenance section
Starting a task on a project with existing history Grep session-log.md first, then proceed

Do not default to state.md for a map request. Do not default to project-map.md for a save-state request.


Purpose

Claude Code automatically compresses context within a session. This skill has two complementary responsibilities:

  1. Cross-session persistence — state.md preserves decisions and progress for the current task when a session ends mid-work.
  2. Accumulated project memory — session-log.md builds a searchable history of decisions, rejected approaches, and hard-won facts across sessions. Written manually via this skill — only when there is something worth preserving.

When to Use

  • User explicitly asks to save state or compress context
  • Work will continue in a new session and progress must be preserved
  • Complex multi-step task has significant accumulated decisions/evidence
  • Starting a new task on a project with existing history — grep the log first
  • Repeated failures suggest the session has accumulated stale/conflicting context

Procedure

At the start of any non-trivial task

Before diving in, grep session-log.md for history relevant to the current task.

Step 1 — Extract keywords. Take the 2-3 most distinctive nouns from the task description. Avoid generic words ("fix", "update", "file") — use domain nouns ("hook", "auth", "deploy", "staleness").

Step 2 — Grep each keyword individually first:

grep -i -a "<keyword1>" session-log.md | tail -20
grep -i -a "<keyword2>" session-log.md | tail -20

The option -a makes grep read the file as text: without it, the grep of the Claude Code Bash tool prints nothing for a file that holds a byte that is not valid UTF-8 (Unicode Transformation Format, 8-bit). One case remains: the grep of macOS misses a keyword that stands after such a byte on the same line. Check the hit count before reading results. This tells you whether to narrow or widen before committing to any output.

Read the full file on GitHub · 231 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 26d ago Changed · +1 lines cb8d69596b54
  2. 27d ago Changed · +3 lines · +6 tokens per session 18705bf01f75
  3. 29d ago Changed 8b15a4cf10a0
  4. 1mo ago Changed · +15 lines 9049b030c967
  5. 2mo ago First seen · 212 lines · 78 tokens per session scan A c9f8ede100e2

Subscribe to this mod's changes

context-management is a skill published in the GitHub repository brunob54/superpowers-orchestrator (3 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 4,204 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.