context-manager

context-manager is an agent for coding agents 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

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.

agentmods
npx agentmods add agents/arpitnath/claude-capsule-kit/context-manager
Clone the repo
git clone --depth 1 https://github.com/arpitnath/claude-capsule-kit

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00041 $0.00958
Opus 5 $0.00020 $0.00479
Sonnet 5 $0.00008 $0.00192
Haiku 4.5 $0.00004 $0.00096

Measured 3d ago against content hash b8aadcf9e7d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 (88 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 958 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

codebase-mapper

Use proactively when a task needs local repository structure, entry points, ownership, data flow, or change-surface mapping before a decision. Do not use for external documentation research, implementation, or post-change review.

zebbern/claude-code-guide · 47 tokens

security-reviewer

Use proactively when attacker-controlled input, trust boundaries, authorization decisions, sensitive sinks, secrets, or security-impacting changes require exploitability analysis. Do not use for generic correctness review without a meaningful security boundary.

zebbern/claude-code-guide · 45 tokens

solution-architect

Use when established requirements and evidence leave multiple viable designs or cross-component boundaries that need explicit trade-offs before implementation. Do not use for a small specified fix or while the root cause is still unknown.

zebbern/claude-code-guide · 43 tokens

orchestrator

Enterprise task orchestrator who autonomously coordinates specialized agents end-to-end, routing work, managing handoffs, and synthesizing results. Classifies complexity, triages delegation, and sequences workflows. Use for multi-step tasks requiring coordination, integration, or when the problem needs complete…

rjmurillo/ai-agents · 63 tokens

security

Security specialist with a defense-first mindset. Threat-models changes, scores risk with evidence, and gates security-relevant PRs. Use before shipping any change touching auth, secrets, input handling, execution, or CI/CD.

rjmurillo/ai-agents · 47 tokens

merge-resolver

Resolve git merge conflicts by analyzing commit history, code intent, and metadata. Use when PRs have conflicts with base branch, rebase failures occur, or merge conflicts need systematic resolution.

rjmurillo/ai-agents · 41 tokens