Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add kochetkov-ma/claude-brewcode/plugin install brewtoolsWrote 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.
[](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/context-slim)<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/context-slim"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/context-slim/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.
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/context-slim"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/context-slim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00069 | $0.05203 |
| Opus 5.5 | $0.00028 | $0.02081 |
| Sonnet 5.5 | $0.00014 | $0.01041 |
| Haiku 4.5 | $0.00007 | $0.00520 |
Grade A, and why
context-slim 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.
How it starts
The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Slim
Cuts the size of potential context sources with three levers — cross-layer dedup,
default-knowledge removal, deep per-file compression. Every exact value, key, path, pin and
non-default instruction survives byte-exact or acceptance fails. Orchestration only: every
decision rule lives in references/, read at the phase that needs it.
Prompt contract
$ARGUMENTS is one free-form RU/EN prompt; mode tokens and flags (--target=N%, --global,
--memory, --noask) may sit anywhere in it.
- Mode: an explicit mode token wins outright; else the most distinct whole-word keyword hits
(table below). Tie with a destructive mode ->
AskUserQuestion; withmeasure->measure; of two mutating modes -> the keyword that comes first. No hit or empty ->measure. - Scope: prose that is not a mode/path is still input: take the target, the ratio and the layer from
it (
сожми контекст на 40%, глобальный тоже-> modeslim,--target=40%,--global). - Ask: at most ONE
AskUserQuestion(max 4 questions) to resolve mode and scope, before any work, only when the answer changes what gets written. A read-only run asks nothing.
Print once, before the first action (labels literal, INPUT verbatim, authored values follow the active work-artifact language policy):
PLAN — brewtools:context-slim
INPUT: <arguments verbatim, or "(empty)">
MODE: <resolved> — <explicit | matched keyword: X | default>
SCOPE: <resolved roots / tiers / flags>
DO: <2-5 imperative bullets>
RESULT: <what the user ends up holding>
Modes
| Mode | EN keywords | RU keywords | Mutates? |
|---|---|---|---|
measure |
(empty), measure, status, show, how much, weigh |
замер, статус, покажи, сколько |
no |
preview |
preview, dry run, what would, plan |
превью, посмотри, что будет |
no |
slim |
slim, compress, squeeze, dedupe, clean |
сожми, ужми, почисти, дедуп |
yes |
hard |
hard, aggressive, more, deeper, still too big |
жёстко, сильнее, ещё, агрессивно |
yes, destructive |
bodies |
bodies, skill bodies, skills, references |
тела, скиллы, референсы |
yes |
restore |
restore, rollback, undo, revert |
восстанови, откати, верни |
yes, destructive |
What ships with it
15 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.
- README.md 2.4 KB
- references/contradiction-policy.md 6.5 KB
- references/dedup-arbitration.md 14 KB
- references/drop-catalog.md 17 KB
- references/keep-catalog.md 9.3 KB
- references/language-policy.md 2.6 KB
- references/mcp-advice.md 4.0 KB
- references/measurement.md 9.4 KB
- scripts/context-guard.sh 29 KB runs code
- scripts/context-scan.sh 10 KB runs code
- tests/run.sh 919 B runs code
- tests/suite-fixtures.mjs 1.6 KB runs code
- tests/suite-guard.mjs 16 KB runs code
- tests/suite-policy.mjs 1.6 KB runs code
- tests/suite-scan.mjs 12 KB runs code
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.
- 1mo ago Changed · +1 lines a28a482b8eea
- 1mo ago Changed · -50 lines 5bd52b7d0174
- 2mo ago Changed · +34 lines · -3 tokens per session 48b1553060ab
- 3mo ago First seen · 384 lines · 72 tokens per session scan A c0801d2ac203
context-slim is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (41 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 5,203 once invoked, about $0.0003 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.
context-slim compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| context-slimkochetkov-ma/claude-brewcode | Skill | 41 | yesterday | MIT | A | 69 | Claude Code |
| fresh-startegorfedorov/claude-context-optimizer | Skill | 137 | 7d ago | MIT | A | 60 | Claude Code |
| doc-digestegorfedorov/claude-context-optimizer | Skill | 137 | 7d ago | MIT | A | 75 | Claude Code |
| project-contextegorfedorov/claude-context-optimizer | Skill | 137 | 7d ago | MIT | A | 81 | Claude Code |
| token-checkegorfedorov/claude-context-optimizer | Skill | 137 | 7d ago | MIT | A | 66 | Claude Code |
| brain-logtoroleapinc/claude-brain | Skill | 96 | 5mo ago | MIT | B | 10 | Claude Code |
| session-historyalivecontext/alive | Skill | 132 | 13d ago | MIT | A | 74 | Claude Code |