closeout

closeout is a command for coding agents from cirwel/unitares. It costs 9 tokens per session (970 once invoked), scanned A, original, Apache-2.0.

A command that checks whether a UNITARES workspace is ready to be handed over after work is finished. It reports repository changes, delivery status, running processes, and optional branch-cleanup information.

In plain words
What is it for?
Use it before finishing to check whether Git is clean, whether changes are staged or untracked, whether work was pushed and merged, and whether repository processes or cleanup candidates remain.
Why use it?
It prevents unfinished local changes, unpushed work, or leftover development processes from being overlooked. A baseline lets it ignore processes that were already running before the work began.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cirwel/unitares/closeout
Clone the repo
git clone --depth 1 https://github.com/cirwel/unitares

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for closeout

README.md
[![agentmods](https://agentmods.dev/badge/commands/cirwel/unitares/closeout.svg)](https://agentmods.dev/commands/cirwel/unitares/closeout)
Your own site
<a href="https://agentmods.dev/commands/cirwel/unitares/closeout"><img src="https://agentmods.dev/badge/commands/cirwel/unitares/closeout.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.00970
Opus 5 $0.00005 $0.00485
Sonnet 5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

Measured 3d ago against content hash 4b25fe7752c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

closeout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/closeout.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this before saying work is done, especially after edits, test runs, local servers, BEAM residents, or any cleanup request from the operator.

First run a non-mutating check:

  • python3 scripts/dev/workspace_closeout.py
  • python3 scripts/dev/workspace_closeout.py --branch-hygiene when branch or worktree cleanup is part of the question

This uses .unitares/workspace-closeout-baseline.json when present. The baseline is written by /governance-start through workspace_closeout.py --start-check; it lets the closeout check ignore resident/control-plane processes that already existed before the agent began work and focus on newly started repo-rooted processes.

Report:

  • whether git is clean
  • the delivery: line, including whether work is local-only, unpushed, pushed-but-not-proven-merged, or synced with default upstream
  • any staged, unstaged, or untracked files
  • any repo-rooted processes still running
  • whether a remaining process is managed by a LaunchAgent label
  • the branch hygiene: line when requested, including cleanup candidates, safe deletions performed, held branches, and sweep errors

If work should be delivered instead of left local, stage the intentional files and use the ship helper:

  • When the operator asks to ship, finish, deliver, open a PR, or otherwise complete a delivery workflow, treat the default draft-PR route as authorized; do not ask for a second confirmation just to push or open the draft PR.
  • ./scripts/dev/ship.sh --plan "commit message" previews the delivery route
  • ./scripts/dev/ship.sh "commit message" is the default route: a draft PR for every change, per docs/operations/github-workflow-conventions.md (the operator is the merge gate). Runtime/detached work mints a fresh agent-prefixed branch; non-runtime work on a named branch opens the draft PR on that branch
  • ./scripts/dev/ship.sh --direct "commit message" opts out for docs/tests-only pushes where you knowingly skip the PR
  • ./scripts/dev/ship.sh --auto-merge "commit message" opts into auto-merge-on-green; use only when the operator explicitly asks, not by default

If the operator asked to clean the workspace, or if you are finishing a task whose intended work is already committed/stashed, run:

  • python3 scripts/dev/workspace_closeout.py --stash-dirty --stop-repo-processes --bootout-launch-agents --branch-hygiene-live

--branch-hygiene-live reuses the Vigil branch-hygiene safety contract in docs/operations/branch-hygiene-runbook.md: patch-equivalent or empty stale branches may be pruned, clean stale worktrees may be removed, and branches with unique commits, dirty worktrees, or a protected checkout are held for review instead of deleted.

Rules:

  • Do not stash or terminate processes merely because the script found issues unless the operator asked for cleanup or the intended work is already safely committed/stashed.
  • If there are staged changes, decide whether to commit, unstage, or stash before final response; do not leave them ambiguous.
  • If delivery is local_changes, say plainly: not committed, not pushed, not merged. If the changes are intentional, name the ship command that would move them to a branch or draft PR.
  • If delivery is unpushed_commits, say plainly: committed locally but not pushed or merged.
  • If the checkout is detached, do not direct-push. Use ship.sh --draft-pr or create a named branch first.
  • If delivery is pushed_branch, do not claim merge completion unless you also checked GitHub PR state explicitly.
  • If the operator asks "merged?", answer directly from delivery state and any GitHub check performed.
  • If there are unrelated dirty files, preserve them in a labeled stash rather than reverting them.
  • Stop only processes rooted inside the current workspace. Do not stop services rooted in sibling deploy repos unless the operator explicitly asks.
  • Treat branch hygiene holds as cleanup findings, not green lights. Report the branch names and either salvage them or leave them for a follow-up cleanup agent.
  • Include the stash name, commit hash, and stopped LaunchAgent labels in the final response.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 85 lines · 9 tokens per session scan A 4b25fe7752c4

Subscribe to this mod's changes

closeout is a command published in the GitHub repository cirwel/unitares (4 stars, last pushed 3d ago), licensed Apache-2.0. It adds 9 tokens to every session and 970 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.