/superlite:close runs instead · from superlite
Ends a superlite session without merging: archives runs, removes worktrees, saves WIP, and resets checkout. Use when abandoning or parking work.
This skill never runs in Claude Code
It ships in superlite at skills/, but /superlite:close (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
End one session with no merge: its run is archived, its row leaves the registry, a worktree superlite cut is removed, a host checkout goes back to its base. The branch stays unless the user chooses to delete it. A merged PR is /superlite:merged instead. Never push, never touch the remote branch. Each step checks before it changes anything; a failed check stops the flow with nothing changed after it.
Take the first that works:
bash <skill-dir>/../swarm/scripts/superlite-cli session status --jsonsession status --json)No live session matches: say so and stop. The base branch is the row's base in session status --json, else the top-level base there; only when neither is set, find it the way superlite:shipping step 2 does. Never close a row whose branch is the base branch.
Collect, then ask at most once:
run:open. Closing it marks the run finished and archives its files. Close does not stop agents or background tests: before step 3, dispatch nothing new, wait for running agents to report, and drain background tests from the session's own checkout (its worktree in session status --json; --all sees only that checkout's runs): cd <worktree> && bash <skill-dir>/../swarm/scripts/superlite-cli run_tests --wait --all. Exit 2 (still running at the timeout): report it and stop; nothing is closed.git log --oneline <base>..<branch> (count), whether the branch has an upstream (git rev-parse -q --verify <branch>@{upstream}), and with one, the commits not pushed to it (git rev-list --count <branch>@{upstream}..<branch>).git status --short). In the host checkout or a worktree superlite cut, close saves tracked edits to refs/superlite/wip/<slug>, and untracked files get superlite's own stash/keep question in step 3. A Claude-created worktree (harness in its session status row) is never saved by close: its edits exist only in that folder.sandbox <topic> <state> <path> line under its row in session status. Close deletes that folder (only its run files are archived); its code is on neither the branch nor the WIP ref.stash:yes, or git rev-parse -q --verify refs/superlite/wip/<slug> finds a ref. Close carries it to that ref; it is not on the branch.With an open run or an open sandbox, ask "Close it anyway" / "Keep it open", naming the sandbox path as deleted; on keep, stop. Otherwise just list the facts and go on.
ExitWorktree with action: "keep" under Claude Code, else cd to the main checkout.bash <skill-dir>/../swarm/scripts/superlite-cli session close --slug <slug> --keep-branch.ASK line (exit 4, nothing changed), ask exactly what its ask: line says and do what the chosen on ...: line says. Exit 2: report its message and stop.ExitWorktree remove. With uncommitted changes, ask "Keep the worktree" / "Discard the edits": on keep, leave it in place (its edits stay there, unsaved); only on discard use discard_changes: true.session status --json again. If the row is still listed, close kept the checkout (--untracked keep or the repo default keep): report where it is and stop. Step 4 would force-remove it.If git worktree list --porcelain still shows the branch checked out (a kept Claude-created worktree), it cannot be deleted: report where it is checked out, keep everything, and go to step 5.
Otherwise ask once (one AskUserQuestion), showing the commit count from step 2, whether it has an upstream, and any parked work (refs/superlite/wip/<slug>, with git show --stat of it):
superlite-cli session use --slug <slug> reopens it later with its parked work.refs/superlite/wip/<slug>, which discard deletes too. Then bash <skill-dir>/../swarm/scripts/superlite-cli session discard --slug <slug> (drops the archived store, the WIP ref and the branch, unless superlite adopted it). If git rev-parse -q --verify refs/heads/<branch> still finds it, git branch -D <branch>; -D is used only because the user chose delete.Run bash <skill-dir>/../swarm/scripts/superlite-cli session status. One line each: session closed, worktree removed (or left), branch kept or deleted, WIP ref kept or dropped, peers released.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub iha2/superlite --plugin superlite15 skills in this plugin
/diagnosisUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes/draftingUse when you have an approved design or requirements for a multi-step task and need an implementation plan, before touching code./feature-prototypeUse in feature mode after the feature plan is approved, to cut the smallest runnable container of an existing app for the prototype build/inventingUse when the user asks to build a feature or component, add functionality, or change behavior, before any implementation code is written./mergedUse when the user says a pull request was merged, to clean up its session, branch and local main/mvp-prototypeUse in MVP mode (/superlite:mvp), after the .mvp.md feature plan is written, to make the one-file clickable prototype, check it, and read the user's feedback before the agent-format plan is written.Other plugins' skills for the same job