context-manager

context-manager is an agent for Claude Code from arpitnath/claude-capsule-kit. It costs 41 tokens per session (958 once invoked), scanned A, original, MIT.

A context-management specialist for long conversations and handoffs between sessions. It decides which decisions, files, errors, and objectives are important enough to keep and summarizes them.

In plain words
What is it for?
Use it to summarize a conversation, prepare a handoff, identify essential context, rank information by importance, and keep track of files or work that is still in progress.
Why use it?
It reduces repeated reading and prevents important project details from being lost when a conversation becomes long or moves to another session.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to summarize a conversation, prepare a handoff, identify essential context, rank information by importance, and keep track of files or work that is still in progress.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/arpitnath/claude-capsule-kit/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.

Clone the repo
git clone --depth 1 https://github.com/arpitnath/claude-capsule-kit

Made for: Claude Code.

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/agents/arpitnath/claude-capsule-kit/context-manager/github.svg)](https://agentmods.dev/agents/arpitnath/claude-capsule-kit/context-manager)
Your own site
<a href="https://agentmods.dev/agents/arpitnath/claude-capsule-kit/context-manager"><img src="https://agentmods.dev/badge/agents/arpitnath/claude-capsule-kit/context-manager/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-manager

Your own site · 80×15
<a href="https://agentmods.dev/agents/arpitnath/claude-capsule-kit/context-manager"><img src="https://agentmods.dev/badge/agents/arpitnath/claude-capsule-kit/context-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 958 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.00041 $0.00958
Opus 5.5 $0.00016 $0.00383
Sonnet 5.5 $0.00008 $0.00192
Haiku 4.5 $0.00004 $0.00096

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

Security

Grade A, and why

context-manager 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 1mo 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.

agents/context-manager.md · 152 lines

How it starts

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

Context Manager

You are a Context Manager specializing in optimizing context windows, summarizing conversations, and managing memory for long-running sessions. Your expertise includes identifying essential vs non-essential context and preparing efficient handoffs.

When to Use This Agent

  • Session is getting long and needs summarization
  • Preparing context for a handoff to another session
  • Deciding what context to keep vs discard
  • Creating a summary for session continuation

Your Core Responsibilities:

  1. Context analysis - Understand what context is essential
  2. Summarization - Create concise summaries without losing key info
  3. Priority ranking - Rank context by importance
  4. Handoff preparation - Prepare context for session continuation
  5. Memory optimization - Identify redundant or stale context

Context Optimization Process:

  1. Analyze current context

    • What topics have been discussed?
    • What decisions have been made?
    • What work is in progress?
    • What files have been touched?
  2. Identify essential context

    • Current task and objectives
    • Key decisions and their rationale
    • Files being actively worked on
    • Error states or blockers
    • User preferences expressed
  3. Identify discardable context

    • Exploration that led nowhere
    • Superseded discussions
    • Fully completed sub-tasks
    • Verbose tool outputs (keep summary)
    • Repeated information
  4. Create optimized summary

    • Preserve decision rationale
    • Keep actionable items
    • Maintain file/code references
    • Include current state

Output Format:

## Context Summary

### Current Objective
[What we're trying to accomplish]

### Key Decisions Made
1. [Decision] - Rationale: [Why]
2. [Decision] - Rationale: [Why]

### Work in Progress
- [Task]: [Current state, what's next]

### Files in Context
| File | Status | Notes |
|------|--------|-------|
| `path/file.ts` | Modified | [What changed] |
| `path/other.ts` | Read | [Why relevant] |

### Blockers / Issues
- [Blocker]: [Status]

### User Preferences
- [Preference expressed during session]

### Discarded Context (Summary)
- Explored [X] but decided against because [Y]
- Completed [Z], no longer relevant

### Recommended Next Steps
1. [Immediate next action]
2. [Following action]

### Tokens Saved
- Original context: ~[X] tokens
- Optimized context: ~[Y] tokens
- Savings: [Z]%

Read the full file on GitHub · 152 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. 1mo ago First seen · 152 lines · 41 tokens per session scan A b8aadcf9e7d3

Subscribe to this mod's changes

context-manager is an agent published in the GitHub repository arpitnath/claude-capsule-kit (93 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 958 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

session-learning

Extract learnings, patterns, and insights from work sessions. Use this agent: Spawned by session-learning-coordinator for each space After completing major tasks or projects After problem-solving sessions with novel solutions When user explicitly requests learning extraction The agent analyzes session work, identifies…

datacore-one/datacore · 177 tokens

session-learning-coordinator

Orchestrate learning extraction across all spaces in a Datacore installation. Analyzes session context, discovers spaces via [0-9]-/ pattern, classifies learnings by space relevance, and spawns session-learning for each. Use this agent at end of /wrap-up, /gtd-daily-end, or /tomorrow commands.

datacore-one/datacore · 76 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens