trim-context
Skill0 starsChanged 16 days agoMITView on GitHub
Use when a transcript, tool-call history, or set of notes has grown too large to keep in full and needs to be cut down before continuing, handing off to another agent, or writing a digest, especially when an exact file path, error message, command, or constraint inside it must not be lost to a paraphrase.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- akshaypimprikar/pragmatheir own version, first seen Sep 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- akshaypimprikar/pragma★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-orchestrationSkill
- ask-for-approvalSkill
- claim-verification-loopSkill
- code-councilSkill
- code-reviewSkill
- context-as-imagesSkill
- grillingSkill
- grow-test-coverageSkill
- investigateSkill
- loop-until-verifiedSkill
- plan-and-buildSkill
- prompt-cachingSkill
- proofreadSkill
- review-allSkill
- review-before-mergeSkill
- review-panelSkill
- to-questionnaireSkill
- track-review-findingsSkill
- unslopSkill
- verify-findingsSkill
- whatnowSkill
- wizardSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 10
When content is too large to keep whole, decide per unit whether to keep it verbatim, truncate it with a note, or drop it, instead of …
- Distinctive: line 23
Do NOT use: when the content already fits, or the goal is genuine re-explanation for a fresh human reader (a report, a README): that needs …
- Distinctive: line 37
Stop condition: stop degrading the moment it fits, even with stages left.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Trim context
Overview
When content is too large to keep whole, decide per unit whether to keep it verbatim, truncate it with a note, or drop it, instead of asking a model to paraphrase everything into a summary. A summary can silently lose the one exact detail that mattered; a keep, truncate or drop decision never rewrites what it keeps.
When to use
- Compacting your own working context or a long tool-call history.
- Writing a handoff document for another agent or a later session.
- Building a research digest that must stay faithful to its sources.
- Any time "cut this down" would otherwise mean "summarize this."
Do NOT use when the content already fits, or the goal is genuine re-explanation for a fresh human reader (a report, a README): that needs real prose, not unit-by-unit pruning.
The pattern
- Pin what must not move: the task or goal, the newest N turns, anything already referenced ahead. Leave these untouched.
- Judge each remaining unit alone (one tool call, log entry, or paragraph): matters as-is, matters only as a fact, or now dead weight.
- Degrade in stages, cheapest first, stop once it fits: truncate plus a one-line note beats paraphrasing; collapsing a run of low-value units into one placeholder line beats deleting them silently; only drop a unit once truncation alone did not fit. Re-measure after each stage.
- Stop condition: stop degrading the moment it fits, even with stages left. If it still does not fit after the last stage, say so instead of quietly paraphrasing what remains.
Quick reference
| Stage | What happens | When |
| Keep verbatim | No change | Pinned, or still fully needed |
| Truncate + note | Keep first N chars, note what was cut | Partly needed, or reproducible |
| Collapse a run | Several low-value units become one line | Old units, none matter alone |
| Drop | Removed entirely | Confirmed not needed, even as a fact |
| Paraphrase | Never, for kept content | N/A |
Common mistakes
- Summarizing everything uniformly instead of judging each unit on its own, smoothing away the one detail that mattered.
- Truncating without a note of what was cut and roughly how much, so a later reader cannot tell there was ever more.
- Dropping one half of a paired call and result (or a question and its answer), leaving the other orphaned.
- Re-trying a degrade stage that already proved insufficient instead of moving to the next one and re-measuring.
Source
- Repo:
https://github.com/tamaratran/fast-jev-compaction, commite3f262a7f4d42bd8dd32ced30d26176f7cb545b0. - License: MIT.
- File read:
README.md("What and why", "How it works"). - Adapted: the per-unit keep/truncate/drop decision with staged, cheapest-first degradation, generalized past the source project's Claude Code compaction plugin to any oversized transcript, handoff note, or digest. Written independently; no wording or code copied from the source.
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.

