Toolshrink — Development skill for Claude Code
Cut large agent tool output by what it means, not by where it was cut.
How to install Toolshrink
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open unclecode/toolshrink and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Toolshrink does
Cut large agent tool output by what it means, not by where it was cut. 13 content-aware reducers + DeepSeek Harness plugin.
Alternatives in Development
- IPolloWork — Enterprise-grade, local-first Agent Workbench for people and agent teams 4.9k ★
- Petdex — A public gallery of animated pets for Codex, Claude Code, DeepSeek Harness, Hermes, OpenCode, Gemini CLI, and 4k ★
- Oh My Agent — Portable multi-agent harness for .agents-based skills, workflows, and standards-aware agent teams across Antig 786 ★
README
toolshrink
**Cut large agent tool output by what it means, not by where it was cut.**
I use Claude Code every day, and I always wanted to intervene in how it manages context. In the early days you could edit the session JSONL directly. Then that door closed.
When DeepSeek open-sourced Harness, where everything is a plugin, I looked inside. Tool output there is cut by size: keep the head, keep the tail, drop the middle. I read Codex and pi, and they do the same. None of them look at what the text contains.
That fails in a predictable way. Your test suite prints 5,000 passing lines and 3 failures in the middle. A size cut keeps the passes and throws away the failures. The model reads it, believes the run, and answers wrong.
So I built the shrinker I always wished Claude Code had. It reads the output first, recognizes its shape, and keeps the part that carries the information:
input: a vitest run, 31,958 chars, 805 lines, budget 2,000 chars
head+tail cut: 1,904 chars the model learns: the summary
toolshrink: 255 chars the model learns: which test failed,
why, at which line, and the summary
Everything removed is counted in a marker the model can read, and the complete original is saved to disk with a locator. Nothing is lost silently.
The cuts
Each cut recognizes one shape of text. The first one that recognizes the input runs. When none does, the size fallback runs, so the result always fits the budget.
| Cut | Recognizes | Keeps | Drops |
|---|---|---|---|
diff |
git diff, patches | changed lines, file and hunk headers, 1 context line each side | unchanged context |
json |
one JSON value | the structure, 3 samples per long array, 5 keys per wide object, counts | repeated records |
tests |
vitest, jest, pytest, cargo test, go test | failures with their explanation, the summary | passing tests |
build |
tsc, cargo, gcc, webpack, esbuild | errors and warnings with their code frame, |
Related Skills
Pivot Web Search
Resilient multi-provider web search & content extraction for Claude Code, DeepSeek Harness, and any MCP host —
Deepseek Harness Token Saver
🔥 Cut 91% of tokens, lose zero capability 省 91% token · 能力零损失 — Scope DSH skill catalogs & MCP tool schemas p
Dsh Shell Command
DeepSeek Harness (DSH) plugin: a /! command trigger (run one command, analyze output, inspired by Claude Code'
Toonify MCP
Context compression plugin for Claude Code. Automatically trims large tool output—JSON, YAML, stack traces, an
Usagetrim
Keep the signal. Cut the noise. Local CLI + MCP — fold verbose tool output for Claude Code, Codex, Cursor & De
Keen Code
A context-aware terminal-based coding agent written in Go. Supports multiple-providers, MCPs, Subagents, Agent
Related Agents
Ds Flash
DSH (DeepSeek Harness) worker on the flash tier - fast and cheap. Delegate simple, well-scoped subtasks: mecha
Harness Eng
Use for every build task on a deepseek-harness core — one layer per claimed packet, gated by hedgehog verify.
Muse Rescue
Use as the second agentic lane, right after DeepSeek Harness, for bounded coding tasks such as a spec, rename,