closeout
Canonical command to seal work, verify review states, and prepare for next cycle.
Install
mkdir -p .claude/skills/closeout && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11381" && unzip -o skill.zip -d .claude/skills/closeout && rm skill.zipInstalls to .claude/skills/closeout
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Canonical Nexus closeout command. Verifies review completeness, archive state, and final governed readiness before concluding the work unit. Use when the user says "close out the run", "archive this work", "finalize and prepare next run", or after `/review` and `/ship` complete and the work unit needs to be sealed. (nexus)Key capabilities
- →Verify review completeness for a work unit
- →Check archive state and governed readiness
- →Summarize the completion advisor's stage outcome and interaction mode
- →Present primary and alternative next actions to the user
- →Execute selected actions or provide follow-on work suggestions
How it works
The skill reads the completion advisor to summarize the work unit's status, presents next actions to the user based on interaction mode, and executes the chosen action.
Inputs & outputs
When to use closeout
- →Closing out a dev run
- →Finalizing and archiving work
- →Sealing a completed task
About this skill
Preamble (run first)
_UPD=$(~/.claude/skills/nexus/bin/nexus-update-check 2>/dev/null || .claude/skills/nexus/bin/nexus-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
mkdir -p ~/.nexus/sessions
touch ~/.nexus/sessions/"$PPID"
_SESSIONS=$(find ~/.nexus/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
find ~/.nexus/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
_CONTRIB=$(~/.claude/skills/nexus/bin/nexus-config get nexus_contributor 2>/dev/null || true)
_PROACTIVE=$(~/.claude/skills/nexus/bin/nexus-config get proactive 2>/dev/null || echo "true")
_PROACTIVE_PROMPTED=$([ -f ~/.nexus/.proactive-prompted ] && echo "yes" || echo "no")
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"
_SKILL_PREFIX=$(~/.claude/skills/nexus/bin/nexus-config get skill_prefix 2>/dev/null || echo "false")
echo "PROACTIVE: $_PROACTIVE"
echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
echo "SKILL_PREFIX: $_SKILL_PREFIX"
_MODE_CONFIGURED=$(~/.claude/skills/nexus/bin/nexus-config get execution_mode 2>/dev/null || true)
_PRIMARY_PROVIDER_CONFIG=$(~/.claude/skills/nexus/bin/nexus-config get primary_provider 2>/dev/null || true)
_TOPOLOGY_CONFIG=$(~/.claude/skills/nexus/bin/nexus-config get provider_topology 2>/dev/null || true)
if command -v ask >/dev/null 2>&1; then
_CCB_AVAILABLE="yes"
else
_CCB_AVAILABLE="no"
fi
if [ -n "$_MODE_CONFIGURED" ]; then
_EXECUTION_MODE="$_MODE_CONFIGURED"
_EXECUTION_MODE_CONFIGURED="yes"
else
_EXECUTION_MODE_CONFIGURED="no"
if [ "$_CCB_AVAILABLE" = "yes" ]; then
_EXECUTION_MODE="governed_ccb"
else
_EXECUTION_MODE="local_provider"
fi
fi
if [ "$_EXECUTION_MODE" = "governed_ccb" ]; then
_PRIMARY_PROVIDER="codex"
_PROVIDER_TOPOLOGY="multi_session"
else
if [ -n "$_PRIMARY_PROVIDER_CONFIG" ]; then
_PRIMARY_PROVIDER="$_PRIMARY_PROVIDER_CONFIG"
elif command -v claude >/dev/null 2>&1; then
_PRIMARY_PROVIDER="claude"
elif command -v codex >/dev/null 2>&1; then
_PRIMARY_PROVIDER="codex"
elif command -v gemini >/dev/null 2>&1; then
_PRIMARY_PROVIDER="gemini"
else
_PRIMARY_PROVIDER="claude"
fi
if [ -n "$_TOPOLOGY_CONFIG" ]; then
_PROVIDER_TOPOLOGY="$_TOPOLOGY_CONFIG"
else
_PROVIDER_TOPOLOGY="single_agent"
fi
fi
_EFFECTIVE_EXECUTION=$(~/.claude/skills/nexus/bin/nexus-config effective-execution 2>/dev/null || true)
if [ -n "$_EFFECTIVE_EXECUTION" ]; then
_EXECUTION_MODE=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^execution_mode:/{print $2; exit}')
_EXECUTION_MODE_CONFIGURED=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^execution_mode_configured:/{print $2; exit}')
_PRIMARY_PROVIDER=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^effective_primary_provider:/{print $2; exit}')
_PROVIDER_TOPOLOGY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^effective_provider_topology:/{print $2; exit}')
_EXECUTION_MODE_SOURCE=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^execution_mode_source:/{print $2; exit}')
_EXECUTION_PATH=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^effective_requested_execution_path:/{print $2; exit}')
_CURRENT_SESSION_READY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^current_session_ready:/{print $2; exit}')
_REQUIRED_GOVERNED_PROVIDERS=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^required_governed_providers:/{print $2; exit}')
_GOVERNED_READY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^governed_ready:/{print $2; exit}')
_MOUNTED_PROVIDERS=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^mounted_providers:/{print $2; exit}')
_MISSING_PROVIDERS=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^missing_providers:/{print $2; exit}')
_LOCAL_PROVIDER_CANDIDATE=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_provider_candidate:/{print $2; exit}')
_LOCAL_PROVIDER_TOPOLOGY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_provider_topology:/{print $2; exit}')
_LOCAL_PROVIDER_EXECUTION_PATH=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_provider_requested_execution_path:/{print $2; exit}')
_LOCAL_PROVIDER_READY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_provider_ready:/{print $2; exit}')
_LOCAL_CLAUDE_AGENT_TEAM_READY=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_claude_agent_team_ready:/{print $2; exit}')
_LOCAL_CLAUDE_AGENT_TEAM_REASON=$(printf '%s
' "$_EFFECTIVE_EXECUTION" | awk -F': ' '/^local_claude_agent_team_readiness_reason:/{print $2; exit}')
else
_EXECUTION_MODE_SOURCE=""
_EXECUTION_PATH=""
_CURRENT_SESSION_READY="unknown"
_REQUIRED_GOVERNED_PROVIDERS=""
_GOVERNED_READY=""
_MOUNTED_PROVIDERS=""
_MISSING_PROVIDERS=""
_LOCAL_PROVIDER_CANDIDATE=""
_LOCAL_PROVIDER_TOPOLOGY=""
_LOCAL_PROVIDER_EXECUTION_PATH=""
_LOCAL_PROVIDER_READY=""
_LOCAL_CLAUDE_AGENT_TEAM_READY=""
_LOCAL_CLAUDE_AGENT_TEAM_REASON=""
fi
echo "CCB_AVAILABLE: $_CCB_AVAILABLE"
echo "EXECUTION_MODE: $_EXECUTION_MODE"
echo "EXECUTION_MODE_CONFIGURED: $_EXECUTION_MODE_CONFIGURED"
echo "EXECUTION_MODE_SOURCE: $_EXECUTION_MODE_SOURCE"
echo "PRIMARY_PROVIDER: $_PRIMARY_PROVIDER"
echo "PROVIDER_TOPOLOGY: $_PROVIDER_TOPOLOGY"
echo "EXECUTION_PATH: $_EXECUTION_PATH"
echo "CURRENT_SESSION_READY: $_CURRENT_SESSION_READY"
echo "REQUIRED_GOVERNED_PROVIDERS: $_REQUIRED_GOVERNED_PROVIDERS"
echo "GOVERNED_READY: $_GOVERNED_READY"
echo "MOUNTED_PROVIDERS: $_MOUNTED_PROVIDERS"
echo "MISSING_PROVIDERS: $_MISSING_PROVIDERS"
echo "LOCAL_PROVIDER_CANDIDATE: $_LOCAL_PROVIDER_CANDIDATE"
echo "LOCAL_PROVIDER_TOPOLOGY: $_LOCAL_PROVIDER_TOPOLOGY"
echo "LOCAL_PROVIDER_EXECUTION_PATH: $_LOCAL_PROVIDER_EXECUTION_PATH"
echo "LOCAL_PROVIDER_READY: $_LOCAL_PROVIDER_READY"
echo "LOCAL_CLAUDE_AGENT_TEAM_READY: $_LOCAL_CLAUDE_AGENT_TEAM_READY"
echo "LOCAL_CLAUDE_AGENT_TEAM_REASON: $_LOCAL_CLAUDE_AGENT_TEAM_REASON"
source <(~/.claude/skills/nexus/bin/nexus-repo-mode 2>/dev/null) || true
REPO_MODE=${REPO_MODE:-unknown}
echo "REPO_MODE: $REPO_MODE"
_LAKE_SEEN=$([ -f ~/.nexus/.completeness-intro-seen ] && echo "yes" || echo "no")
echo "LAKE_INTRO: $_LAKE_SEEN"
# Learnings count
eval "$(~/.claude/skills/nexus/bin/nexus-slug 2>/dev/null)" 2>/dev/null || true
_LEARN_FILE="$HOME/.nexus/projects/${SLUG:-unknown}/learnings.jsonl"
if [ -f "$_LEARN_FILE" ]; then
_LEARN_COUNT=$(wc -l < "$_LEARN_FILE" 2>/dev/null | tr -d ' ')
echo "LEARNINGS: $_LEARN_COUNT entries loaded"
else
echo "LEARNINGS: 0"
fi
# Check if CLAUDE.md already has Nexus routing guidance or an equivalent routing rule
_HAS_ROUTING="no"
if [ -f CLAUDE.md ]; then
if grep -q "## Nexus Skill Routing" CLAUDE.md 2>/dev/null; then
_HAS_ROUTING="yes"
elif grep -Eiq 'route lifecycle work through .*?/discover.*?/closeout' CLAUDE.md 2>/dev/null; then
_HAS_ROUTING="yes"
elif grep -Fq "When the user's request matches a canonical Nexus command, invoke that command first." CLAUDE.md 2>/dev/null; then
_HAS_ROUTING="yes"
fi
fi
_ROUTING_DECLINED=$(~/.claude/skills/nexus/bin/nexus-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
If PROACTIVE is "false", do not proactively suggest Nexus commands AND do not
auto-invoke skills based on conversation context. Only run skills the user explicitly
types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefly say:
"I think /skillname might help here — want me to run it?" and wait for confirmation.
The user opted out of proactive behavior.
If SKILL_PREFIX is "true", the user has namespaced Nexus commands. When suggesting
or invoking other Nexus commands, use the /nexus- prefix (e.g., /nexus-qa instead
of /qa, /nexus-ship instead of /ship). Disk paths are unaffected — always use
~/.claude/skills/nexus/[skill-name]/SKILL.md for reading skill files.
If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/nexus/nexus-upgrade/SKILL.md and follow the release-based "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). /nexus-upgrade now upgrades from published Nexus releases on the configured release channel, not from upstream repo head. If JUST_UPGRADED <from> <to>: tell user "Running Nexus v{to} (just updated!)" and continue.
If JUST_UPGRADED <from> <to> is present, always include the standardized runtime summary before moving on to work, even when EXECUTION_MODE_CONFIGURED is yes.
When summarizing setup or upgrade state, always keep REPO_MODE and EXECUTION_MODE separate:
REPO_MODEis repo ownership only, for examplesoloorcollaborativeEXECUTION_MODEis runtime routing only, eithergoverned_ccborlocal_provider- Never describe
soloorcollaborativeas an execution mode - If
EXECUTION_MODE_CONFIGUREDisno, say it is the current default derived from machine state, not a saved preference EXECUTION_MODE_SOURCEexplains whether the active route came from a saved preference or a machine-state defaultEXECUTION_PATHis the current effective route, for examplecodex-via-ccbCURRENT_SESSION_READYtells you whether the chosen route is runnable right now in this host/sessionREQUIRED_GOVERNED_PROVIDERSis the governed provider set Nexus needs for the standard dual-audit path- when
EXECUTION_MODE=governed_ccb, also surfaceGOVERNED_READY,MOUNTED_PROVIDERS, andMISSING_PROVIDERS LOCAL_PROVIDER_CANDIDATE,LOCAL_PROVIDER_TOPOLOGY,LOCAL_PROVIDER_EXECUTION_PATH, andLOCAL_PROVIDER_READYdescribe the current-host local fallback path
Whenever you summarize setup, upgrade, or first-run state, present runtime status in this order:
- Repo mode:
REPO_MODE - Execution mode:
EXECUTION_MODEplus whether it is
Content truncated.
When not to use it
- →When the work unit is not ready for conclusion
- →When the host cannot display AskUserQuestion for interactive completion
- →When the user does not want to finalize and archive work
Limitations
- →Requires a completion advisor for guidance
- →Relies on `AskUserQuestion` for interactive mode
- →Cannot reconstruct choices from `status.json`
How it compares
This skill provides a governed, interactive closeout process for work units, presenting context-aware next steps and requiring user choice, which is more structured than simply archiving files.
Compared to similar skills
closeout side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| closeout (this skill) | 0 | 2mo | Review | Intermediate |
| agent-project-board-sync | 0 | 6mo | Review | Intermediate |
| accept-v5-milestone-gate | 0 | 3mo | No flags | Advanced |
| release | 0 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
agent-project-board-sync
ruvnet
Agent skill for project-board-sync - invoke with $agent-project-board-sync
accept-v5-milestone-gate
kkyyds-hub
将 AI-Dev-Orchestrator V5 母本中的工作包 / 阶段裁定、Pass / Partial / Blocked 分级、无法裁定判定、缺证识别与遗留项收口规则收敛成中文验收型 skill。用于在实现、review、verify 之后,对某个 V5 切片、工作包或阶段给出正式 gate 结论,并明确可放行边界、不可放行边界、阻塞原因、缺失证据与下一线程接力方向。
release
adpigft
Prepare release readiness evidence, release notes, rollback, monitoring, risks, and approvals.
linear-ci-integration
jeremylongshore
Configure Linear CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Linear sync into your build process. Trigger with phrases like "linear CI", "linear GitHub Actions", "linear automated tests", "CI linear pipeline", "linear CI/CD".
regression
ThePalaceProject
Run a full release regression test — sets up workspace, runs automated tools, guides manual testing, generates report and Jira tickets. Use for release gates and QA cycles.
dev-release
forecast-bio
Use to drive a guided release pipeline — version bump, changelog drafting, doc review, test/lint, PR creation, tag, GitHub release, and back-merge. Mixes agent steps (the agent does them) with user-only steps (push / merge / tag, blocked by policy and printed for the user). Trigger when the user say