close
End session with verification, commits, and documentation
от Kanevry★ 53 звезды на GitHub
Установить close в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Close Session
Plugin root:
${CLAUDE_PLUGIN_ROOT}. Claude Code replaces this with the plugin's absolute path when it loads this file. Where it appears unreplaced — in a file this skill reads with the Read tool, or on Codex, Cursor or Pi — the plugin root is the directory that contains this skill'sskills/folder (two levels above the folder of this SKILL.md). Write that absolute path literally into every command that starts a plugin script: the Bash tool has no plugin variable, and shell variables do not survive between tool calls.
Invocation
The user invokes /close (arguments: $ARGUMENTS — none are interpreted; anything passed is context only) to end the current session. Run the STATE.md pre-check below, then hand off to skills/session-end/SKILL.md. Do NOT skip any verification step — evidence before assertions.
The user wants to end the current session.
Pre-check before invoking session-end (#1661). Run, from the project root:
node "${CLAUDE_PLUGIN_ROOT}/scripts/close-precheck.mjs" --repo-root "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
It prints one JSON object (exit 0 for every verdict). It reads <state-dir>/STATE.md for the current platform (.claude/, .codex/, .cursor/, .pi/) and decides whose it is before it looks at status: STATE.md session-id (#1368) against this process's native id (readProcessLocalSessionIds()). Never decide ownership from the session lock: it records the pid of the short-lived hook process, and in a shared checkout it can name a peer. After /clear the tab runs under a NEW native id, so the STATE.md of the work before /clear reads as foreign — measured 2026-10-17 in three sessions. A STATE.md without session-id (before #1368) or a process without a native id (ownership: legacy / unprovable) never reaches session-end on its status alone (#1718): where the status would hand off, the verdict is ownership-unproven. An optional --confirm-own <confirmToken> (16 lowercase hex, from that verdict) re-runs the pre-check for the unchanged file. Act on verdict:
run-session-end— own STATE.md, or one confirmed with--confirm-own(ownership: confirmed),status: activeorpaused: invoke the session-end skill.complete-missing-record— own or confirmed STATE.mdstatus: completed, but.orchestrator/metrics/sessions.jsonlholds no completed record for it (#429:completedalone does not prove the Phase 3.7 writer ran; an abandoned backfill stub is no completion). Warn: "STATE.md completed ohne passenden Abschluss im Ledger — session-end wird zur Vervollständigung ausgeführt (#429)." and invoke the session-end skill. (The SessionEnd hook'sbackfillCompletedFromStateMdheals the same gap on a later teardown; this branch covers a/closere-run before that.)already-finalized— a matching completed record exists (a legacy record withoutstatuscounts): "Previous session was already finalized by session-end. Start a new session with/session, or inspect<state-dir>/STATE.mdto review the prior close. (Note: if this is unexpected after an Express Path session,skills/go/SKILL.mdshould have auto-invoked /close — check that STATE.md## Deviationscontains anExpress path:entry.)" Stop.foreign— STATE.md belongs to sessionstateSessionId, not to this one, whatever itsstatus. Never invoke session-end on it and never edit it: anactive/pausedone is a peer's live session, acompletedone an earlier tab or a peer. Inform: "STATE.md gehört Session<stateSessionId>(status<status>), nicht dieser — kein eigener Plan zum Abschließen." Withstatus: activeorpausedadd: "Ist das der Plan dieses Tabs von vor einem/clear, kann ihn dieser Prozess nicht als eigenen belegen; er bleibt offen, der SessionEnd-Hook füllt den Ledger nach." Stop.ownership-unproven— nobody can prove this STATE.md is this session's (ownershiplegacy: nosession-id; orunprovable: this process has no native id, as on Cursor, Pi, Codex without a thread id); session-end would runwouldRun. Never invoke session-end on this result and never edit the file. Inform with the facts from the JSON: "STATE.md<statePath>ist keiner Session nachweisbar zugeordnet (ownership<ownership>, session<session>, session-id<stateSessionId>, started_at<startedAt>, status<status>); session-end würde<wouldRun>ausführen." — thesession-idpart only whenstateSessionIdis present: without a native id (unprovable) a STATE.md that names another session's id comes back here, and the operator must see that. Confirm ONLY when (a) the operator explicitly answers that this is this session's plan — ask viaAskUserQuestionon Claude Code (a numbered list on Codex/Cursor/Pi, per.claude/rules/ask-via-tool.md), the question naming path, session,session-id(when present), started_at and status; or (b) first-person evidence: this session's OWN tool cal
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл close?
End session with verification, commits, and documentation
Как установить скилл close?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл close запускает скрипты?
Нет, скилл состоит только из инструкций (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…