agentleFS
opelplepleopelpleple/meta-skills/compact/SKILL.md

compact

Skill0 starsChanged 5 months agoMITView on GitHub

Distills a long conversation or working document down to its load-bearing essence — decisions, constraints, open questions, and current state — while discarding resolved chatter and noise, so a long-running task stays coherent without exhausting the context window. Use this skill when the user says "compact this", "summarize where we are", "condense the thread", or "let's reset and continue"; when a conversation has grown long and unwieldy; when context is filling up before a big next step; or whenever earlier turns are crowding out the signal the task actually needs.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    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:

    Before: 60 turns debating auth libraries, three abandoned attempts, a long stack trace, and the eventual fix.

    line 45

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “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

Compact

Replace a sprawling history with a tight, faithful summary that preserves everything future steps depend on and drops everything they don't.

When to use

  • The thread is long and you can feel earlier context being lost or repeated.
  • Context utilization is high and you need room to keep working.
  • You're about to start a substantial new phase and want a clean, accurate baseline.
  • The user explicitly asks to "compact", "summarize where we are", or "condense".

When NOT to use

  • The conversation is short — compacting adds a lossy layer for no gain.
  • You need exact original wording (verbatim quotes, legal/spec text). Offload those to a file instead (see scratchpad).
  • You're permanently leaving the work for someone/something else — write a handoff brief, which is richer and standalone.

The method (numbered, concrete — the heart)

  1. Pin the goal. State the original objective in one or two sentences. Everything else is judged by whether it serves this.
  2. Harvest decisions. List every decision made and why. A decision without its rationale gets re-litigated later — keep the reason.
  3. Capture constraints. Record hard requirements, rejected approaches (and why they were rejected), and any "do NOT do X" rules. Rejected paths are as valuable as chosen ones.
  4. Snapshot state. What is the current concrete status — files changed, steps done, what's verified vs. assumed, what's in flight.
  5. List open questions / next steps. The unresolved threads and the immediate next actions, ordered.
  6. Discard the noise. Drop resolved back-and-forth, dead ends already abandoned, tool output already acted on, and pleasantries. Keep conclusions, not the deliberation that reached them.
  7. Preserve pointers, not payloads. Replace long artifacts with a reference ("schema in /path/file.md", "full error in scratchpad") rather than re-pasting them.
  8. Replace and continue. Present the compacted summary as the new working baseline, then proceed from it — don't keep dragging the old history alongside.

What good looks like

  • A reader could resume the task from the summary alone with no loss of decisions or constraints.
  • It's a fraction of the original length but contains every rationale and rejected-path note.
  • It separates settled (decisions, constraints) from open (questions, next steps).
  • It points to external files for bulky exact-text artifacts instead of inlining them.

Anti-patterns

  • Compression without rationale — listing what was decided but not why, guaranteeing re-debate.
  • Dropping rejected approaches — the agent happily re-tries the thing that already failed.
  • Re-pasting big blobs — defeating the purpose by carrying the bulk into the summary.
  • Editorializing — adding interpretation or optimism the original didn't contain.
  • Compacting too early or too often — each pass is lossy; don't grind detail away needlessly.

Example (short, vivid)

Before: 60 turns debating auth libraries, three abandoned attempts, a long stack trace, and the eventual fix.

After:

Goal: Add SSO login to the dashboard. Decided: Use library X (Y rejected — no SAML; Z rejected — unmaintained). Tokens stored httpOnly. Constraints: Must support existing LDAP; do NOT touch the legacy session table. State: auth/sso.ts implemented + unit-tested; integration test pending. Login works locally. Open: Does staging IdP allow our redirect URI? Next: wire callback route, then test on staging.

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.