agentleFS
iha2iha2/superlite/skills/close/SKILL.md

close

Skill315 starsChanged 33 days agoMITView on GitHub

Use when the user wants to end, abandon or park a superlite session without a merged PR

31 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use open, reconcile and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • BlockSkill

    open

    Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.

    Also in 5 projects that use this

  • howellsSkill

    reconcile

    Audit a project against current plugin conventions and offer to update structure.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    validate

    Run the full CI validation workflow locally before submitting a PR. Use this as a final check to ensure all Azure DevOps CI pipeline steps will pass.

    Also in 4 projects that use this

  • AnthropicSkill

    start

    Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.

    Also in 6 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 8 projects that use this

  • OpenAISkill

    bootstrap

    Project bootstrapping orchestrator for repos that depend on Vercel-linked resources (databases, auth, and managed integrations). Use when setting up or repairing a repository so linking, environment provisioning, env pulls, and first-run db/dev commands happen in the correct safe order.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No live session matches: say so and stop.

    line 18
  2. Very specific:

    If this chat is inside the session's worktree, leave it first: ExitWorktree with action: "keep" under Claude Code, else cd to the main …

    line 34
  3. Distinctive:

    If git worktree list --porcelain still shows the branch checked out (a kept Claude-created worktree), it cannot be deleted: report where it …

    line 42
  4. Very specific:

    Keep the branch (Recommended): stop here. superlite-cli session use --slug <slug> reopens it later with its parked work.

    line 46
  5. Very specific:

    Run bash <skill-dir>/../swarm/scripts/superlite-cli session status.

    line 51
  6. Distinctive:

    Delete a branch, or discard uncommitted or parked work, without the user's answer.

    line 56

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Close

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.

1. Find the session

Take the first that works:

  • the argument: a session slug, or a branch name matched against the rows of bash <skill-dir>/../swarm/scripts/superlite-cli session status --json
  • the session of the current checkout (its row in session status --json)
  • otherwise list the live sessions and ask once (one AskUserQuestion) which one to close

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.

2. Name what is at stake

Collect, then ask at most once:

  • Open run: its row shows 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.
  • Work not on the base: 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>).
  • Uncommitted work in its checkout (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.
  • Prototype sandbox: a 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.
  • Parked work: the row shows 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.

3. Close

  • If this chat is inside the session's worktree, leave it first: ExitWorktree with action: "keep" under Claude Code, else cd to the main checkout.
  • From the main checkout: bash <skill-dir>/../swarm/scripts/superlite-cli session close --slug <slug> --keep-branch.
  • On an 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.
  • A Claude-created worktree is not removed by close. Clean: end it with 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.
  • Then check 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.

4. Keep or delete the branch

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):

  • Keep the branch (Recommended): stop here. superlite-cli session use --slug <slug> reopens it later with its parked work.
  • Delete local branch: name what is lost: commits on neither the base nor the upstream (all commits not on the base when there is no upstream), and the parked work on 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.

5. Report

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.

Never

  • Push, delete a remote branch, or open, close or merge a PR.
  • Delete a branch, or discard uncommitted or parked work, without the user's answer.
  • Close the base branch's session or switch another session's checkout.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.