tool-result-compression
Skill2 starsChanged 3 months agoMITView on GitHub
Use when a tool result, log, trace, API response, file read, search result, or command output is too large and the user wants only the load-bearing facts preserved for the next step. Trigger on "compress this result", "summarize the tool output", "that result is too long", "strip this down", "reduce context", or "tool output is bloating the chat".
In this repository9 other files it gives its agents.
- ask-meSkill
- be-brutally-honestSkill
- build-me-a-pptSkill
- cache-aware-promptingSkill
- handoff-nowSkill
- humanizeSkill
- save-tokens-save-waterSkill
- tell-me-about-thisSkill
- write-me-a-skillSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Keep load-bearing facts: exact IDs, paths, numbers, statuses, errors, decisions, and commands.
- Distinctive: line 16
Never paraphrase values that must remain exact.
- Distinctive: line 18
Use references/compression-recipes.md to compress logs, tests, file reads, JSON/API responses, search results, tables, and review comments …
- Distinctive: line 33
If the user asked to see the full output, do not compress it.
- Distinctive: line 39
Search results: keep title, link, and one relevance sentence.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tool Result Compression
Compress large outputs to the smallest form that still preserves the facts needed for the current task.
Compression Rules
- Identify the current task.
- Keep load-bearing facts: exact IDs, paths, numbers, statuses, errors, decisions, and commands.
- Drop scaffolding: repeated headers, empty fields, verbose metadata, duplicate rows, and successful noise.
- Preserve uncertainty with
HEADS UP:if something may have been dropped. - Never paraphrase values that must remain exact.
Use references/compression-recipes.md to compress logs, tests, file reads, JSON/API responses, search results, tables, and review comments differently.
Output Format
COMPRESSED RESULT:
<short result with exact values preserved>
DROPPED:
- <what was removed and why>
HEADS UP:
<only if compression may affect meaning>If the user asked to see the full output, do not compress it.
Heuristics
- Logs: keep the first unique error, timestamp, component, and root cause.
- API responses: keep status code, relevant fields, and error message.
- Search results: keep title, link, and one relevance sentence.
- File reads: keep relevant function names, paths, and exact changed lines.
- Tables: keep relevant columns and rows only.
Common Mistakes
- Summarizing an ID or path instead of copying it exactly.
- Dropping the one error line that explains the failure.
- Compressing content when the full content is the answer.
- Keeping boilerplate because it looks official.
- Producing a polished summary instead of an evidence packet for the next step.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

