agentleFS
ChrisamansoodChrisamansood/chris-ai-productivity/skills/tool-result-compression/SKILL.md

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".

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
  1. Distinctive:

    Keep load-bearing facts: exact IDs, paths, numbers, statuses, errors, decisions, and commands.

    line 13
  2. Distinctive:

    Never paraphrase values that must remain exact.

    line 16
  3. Distinctive:

    Use references/compression-recipes.md to compress logs, tests, file reads, JSON/API responses, search results, tables, and review comments …

    line 18
  4. Distinctive:

    If the user asked to see the full output, do not compress it.

    line 33
  5. Distinctive:

    Search results: keep title, link, and one relevance sentence.

    line 39

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tool Result Compression

Compress large outputs to the smallest form that still preserves the facts needed for the current task.

Compression Rules

  1. Identify the current task.
  2. Keep load-bearing facts: exact IDs, paths, numbers, statuses, errors, decisions, and commands.
  3. Drop scaffolding: repeated headers, empty fields, verbose metadata, duplicate rows, and successful noise.
  4. Preserve uncertainty with HEADS UP: if something may have been dropped.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.