context-shunt

context-shunt is a skill for Claude Code from alinaqi/maggy. It costs 28 tokens per session (574 once invoked), scanned A, original, MIT.

A file-reading helper that sends large or multi-file reading tasks to a cheaper worker model and returns a short summary. The original file contents stay out of the main agent’s working context.

In plain words
What is it for?
Use it to ask questions across large codebases, inspect many configuration files, or understand how a feature works without loading all the raw files.
Why use it?
It reduces the amount of text the main coding agent must process, while still helping it answer questions about many or large files. Summaries should not be used when every line is needed for an edit.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it to ask questions across large codebases, inspect many configuration files, or understand how a feature works without loading all the raw files.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/context-shunt"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/context-shunt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 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.00028 $0.00574
Opus 5 $0.00014 $0.00287
Sonnet 5 $0.00006 $0.00115
Haiku 4.5 $0.00003 $0.00057

Measured today against content hash e6ed6f09b6ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

context-shunt 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 today.

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-shunt/SKILL.md · 51 lines

What it actually says

Context Shunt — Read Cheap, Keep Context Small

Reading big files into context is the most expensive thing an agent does for the least reasoning value. The shunt hands those reads to a cheap worker model (bulk-read) that answers a question about the files and returns a compact summary. The raw bytes never enter this session's context.

This is orthogonal to whole-turn routing (srooter / route-task): those pick the model for the turn; the shunt trims what a tool call pulls into context when the turn is legitimately here.

Decision: read raw, shunt, or graph?

  • Editing this exact file — read it raw. You need every line; never edit against a summary.
  • A fact/answer across large or many filesbulk-read "<question>" file....
  • A code symbol (function/class/route)get_code_snippet(qualified_name): free and exact.
  • Small file (under threshold) you need in full — read it raw.

A shunt answer is for understanding, not for producing a diff.

Usage

bulk-read "how does token refresh work?" src/auth/session.ts src/auth/refresh.ts
bulk-read "which config keys are read at startup?" $(git ls-files 'config/*.yaml')

bulk-read prints structured bullets citing path:line, or NOT FOUND IN PROVIDED FILES. A token-savings report goes to stderr.

Configuration

Env vars or ~/.claude/shunt.conf (see templates/shunt.conf):

  • SHUNTon/off master switch for the PreToolUse hook.
  • SHUNT_MIN_LINES — large-read threshold (default 350).
  • SHUNT_MODEsuggest (default) / block / off for the hook's large-read action.
  • SHUNT_GRAPH_NUDGEon/off once-per-session graph nudge.
  • SHUNT_MODEL — worker command (default deepseek --flash; also gemini-api --flash-lite, qwen3, glm).

The context-shunt-gate PreToolUse hook enforces the thresholds; this skill tells you when to reach for bulk-read yourself.

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. today First seen · 51 lines · 28 tokens per session scan A e6ed6f09b6ec

Subscribe to this mod's changes

context-shunt is a skill published in the GitHub repository alinaqi/maggy (706 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 574 once invoked, about $0.0001 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-09-09.

Related

Other skills, from other repositories

report

Writes the session final report to a file, then prints only the path and a one-line summary. Fires when the prompt contains "Report per memstack:report", and also when the prompt begins with a standing trigger configured through MEMSTACKREPORTONTASKPROMPTS or MEMSTACKREPORTTRIGGERS. Dormant otherwise.

cwinvestments/memstack · 67 tokens

memstack-automation-n8n-workflow-builder

Use this skill when the user says 'n8n workflow', 'build a workflow', 'automation workflow', 'connect services', or needs visual workflow design with node mapping, data transformations, and error handling for n8n. Do NOT use for standalone webhook endpoints or cron jobs.

cwinvestments/memstack · 68 tokens

token-optimization

Use when the user says 'token optimization', 'save tokens', 'context window', 'reduce tokens', 'token stack', or 'TokenStack', or asks about extending context window capacity. Covers TokenStack, the built-in compression proxy that shrinks Claude Code tool output before it reaches the Anthropic API. Do NOT use for…

cwinvestments/memstack · 79 tokens

state

Use when the user says 'update state', 'project state', 'where was I', or at session start to load current context.

cwinvestments/memstack · 29 tokens

grimoire

Use when the user says 'update context', 'update claude', 'save library', or after significant project changes.

cwinvestments/memstack · 28 tokens

save-progress

Save current project task progress to local task state file for cross-session continuity. Use when the user asks to save progress, uses an equivalent localized trigger phrase, the session is interrupted, or the user wants to resume work later. Writes to .claude/project-task-state.json so next session can load it via…

KimYx0207/Meta_Kim · 65 tokens