Use when a manager session is asked to close its child sessions — checks that no child work is lost, moves follow-ups into the manager's task file, settles branches and worktrees, archives sessions. Not for finishing this session (finish-session).
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Closes child sessions of a swarm — one named child, the finished ones, or all — without losing what they did. For every child it checks what could be lost, carries the child's follow-ups into the manager's task file, settles the branch and the worktree, marks the row closed and archives the session. It ends with the list of everything still open.
Each session finishes ITSELF with finish-session: goal check, commit, push,
archive. A child runs it as the last step of its work; the manager runs it
after the swarm is closed. This skill does not repeat that work. It does what
no single session can do for itself: look across the children, make sure
nothing is left on an unmerged branch, in an uncommitted file or in a report
that disappears with the session, and keep the ledger true.
What gets lost without it: follow-ups that live only in a child's last message, branches nobody merged, worktrees left on disk, sessions never archived.
<step_by_step>
Read the ledger and pick the children
## Swarm section → say so in one line and stop.closed are skipped.git symbolic-ref --short refs/remotes/origin/HEAD when there is a remote, else the branch the manager's checkout is on.Nothing-lost check — for every picked child, before anything is changed
git show <branch>:<path>) for a child with its own branch, and from its worktree when the file is modified there.git -C <worktree> status --porcelain for its own worktree; in a shared checkout, uncommitted changes to the files the child owns;git rev-list --count origin/<branch>..<branch> above zero (say "no remote" when the repository has none);git rev-list --count <main>..<branch> above zero;Could be lost, before you close anything, and keep that block in the final message, apart from Still open. An empty list is still printed, as the line Could be lost: nothing. Name every item in this block itself — the file, the branch, the child — even when the same item appears again under Still open; never replace it with a pointer to another part of the message.Sort each child
blocked on operator → not closed (rule 3). Name the question it waits for.done, an item unticked, or uncommitted files → not closed. The child ends its own work with finish-session. Where the host has a tool that sends a message to a session, send the child that request; where it has none, say in one line that the operator passes it on. Do not close it from outside.Close a finished child
## Follow-ups into ## Follow-ups of the manager's file, each marked with the child it came from: - <follow-up> (from <child title>, <child task file>). Carry the child's Not verified: items the same way — they are open questions too.git worktree remove <path>. Delete the branch only when it is merged (git branch -d), or dropped on the operator's word.## Swarm with closed and the date.finish-session has not archived the session already → archive it. No such tool → say in one line that this host cannot archive a session from here and the operator archives it in the host's interface.git commit <manager task file> -m "docs(tasks): close child <title>".Report what is still open
Could be lost; what was closed; any question to the operator (the decision about a branch); then Still open. The message ends with a list titled Still open:
## Swarm row not closed, with the reason;git worktree list);Could be lost that still holds.Still open: nothing only when all four are empty.Swarm closed is ticked only when Still open is empty — tick it and commit the manager's task file again, by explicit path. Otherwise leave it unticked.finish-session in this session — it checks the manager's Definition of Done and commits the ledger. When something is open, say that finish-session will stop on the Swarm closed item until it is settled.finish-session yourself from here; the operator asks for it.</step_by_step>
korchasa/flowai-plugins
85c7f7b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.