Skip to content

Repository files navigation

closeout

CI License: MIT PowerShell 7+ Release Skill

Ship the work. Leave a clean desk.

Agent skill for end-to-end git closeout: status → verify → commit → push → PR → merge gate → prune — with authorization boundaries, squash-merge awareness, and an evidence report you can re-check.

中文说明 · Changelog · Install · Auth matrix · Promote kit

closeout hero: ship work, leave a clean desk, with evidence report card


Why not “just let the agent push”?

Risk with unguarded agents What closeout does
Blind git add -A Intentional stage; skip secrets / bulk raw data
Pushing red verify Fail stops push unless you re-authorize
Squash merge → “nothing to prune” SAFE when PR head SHA == branch tip
Treating origin/HEAD as a branch Structured for-each-ref (skip symrefs)
“I showed the list” = delete remote List ≠ authorize
“done” after a failed delete Exit codes + post-delete recheck
Upgrade wipes preferences USER.example.md ships; USER.md stays

Before unguarded agent push versus after closeout evidence-based clean desk


How it works

Say 收工, ship, or /closeout to a compatible agent (Grok / Codex).

closeout workflow: status, plan, verify, commit push PR, merge ask, prune with SAFE and HOLD gates

Phase Action Gate
0 status.ps1 one-pager report only
0b will / will-not plan user OK or USER default
2 verify + exit codes green, or explicit fail policy
3–5 commit · push · PR SHA + PR head checks
6 merge ask first by default
7 prune list → confirm; remote separate

Scripts alone (no agent required):

$Skill = Join-Path $env:USERPROFILE ".grok\skills\closeout\scripts"
$Repo  = "D:\path\to\your\repo"

pwsh -File "$Skill\status.ps1" -RepoRoot $Repo
pwsh -File "$Skill\prune_merged.ps1" -RepoRoot $Repo          # dry-run
# pwsh -File "$Skill\prune_merged.ps1" -RepoRoot $Repo -Apply
# pwsh -File "$Skill\prune_merged.ps1" -RepoRoot $Repo -Apply -DeleteRemote

Install (≈30 seconds)

Grok

git clone https://github.com/D-sudoasd/closeout.git "$env:USERPROFILE\.grok\skills\closeout"
# upgrade later:
# git -C "$env:USERPROFILE\.grok\skills\closeout" pull

Codex / other agents

git clone https://github.com/D-sudoasd/closeout.git "$env:USERPROFILE\.codex\skills\closeout"

Copy install (keeps local USER.md)

pwsh -File .\install.ps1 -Source .

Needs: git, pwsh 7+, and gh for PR/merge + squash detection.
Restart the agent session, then say 收工.


Prune rules (v2)

tip is ancestor of default     → SAFE (classic merge)
merged PR + headOid == tip     → SAFE (squash / rebase)
merged PR but tip moved        → HOLD (new commits after merge)
no gh / no PR                  → report only
origin/HEAD · current · default → never delete

Authorization (short)

You say Default scope
收工 / /closeout Status + verify + plan; push/PR per USER.md
提交并推 Verify + commit + push
合并 Merge after checks
清分支 List only
Explicit remote delete Remote prune

Details: references/auth-matrix.md.


Project layout

closeout/
  SKILL.md              agent entry
  USER.example.md       shipped defaults (copy → USER.md locally)
  assets/readme/        hero · workflow · before-after
  references/           phases · auth · clean desk · report
  scripts/              status · prune · self_check · common
  docs/PROMOTE.md       shareable posts

Contributing

Issues and PRs welcome — especially cross-platform path edges, extra prune evidence sources, and Pester fixtures.

Please do not commit a real USER.md.


License

MIT © 2026 D-sudoasd

About

Agent skill: ship work and leave a clean desk — status, verify, commit, push, PR, merge gate, squash-aware prune.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages