pre-compact
Skill0 starsChanged 27 days agoMITView on GitHub
Checkpoint a long session before /compact so nothing settled lives only in the conversation, then give an honest "safe to compact" or "not yet, because X". Use when "/compact" arrives as a plain message mid-turn, or Kyle says "about to compact", "am I good to compact?", "checkpoint" or "save state" about this session, "I'm near 150k", or types /pre-compact — even without naming the skill. Writes settled decisions, open items, deferrals, and a "Next step" line into the active skill's existing durable home (wayfinder ticket file, CONTEXT.md/ADRs, spec, issue files, branch) or a short .scratch checkpoint, commits and pushes the feature branch, and replies with SHA, settled list, what's left, and a git-checked verdict. Never runs /compact, pushes to main, merges, touches PRs, resolves a ticket awaiting confirmation, or continues the work. NOT for moving to a fresh session (/handoff-session writes a paste-able prompt and stops); this keeps the same session alive across compaction.
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- tenequm/skillstheir own version, first seen Nov 5, 2026
- OrionArchitekton/orion-skillstheir own version, first seen Nov 2, 2026
- MathCaz/claude-skillstheir own version, first seen Jul 28, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- tenequm/skills★ 39same name
- OrionArchitekton/orion-skills★ 2same name
- MathCaz/claude-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 repository11 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- architecture-viewerSkill
- daySkill
- retireSkill
- reweaveSkill
- teach-researchSkill
- visual-summarySkill
- wayfinder-mapSkill
- youtube-breakdownSkill
- youtube-transcriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 13 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
13
Distinctive
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
- Distinctive: line 23
Use the home the active skill already owns.
- Very specific: line 39
If the home has nowhere natural for open items and the next step (CONTEXT.md, for example), put those in .scratch/<slug>/checkpoint.md next …
- Distinctive: line 44
When two skills are active at once (grill-with-docs inside a wayfinder ticket, say), write each piece to its natural home, terms to …
- Distinctive: line 52
If it needs one (the terms were agreed but their meaning never was), list it as open instead.
- Distinctive: line 55
Write it for an agent reading cold after compaction:
- Distinctive: line 61
Don't edit the receiving item.
- Distinctive: line 72
Commit only onto the branch this session has been working on (one it created, or the feature branch Kyle started it on).
- Very specific: line 80
Write a descriptive message (e.g.
- Distinctive: line 85
If the folder isn't a git repo, write the checkpoint file and stop there.
- Very specific: line 91
Run git status --porcelain and git rev-list --count @{u}..HEAD (skip both outside a git repo).
- Distinctive: line 94
Safe to compact: only when none of this session's files show as modified or untracked, the ahead count is 0, and nothing said in …
- Distinctive: line 100
Saved to disk, not pushed: when there's nothing to push to: the folder isn't a git repo, or the repo has no remote.
- Distinctive: line 111
If you mention context size, point to the status line.
- Distinctive: line 141
When the verdict is not yet, the first line becomes "Not yet": what would be lost (cite the local SHA if there is one) and the one step …
- Distinctive: line 145
When the verdict is saved to disk, not pushed, the first line says so: "Saved to disk, not pushed: <not a git repo | committed locally …
- Distinctive: line 156
Leave out the line about other sessions' files unless their state changed.
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
pre-compact — save what's settled, then say whether compacting is safe
Compaction is lossy. Anything agreed in conversation but not written to disk can come back garbled or not at all. This skill is a checkpoint only: write the state down, push it, and give a verdict. Don't advance the work, tidy files, or "improve" anything along the way, because the session continues after compaction and the next turn picks up from what you saved.
1. If "/compact" arrived as a message, say so in one line
/compact is a built-in that only runs when Kyle types it at an idle prompt; sent mid-turn, it reaches you as plain text. Before any tool call, say in one line that it didn't run because it arrived mid-turn, and that you're saving the session first. The final reply repeats it once, with "type it again now". Never try to run it.
2. Find the durable home
Use the home the active skill already owns. Don't invent a new document type when one of these fits:
| Active work | Home for what's settled |
| wayfinder ticket | That ticket's file under .scratch/<effort>/issues/ — a ### Checkpoint — working notes, not the answer entry under ## Comments, with the date |
| grill-with-docs / domain-modeling | CONTEXT.md (terms) and docs/adr/ (decisions), matching the existing files' format |
| to-spec | The spec file, once it's published; before that, the draft goes in .scratch/<slug>/checkpoint.md |
| to-tickets | The issue files plus tickets.md, once Kyle approved the breakdown and it's published; before that, the draft breakdown goes in .scratch/<slug>/checkpoint.md |
| implement / implement-spec | Committed work on the branch; progress notes as a comment on the ticket being built |
| none of the above | A short .scratch/<slug>/checkpoint.md |
Writing a spec or ticket file publishes it as ready-for-agent, where /implement or
/implement-spec can pick it up. So before Kyle has approved it, don't write any issue file,
spec file, or tickets.md; the draft stays in the checkpoint note.
If the home has nowhere natural for open items and the next step (CONTEXT.md, for
example), put those in .scratch/<slug>/checkpoint.md next to it. On a repeat
checkpoint in the same session, update your earlier entry in place, with a fresh date
stamp marked "(updated)", rather than stacking a second one.
When two skills are active at once (grill-with-docs inside a wayfinder ticket, say), write each piece to its natural home, terms to CONTEXT.md and decisions to ADRs, and make the ticket's checkpoint comment the one index that points to each of them.
3. Write the state down
An edit Kyle already approved but you haven't made yet (terms agreed for CONTEXT.md, for example) is settled work: make it now if you can write it without a new decision. If it needs one (the terms were agreed but their meaning never was), list it as open instead.
Write it for an agent reading cold after compaction:
- Settled. Each decision with Kyle's actual choice: whether Kyle took your recommendation or picked something else, and what it was.
- Open. Questions still being worked in this item.
- Deferred. Each item pushed elsewhere, with the item it went to, named by its title. Don't edit the receiving item. If it doesn't already state the question, say so under what's left.
- Files touched this session.
- Next step. One line a post-compaction agent can act on without rereading anything.
A grilling ticket isn't resolved until Kyle confirms shared understanding. Leave its
Status:, claim, and open state alone, and don't write the formal Answer or touch the
map's Decisions-so-far.
4. Commit and push the feature branch
- Commit only onto the branch this session has been working on (one it created, or the feature branch Kyle started it on). If HEAD is on the default branch, or on a branch this session hasn't been working on, don't switch branches or commit. Other sessions may share this checkout, and moving HEAD moves it for them too. Write the files, and give the not yet verdict asking Kyle which branch to use.
- Stage only files this session touched, by path. Other sessions' dirty or untracked files stay exactly as they are.
- Make one checkpoint commit. Don't amend it or follow it with a polish pass.
Write a descriptive message (e.g.
docs(<effort>): checkpoint <item> before compaction) and end it with the attribution lines the session's system reminder gives. git push -u origin <branch>. Never push to the default branch, merge, open or close a PR, or close a ticket. Those wait for Kyle. If the push fails, don't touch remote or upstream config; report it and hand the fix to Kyle.- If the folder isn't a git repo, write the checkpoint file and stop there; never run
git init. If the repo has no remote at all (git remoteprints nothing), commit onto this session's branch and stop; never add one. Both get the on-disk verdict in step 5.
5. Check readiness against git, not memory
Run git status --porcelain and git rev-list --count @{u}..HEAD (skip both outside a
git repo). Then the verdict is:
- Safe to compact only when none of this session's files show as modified or untracked, the ahead count is 0, and nothing said in conversation is missing from what you wrote. Reread the last few exchanges for any choice or caveat you skipped. "No upstream configured" counts as not pushed. Pushed is the bar because it puts the notes off this machine and in reach of other sessions.
- Saved to disk, not pushed when there's nothing to push to: the folder isn't a git repo, or the repo has no remote. Everything is written (and committed, if it's a repo), so compacting is safe for this session, but nothing is off this machine. Say exactly that. A remote that exists but rejected the push is not yet, not this.
- Not yet otherwise, naming exactly what would be lost (e.g. "the push failed: no upstream", "your last answer, on rest days, isn't in the ticket yet", "nothing is committed: HEAD is on main, which branch should it go on?").
Other sessions' dirty files don't affect the verdict. Mention them in one line as left untouched.
If you mention context size, point to the status line. Never state a token count.
6. Reply in this shape
Name every ticket, decision, or finding by its title, or gloss any ID on first use
(ticket 03 (how rest days pass)). Number settled items by the active skill's own
question numbers (Q1, Q4, ...) when it numbered them; otherwise 1 to N.
Everything from this <session kind> is saved: commit <sha>, pushed to <branch>. <If
/compact arrived mid-turn: "Your /compact didn't run because it arrived while I was
mid-turn. Type it again now and it will." Otherwise: the verdict sentence.>
Where it stands. <N> questions are settled, and <you took my recommendation on each |
you took it on all but #k, where you chose …>:
<1. or Q1.> <Plain-language gist of a settled decision>
...
<Open items in this <ticket | item>, including a next question not yet asked, or
"Nothing on this ticket is left to ask."> <Each deferral:
"X goes to "<other item's title>".">
<One thing I need from you: … — e.g. confirm the summary above is our shared
understanding, after compacting or right away. Once you do, I'll: <the resolve steps
the active skill takes next>.> (Omit if nothing is needed.)
The full notes are in <the home>:
code "<absolute path>"When the verdict is not yet, the first line becomes "Not yet": what would be lost (cite the local SHA if there is one) and the one step that fixes it. Keep the rest of the shape, and don't tell Kyle to type /compact.
When the verdict is saved to disk, not pushed, the first line says so: "Saved to
disk, not pushed: <not a git repo | committed locally (<sha>), no remote>. Safe to
compact this session; nothing is off this machine." Keep the rest of the shape.
Follow-up: "So I'm good to compact now?"
Answer only that question. Rerun step 5, and recheck any edit the checkpoint listed as
open: is it still open, or written since? If it's clean, reply in one or two lines: yes,
<sha> is on origin/<branch>, and nothing since the checkpoint exists only in
conversation. If something new was settled after the checkpoint, save it (steps 3–4)
and answer "Yes, now", naming what you just saved in a few words, with the new SHA.
Leave out the line about other sessions' files unless their state changed. Don't repeat
the full summary.
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.

