Clean Stop
Clean stop before the machine goes away: sweep every repo and worktree touched for uncommitted, unpushed or PR-less work, push it, and give a free-and-clear…
от melodic-software★ 34 звезды на GitHub
Установить Clean Stop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Clean stop
Purpose
Before a machine may disappear (end of day, a reclaimed spot instance, a torn-down container, walking away), sweep everything touched this session to a durable, linked resting state and report whether it is genuinely safe to shut down.
/session-flow:keep-going recovers a session after an interruption; clean-stop
makes the interruption safe beforehand. It supersedes a local
/session-flow:handoff when the machine itself may go away: a handoff file dies
with the disk, so clean-stop leaves the resumable state in the PR and issue
bodies on the remote.
Arguments
--unattended is the only argument: the caller declares that nobody is present. It only gates the
/export step (dropped: an unattended run neither suggests nor runs a user-only built-in); remote artifacts are always created
without prompting, as step 3 states. Take it out wherever it appears; other text is context for the
sweep. The bare word unattended is not this flag: stop and name --unattended.
Steps
- Inspect first, never assume. Enumerate every repository and worktree
this session touched and read its real state: uncommitted changes,
stashes, unpushed commits, branches without a PR, which PRs/issues already
carry the resumable context, and any ignored, machine-local state that is
not reproducible, a generated handoff, local config, hand-made
credentials, which
git statushides but which dies with the disk just the same. Act only on the gaps. Running clean-stop when a branch is already pushed and its PR already describes the work must not re-push, open a duplicate PR, or re-file issues. The sweep converges on what is missing, not on redoing what is done. - Durability sweep. Make the gaps durable. Push unpushed commits; for
coherently committable work, including a clean, coherent stash, commit
it with a real message and push. What is not coherently committable,
ambiguous work-in-progress, a half-edit, a stash that will not cleanly
apply, is not force-committed and not silently dropped: surface it in the
verdict as an explicit "not durable, do X before shutdown" item. A bad
commit and a lost stash are both worse than a named dangling item. Ignored,
machine-local state that must not go to the remote, secrets, credentials,
deliberately-ignored files, is never pushed; when it is not reproducible,
surface it as a "preserve off the machine before shutdown" item so it is
not silently lost with the disk.
The conversation itself is another machine-local, non-durable item:
transcripts live only in this machine's
~/.claudetree and are retention-swept besides (pointer: All settings § cleanupPeriodDays). When the session is worth keeping: Native suggestions are on unlessnative_suggestionsresolvesoff: the teamdocs/conventions/session-flow.yamlvalue wins over the per-user value${user_config.native_suggestions}(a literal unexpanded token means unset); with none set they are on. A value other thanonoroffis named and that layer dropped: a valid higher layer still wins, otherwiseon, never a lower layer's value. When off, skip the sentence below and write nothing in its place, not even a note that it was skipped or why. If /export is available in your session (gate basis: Verification record:/exportbelow) and native suggestions are on (native_suggestions, Configuration), suggest that the person run it for a durable conversation copy at<memory_dir>/exports/<YYYYMMDDTHHMMSSZ>-<topic>.txtafter verifying the memory root's self-ignore guard (a.gitignorecontaining*; create it and announce it when absent). This skill never invokes/exportitself.--unattended: make no suggestion and writeWithheld suggestion (unattended): /exportin the output. That destination is machine-local, so when the machine may go away, also surface copying the export off the machine as a "preserve off the machine" item. - Linkage + breadcrumbs (redact before any remote write). Before a PR
or issue body is created or updated, sweep everything outbound: remaining
tasks, dependencies, resume context, any pasted terminal output or diffs,
for secrets, API keys, tokens, credentials, connection strings, and PII,
and replace each hit with a shape marker (
<REDACTED: API key>), never the value. This scrub is a hard gate: the breadcrumbs land on a remote shared with others and pass no human review first, so nothing outbound is written before it runs. Then link the work: every pushed non-default branch gets a PR. A branch that is the repo's default (main/master/trunk, or whatevergit symbolic-ref refs/remotes/origin/HEADresolves to) carries no PR and needs none once pushed. Every follow-up gets filed as an issue linked to that PR; dependencies, remainin
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- evals/evals.json
FAQ
Что делает скилл Clean Stop?
Clean stop before the machine goes away: sweep every repo and worktree touched for uncommitted, unpushed or PR-less work, push it, and give a free-and-clear verdict. Use when: 'clean stop', 'safe to shut down', or stopping for the day. Gates destructive cleanup.
Как установить скилл Clean Stop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Clean Stop запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…