| name | end |
| description | Wrap up the session safely: gate on uncommitted/unpushed work and missing journal, refuse to end if anything is unsaved, write the closing summary, then exit the harness when the session was light (stay alive for review when it was substantial). Invoke as /end (Claude Code, Codex) or /skill:end (gptme). |
| when_to_use | Use when the user says /end, 'wrap up', 'end the session', 'we're done', or when an autonomous session has finished its work and is about to stop. Do not use mid-task as a way to bail on unfinished work — the check will refuse. |
| argument-hint | [--exit | --stay | --dry-run] |
| license | MIT |
| compatibility | Claude Code (/end), Codex (/end via ~/.codex/skills), gptme (/skill:end, gptme#pending). Linux /proc required for harness detection; stdlib-only Python 3.10+. |
| metadata | {"author":"bob","version":"1.0.0","tags":["session","wrap-up","lifecycle","cross-runtime"]} |
| keywords | ["/end","end the session","wrap up the session","we're done for now","close out this session"] |
/end — wrap up, or refuse to
The skill is a gate, then a closeout, then (maybe) an exit. It exists so
"I'm done" is a checked claim, not a feeling. Three rules:
- Refuse to end with unsaved work. Uncommitted files you touched, unpushed
commits, dirty worktrees, or a missing journal entry → you are not done.
- Closeout is short and stands alone. The last message must make sense to
someone who reads only it.
- Exit only when it's cheap to come back. Light session → exit the harness.
Substantial session → stay alive so the human can review before the context
is gone. (
--exit / --stay override.)
Arguments
$ARGUMENTS — optional flags:
| Flag | Effect |
|---|
| (none) | check → closeout → exit iff CLEAN_LIGHT |
--exit | check → closeout → exit even if CLEAN_SUBSTANTIAL |
--stay | check → closeout → never exit |
--dry-run | run the check and report; change nothing, exit nothing |
Step 1 — Run the gate (always)
python3 "$SKILL_DIR/scripts/end-check.py"
It reports, per check, ✅ ok / ℹ️ info / ⚠️ warn / ❌ block, and ends with
one of:
| Verdict | Meaning | What you do |
|---|
BLOCKED | unsaved work attributed to this session | Refuse. Go to Step 2. |
CLEAN_LIGHT | ≤2 commits, ≤10 files, no PRs/worktrees pending | Closeout → exit (Step 3+4) |
CLEAN_SUBSTANTIAL |