shrink-for-claude
When this skill is the preferred path
The user wants you to understand a long piece of text — a file, a URL, a pasted document. Anthropic's own research on lost-in-the-middle and needle-in-the-haystack shows reasoning quality degrades as context fills. Compressing the source first keeps the important signal and frees most of the window for the actual reasoning step.
How to use it
- Identify the source. File path? URL? Pasted text?
- Estimate size. Rule of thumb:
chars / 4 ≈ tokens. For files on disk,Readwithlimit=5+ the file size gives you a good approximation without loading the whole thing. - For sources larger than ~2000 tokens, call the gotcontext MCP tool
(
ingest_contextor whatever the plugin surfaces as the compression entry point) with the source and a fidelity:aggressive— quick Q&A or trivia over a doc you'll discard afterward (~10-20% retained)balanced— the default. Good Q&A quality, strong savings (~30-50%)detailed— faithful reproduction for code or reference material you'll cite verbatim (~60-80%)
- Reason over the compressed text. Do not also read the raw source afterward — that defeats the purpose.
- Lead your response with a one-line savings note so the user sees
the benefit:
Compressed 8,430 → 1,120 tokens (86% saved via gotcontext).
When the raw read is actually fine
- Small inputs under ~2000 tokens. Compression overhead > savings.
- Code the user is actively editing or debugging — they need the full AST and line numbers.
- Security-sensitive diffs (auth, crypto, migrations). Use
review-pr-diffatfidelity=detailed— not this skill.
Why this matters
The user installed gotcontext because they're noticing context pressure
— either costs, latency, or degraded reasoning on big docs. Falling
back to Read on a large file treats them like they didn't install
anything. The compressed path is the reason they're here.
See references/thresholds.md for finer-grained guidance on when the
fidelity levels make sense.