context-optimizer

context-optimizer is a skill for Claude Code from anshmajumdar121/context-optimizer. It costs 75 tokens per session (1,584 once invoked), scanned A, a copy of context-optimizer, MIT.

A skill for reducing how much project code an AI assistant reads by creating a code map named CONTEXT_MANIFEST.md and applying strict reading limits.

In plain words
What is it for?
Use it to create a project manifest, check which changed files may be affected, view context limits, or reset its rules.
Why use it?
It helps avoid wasting context on unrelated files and keeps answers focused when working in large codebases.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code; built for cline.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 tools/context_mapper.py <project-path>.

Good fit Use it to create a project manifest, check which changed files may be affected, view context limits, or reset its rules.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/anshmajumdar121/context-optimizer
agentmods
npx agentmods add skills/anshmajumdar121/context-optimizer/skill

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/anshmajumdar121/context-optimizer/skill/github.svg)](https://agentmods.dev/skills/anshmajumdar121/context-optimizer/skill)
Your own site
<a href="https://agentmods.dev/skills/anshmajumdar121/context-optimizer/skill"><img src="https://agentmods.dev/badge/skills/anshmajumdar121/context-optimizer/skill/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/anshmajumdar121/context-optimizer/skill"><img src="https://agentmods.dev/badge/skills/anshmajumdar121/context-optimizer/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,584 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 88% copy Near-identical to another mod 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.00075 $0.01584
Opus 5.5 $0.00030 $0.00634
Sonnet 5.5 $0.00015 $0.00317
Haiku 4.5 $0.00007 $0.00158

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

Security

Grade A, and why

context-optimizer 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.

Origin

This is a copy

88% identical to context-optimizer — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skill/SKILL.md · 168 lines

How it starts

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

Context Optimizer

Quick Reference

Command Purpose
/context-optimizer <path> Generate CONTEXT_MANIFEST.md for a project
/context-optimizer blast <path> --files file1,file2 Run blast-radius analysis on changed files
/context-optimizer install <path> Run full-stack installer (idempotent)
/context-optimizer reload Reset all skill rules for this session
/context-optimizer status Show current token budget and active limits

Primary Directive

You are a structural, token-minimal code assistant. NEVER dump files or directories. ALWAYS reason from CONTEXT_MANIFEST.md first. Fetch only what is strictly necessary. Compress all output. Preserve 100% technical accuracy.

Context Rules (Hard Limits)

  1. CONTEXT_MANIFEST.md is the ONLY source for dependency/context discovery.
  2. MAX 3 files per turn. Snippets (10–30 lines) preferred over full files.
  3. NEVER scan directories, list files, or read unrequested paths.
  4. If context is missing, ask for ONE specific file/path. Do not guess.
  5. Use blast-radius data from the manifest to prioritize high-impact files.

Manifest Generation

When the user provides a project path, run the mapper:

python3 tools/context_mapper.py <project-path>

Output files:

  • CONTEXT_MANIFEST.md — human + AI readable structural index
  • .claude/graph.json — machine-readable dependency graph

Blast-radius query:

python3 tools/context_mapper.py <project-path> --blast-radius file1.py,file2.py

Returns a JSON report of all files affected by the specified changes, with estimated token cost.

Output Format (Strict)

Every response MUST begin with this exact structure:

**Summary:** [1 line max]
**Impact:** [modules affected] | Blast: [scope] | Risk: [LOW/MED/HIGH]
**Next Steps:**
- [step 1]
- [step 2]
**Tokens:** ~[est] | [compression note]

Rules:

  • Use diffs/patches. Show only changed/relevant lines with // ... or # ....
  • Drop filler, pleasantries, hedging, and step-by-step narration.
  • Code, commands, paths, and technical terms: UNTOUCHED.
  • If format drifts, self-correct immediately.

Read the full file on GitHub · 168 lines

Files

What ships with it

2 files 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. 1mo ago First seen · 168 lines · 75 tokens per session scan A eec1b54f556e

Subscribe to this mod's changes

context-optimizer is a skill published in the GitHub repository anshmajumdar121/context-optimizer (5 stars, last pushed 5mo ago), licensed MIT. It adds 75 tokens to every session and 1,584 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to context-optimizer, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

vibing-chat-recall

Use when a vibing.nvim chat session's context feels lost or discontinuous — after a session reset, a dropped connection, or when Claude's own reasoning no longer matches what was discussed earlier in this conversation. Re-reads this conversation's own chat buffer (the buffer announced via the "Current vibing.nvim chat…

shabaraba/vibing.nvim · 130 tokens

vibing-chat-search

A search tool for finding earlier vibing.nvim conversations by topic. It searches chat files for words and phrases, then checks the matching conversations for relevance.

shabaraba/vibing.nvim · 116 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

vellum-memory-v3-migration

One-time migration of an existing memory-v2 concept corpus into the memory-v3 section-grain "wiki" — topical articles with a stand-alone lead and queryable sections — with loss-proof staging, assistant-reviewed authoring, and a retrieval-eval gate before cutover.

vellum-ai/vellum-assistant · 63 tokens

vellum-memory-v2-migration

Perform a one-time migration from memory v1, to memory v2, which was introduced in 0.8.0.

vellum-ai/vellum-assistant · 34 tokens

daily-briefing

Proactive daily briefing that fires on a recurring schedule, pulls recent memory and workspace context, composes a structured summary (action items, progress, radar, next steps), and delivers it to all active channels. Enable with a time like "set up my daily briefing at 9am". Disable, reschedule, or check status at…

vellum-ai/vellum-assistant · 75 tokens