pre-compact
Skill1 starsChanged 4 months agoMITView on GitHub
Pre-compact ritual — before you run /compact (or end the session), save the full session state durably and hand back a polished, ready-to-paste "come-back prompt" that resumes the work with an explicit next task baked in. Use when the user says "I want to compact", "save everything and give me the come-back prompt", "prep for compaction", "wrap this up so I can resume later", especially when followed by "next I want to: <X>".
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
- ksdisch/claude-configtheir own version, first seen Nov 1, 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
- ksdisch/claude-config★ 0same 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 repository6 other files it gives its agents.
- grill-me-MSkill
- handoff-MSkill
- html-report-MSkill
- notes-MSkill
- skill-MSkill
- sql-style-MSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
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
- Very specific: line 16
Write a resume state capturing everything needed to continue:
- Very specific: line 54
Keep it tight — favor pointers over pasted content.
- Very specific: line 59
Don't duplicate content that already lives in PRDs/plans/ADRs/commits — reference by path/URL.
“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
Compact prep + come-back prompt (compact-M)
Two deliverables, in order: (1) save the full session state to a durable file, (2) print a self-sufficient come-back prompt the user can paste to resume. This skill does NOT run /compact — the user runs it after.
Distinct from handoff-M full (which briefs a fresh agent, temp doc only). Here the point is resuming this line of work after compaction/session-restart, with the user's next task driving it.
Step 1 — Save full state (durable)
Write a resume state capturing everything needed to continue:
- Goal — what this work is ultimately for (one line)
- Where we are — what's done, current position, what just happened
- Key decisions — with the load-bearing why (so they aren't re-litigated)
- Constraints / gotchas — discovered facts, dead-ends ruled out, things to avoid
- Pointers — relevant
file:line, paths, PRs, tickets, queries (reference, don't paste) - Open threads — unresolved items
- Next — the user's stated next task (verbatim from args), sharpened into concrete first steps
Location:
- notes-M topic active → checkpoint into that topic's notes file (update
## Summary+ a## Current stateentry, bumpLast updated). This IS the notes-M "before /compact" checkpoint. Print the absolute path. - No active topic → save to the OS temp dir (e.g.
compact-resume-<slug>.md), print the path, and note: "temp copy — want a versioned copy in your repo instead?" Don't block on the answer; the come-back prompt (Step 2) is self-sufficient regardless.
Redact secrets (keys, tokens, PII).
Step 2 — Print the come-back prompt
Output a single fenced block the user can copy wholesale. Make it self-sufficient — enough inline context to resume even if the saved file is gone. Sharpen the user's raw "next" into an actionable directive, not a restatement.
Resume: <one-line goal>
## Where we are
<concise state: done / current position / just happened>
## Key context
<load-bearing decisions + why · constraints · gotchas · file:line pointers>
## Skills to (re)invoke
<e.g. notes-M topic at <path>; any others in play>
## Do next
<the sharpened next task → concrete first step(s)>
Full saved state: <path>Keep it tight — favor pointers over pasted content. After printing, tell the user they can now run /compact (or start a fresh session and paste the block).
Rules
- Come-back prompt is the primary deliverable; the saved file is the durable backup.
- Don't duplicate content that already lives in PRDs/plans/ADRs/commits — reference by path/URL.
- Sharpen "next", don't parrot it. Point to
file:line, don't paste files.
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.

