Clean End Of Session — Development skill for Claude Code
Claude Code mod: winds agents down cleanly before your subscription credit runs out and writes a resume memo.
How to install Clean End Of Session
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Rctt27/clean-end-of-session and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Clean End Of Session does
Claude Code mod: winds agents down cleanly before your subscription credit runs out and writes a resume memo.
Alternatives in Development
README
clean-end-of-session
**Compatibility:** last tested and approved with **Claude Code 2.1.291**.
Tired of hitting the usage limit of your Pro or Max subscription right in the middle of a task? Or worse: lying awake at night, afraid Claude is quietly burning through all of your extra usage? Relax. Embrace **clean-end-of-session**.
A Claude Code mod that winds your agents down **cleanly** before your subscription credit runs out, instead of letting the limit cut them off in the middle of a task.
When the session credit gets close to its limit, the mod stops new work. Every running subagent gets a few more tool calls to reach a consistent state, then must hand back a status report. The orchestrator turns these reports into a **resume memo** at the root of your repository, which you use to pick the work up once your credit is back.
What happens
| Phase | When | What the mod does |
|---|---|---|
| armed | Normal use | Watches the credit windows Claude Code reports. Nothing else. |
| stopping | 5-hour session window ≥ 90%, or 7-day window ≥ 95% (or /clean-end-of-session stop) |
Refuses new subagents. Warns every running subagent: finish or revert the current change within 5 tool calls, then return a status report (done / half done with files / next step / watch-outs). After that, its tools are cut off. Tells the orchestrator to write the resume memo once the last report is in. |
| overage | A window reaches 100% | Lets the clean stop finish on paid extra usage, up to an estimated $2, and nothing else. |
| stopped / braked | The memo is written, or the overage budget is spent | No request leaves for the model anymore. A red band above the prompt says so. /clean-end-of-session reset resumes. |
The weekly threshold is higher than the session one on purpose: the last 10% of a week is about a whole 5-hour session.
The resume memo
As soon as the stop starts, the mod writes a provisional `CLEAN-END-OF-SESSION_
Related Skills
Restore Broken
Recover a project whose orchestrator died or ran out of usage mid-session. A new session (often a new identity
Claude Context Handoff
Writes a handoff before Claude Code runs out of context, then gives you a resume prompt for a fresh session. Z
Update Sop
Run the Agent SOP session end checklist. Updates all tracking files, writes the resume snapshot, and commits.
Accounting Skill
Drop your bank statements, credit card statements, and invoices into a folder. This skill reads all of them, c
Lore Close
Close out a working session cleanly — reconcile status across all layers, verify against ground truth, capture
Session End.Skill
Close a session cleanly by running tests, committing, updating all state files, and appending a handoff entry
Related Agents
Smith Replicator
Spawns and tears down watcher clones under load. Invoke when sentinel subscription volume crosses a threshold,
Present Log
Final close-out stage of the resume-tailoring pipeline. Reads the deterministic gate status from the workspace
GPT 5.6 Luna
General-purpose agent that runs on GPT-5.6-Luna (routed through the shunt gateway to the ChatGPT/Codex subscri