context-management

context-management is a skill for Claude Code from brunob54/superpowers-orchestrator. It costs 78 tokens per session (2,676 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: mentions CLAUDE.md; mentions Claude Code.

Part of the superpowers-orchestrator plugin — 28 skills, 2 agents, 6 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 28 skills, 2 agents, 6 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 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,676 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.00078 $0.02676
Opus 5 $0.00039 $0.01338
Sonnet 5 $0.00016 $0.00535
Haiku 4.5 $0.00008 $0.00268

Measured 9d ago against content hash c9f8ede100e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

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 · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 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
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 persistencestate.md preserves decisions and progress for the current task when a session ends mid-work.
  2. Accumulated project memorysession-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 "<keyword1>" session-log.md | tail -20
grep -i "<keyword2>" session-log.md | tail -20

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 · 212 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. 9d 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 3d ago), licensed MIT. It adds 78 tokens to every session and 2,676 once invoked, about $0.0004 per session on Opus 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.