smart-compact
Skill0 starsChanged 6 months agoMITView on GitHub
Save session state to .claude/session-state.md for recovery after /clear. Designed to be fast — required sections first, optional sections only when relevant. Trigger: /smart-compact
2 other projects use a version of this.
Adopted by
Most recently taken up by
- flopperj/dotfiles-coretheir own version, first seen Nov 4, 2026
- s-choung/Research-Skillsword for word, first seen May 16, 2026
Other versions2 projects use a version of this.
Word for word · 1
- s-choung/Research-Skills★ 36100% same
Edited · 0
None found.
Wrote their own version · 1
- flopperj/dotfiles-core★ 3same 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 repository15 other files it gives its agents.
- analysis-protocolSkill
- blender-atom-renderSkill
- corpus-phrase-checkSkill
- docx-scientific-formattingSkill
- html-minimalSkill
- layout-guardSkill
- matplotlib-scientificSkill
- paper-sectionsSkill
- paper-sentence-loopSkill
- paper-styleSkill
- reference-crosscheckSkill
- slide-auditSkill
- transcript2htmlSkill
- youtube2mp4Skill
- youtubeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
When the user runs /smart-compact:
- Very specific: line 19
Write .claude/session-state.md in the current working directory
- Distinctive: line 70
Write for a new Claude that knows NOTHING about this conversation
≈ “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
Smart Compact
Save session state to file. User then runs /clear to reset.
The session-state.md is auto-read on next session start (via CLAUDE.md instruction).
Instructions
When the user runs /smart-compact:
- Write
.claude/session-state.mdin the current working directory - Tell the user it's done so they can
/clear
Speed principle: This should take ~10 seconds, not minutes. Write dense, not verbose.
Template
# Session State
> /smart-compact at [date/time]
## Tone
[One line. e.g. "Korean casual + English tech terms, concise"]
## What We Did
[Numbered list of what happened this session, chronologically. Keep each item to 1-2 lines.
Include: what was requested → what was done → outcome]
## Key Decisions
[Bullet list of decisions + WHY. Quote user's exact words for preferences.]
## Files
| File | What Changed |
|------|-------------|
| path | one-line summary with key function/variable names |
## Current Status
- [x] Done tasks
- [ ] In-progress (note current state)
- [ ] TODO
## Bugs & Fixes
[Only if any. "Problem → cause → fix" format, one line each.]
## Code Notes
[Only for tricky/non-obvious code that would be hard to reconstruct.
Paste ONLY the critical snippets, not whole files. Skip if nothing tricky.]
## Tech Context
[Key paths, model names, config values, env details. Dense bullet list.]
## Next Steps
[Priority-ordered. What to do immediately after recovery.]Writing Guidelines
- Dense, not verbose — bullet points, not paragraphs
- Skip sections that are empty (except Tone, What We Did, Files, Current Status, Next Steps — always include these 5)
- Include specific names: variables, functions, paths, config values
- Quote user feedback verbatim when it matters
- For bugs: what didn't work is as important as what did
- Write for a new Claude that knows NOTHING about this conversation
Post-Clear Recovery
Project CLAUDE.md auto-reads .claude/session-state.md on session start. No manual action needed.
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.

