Rctt27

Clean End Of Session — Development skill for Claude Code

Development community

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

  • Ic Memo — 投委会备忘录 — 8 章节结构化决策文档(含三情景回报 + Top 3 风险) 6.6k ★
  • Sanitize — Detect and redact PII from text files — 15 categories (SSNs, credit cards, API keys, etc.), zero dependencies 3.1k ★
  • Memo — Memo MCP -- save and restore conversation across agents 109 ★

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_