agentleFS
gonnarungonnarun/sdp/skills/precompact/SKILL.md

precompact

Skill0 starsChanged 3 months agoMITView on GitHub

Use before manual context compaction when the user says precompact, /precompact, $precompact, asks to snapshot current work, or asks for a resume prompt before compacting.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. corygabrielsen/skills★ 1same 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 repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    First, read the block text for the snapshot location: If it says the location is REFUSED, there is no snapshot: write nothing, create …

    line 16
  2. Very specific:

    Run no other commands to prepare it: no git, no gh, no ssh, no reads, no searches, no agent or task listings.

    line 24
  3. Very specific:

    When a snapshot is being written, keep the six sections (0 Current Work, 1 Completed, 2 Remaining, 3 Open Files / Locations, 4 Pitfalls / …

    line 26
  4. Very specific:

    When a person asks -- precompact, /precompact, $precompact, "save progress before compact", "give me a resume prompt" -- read manual.md …

    line 44

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

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

Precompact

Snapshot the in-progress work to a gitignored file so the same session can resume after a compaction. Two paths, and the difference is a budget.

Automation fast-path

A Stop hook may ask for the snapshot once context passes the threshold. Its block text is the whole contract. Follow it and stop:

  • First, read the block text for the snapshot location. If it says the location is REFUSED, there is no snapshot: write nothing, create nothing, tell the user in one line what it said, and stop. Nothing below applies. Otherwise it has already created the directory and mkdir is forbidden, or it says the directory could not be created and allows that one mkdir. Do not assume which of the three.
  • Then write .private/precompact/{YYYYMMDD}/precompact_{topic}_{tag}.md now, from what is already in the conversation.
  • Run no other commands to prepare it: no git, no gh, no ssh, no reads, no searches, no agent or task listings. Do not read manual.md.
  • When a snapshot is being written, keep the six sections (0 Current Work, 1 Completed, 2 Remaining, 3 Open Files / Locations, 4 Pitfalls / Rules, 5 Open Questions). Anything the conversation does not already hold is unknown. Never invent a hash, path or result to avoid one.
  • The file is the deliverable. No resume prompt, no queued compaction, no commit, at most one short line of chat.

Why: the block buys exactly one more turn and a compaction can land inside it. Measured 2026-09-23 on a Codex session, window 258400 -- block at 81.6%, host compaction at 83.1%, so the turn was worth about 2800 tokens. It spent 3960 preparing (840 re-reading this skill, 2558 on an agent listing, 562 on a git/gh/ssh fan-out) and no snapshot was written. The work was right; only its cost was wrong. That is also why this file is short: a matched skill is read in full, so anything left here is charged to every snapshot.

Manual path

When a person asks -- precompact, /precompact, $precompact, "save progress before compact", "give me a resume prompt" -- read manual.md beside this file and follow it. It carries the measured-gathering workflow, the snapshot structure, the resume-prompt template, the hook/automation reference and the rules.

Rules that hold on both paths

  • Absolute dates, never relative ones.
  • .private/ is gitignored by project standard; no backup, no commit, no push, no PR.
  • The _{tag} suffix is required whenever the automation names one: two sessions share the directory, and the tag is what tells them apart.

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.