/sunstack:cleanfrom sunstack
Close the Sunstack team's unused sessions and leftover panes in one go (agent and free sessions at their prompt over 24h with nothing unfinished, spawned sessions that released their agent, panes whose Claude or Codex exited, and claims whose pane is closed), after one confirmation. Use for "sunstack clean", "/sunstack:clean", "clean up", "clean up sessions", "clean up panes", "close idle sessions", "close unused sessions", "close finished sessions", "close exited panes", "too many sessions", "sunstack kill --idle". Closing one named session is the spawn skill. Only in projects with a Sunstack team (sunstack/PROTOCOL.md).
Ships in sunstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Command: sunstack clean (also kill --idle). Skill: /sunstack:clean in Claude Code, $sunstack:clean in Codex.
sunstack/PROTOCOL.md in this folder or above), say so in one line and stop; the health skill sets one up.sunstack command on its own, with nothing chained after it.sunstack next --team shows one [user] line when there is something to close, for example
2 agent session(s) idle over 24h: builder.alice_csv (3d), reviewer_ui (1d); 1 pane(s) whose CLI exited: scratch (free, claude exited). sunstack clean closes five kinds, all checked by the CLI,
not by you:
doing line or transcript change), no taken message and no staged save.sunstack release <id_task> --stale drops them. Nothing is closed; the claim goes and its taken messages go
back to the inbox.It never closes this session's own pane, and it closes an exited pane only when sunstack opened it and it runs nothing but its shell. An idle session is closed even in a pane you opened, so check the list. It checks only taken messages and staged saves for unfinished work: a session with other work (a Now entry on its board, files it has not saved) should be dismissed instead (spawn skill), so it saves first. Right before closing, it checks the list again and leaves alone anything no longer on it.
sunstack clean (no --yes). From an agent session it changes nothing: it exits 2,
lists exactly what would close and ends with the command to run, sunstack clean --root <root> --yes --plan <code>. Or it says there is nothing to close. (In the user's own terminal it asks
there instead.)sunstack kill "<id_task>" (or sunstack kill <label> for
a free session) instead.closed <name>, or left alone <name> when it is no longer idle. Errors name what went wrong for each (the reasons
are as for sunstack kill; a pane can be closed and its claim or messages still need a fix).
changed: the list changed after the user saw it, and nothing was closed. Show the
new list it prints and ask again. Never run the new command without a new yes.Agents never run it for themselves; a lead or PM session runs it only on the user's yes. It
covers this team only: for free sessions outside a team, list them with sunstack org --by host
and close one with sunstack kill <label>.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lucklyric/sunstack --plugin sunstack21 skills in this plugin
/asTake on a Sunstack agent identity (for example builder.alice) in this project, alone or alongside sessions already working as it, or recover the identity this session already holds. Use for "sunstack as", "/sunstack:as", "take on the builder agent", "which Sunstack agent should I be", "sunstack whoami", "which agent am I", or after compaction or /clear lost the session state. Only in projects with a Sunstack team (sunstack/PROTOCOL.md)./boardShow and align the Sunstack team's objectives and key results across the user and every agent, with dependencies, stale or overdue entries and unfollowed directives. Use for "sunstack board", "/sunstack:board", "the team's OKRs", "the team's dependencies", "align the team". Not the ranked to-do list (next skill)./Other plugins' skills for the same job