agentsclimarketplace

Closeout

Skill D-sudoasd/closeout

End-to-end dev closeout: status, optional bug diagnosis, verify, commit, push, PR, merge gate, and prune merged branches to a clean desk. Use when the user says 收工, 收尾, 提交并推, 合并并清理, 清分支, 剪枝, ship, close out, clean workspace after coding, or runs /closeout. Prefer this over repeating git/PR instructions; delegate diagnosing-bugs, check-work, yeet, gh-fix-ci when needed.From its SKILL.md

Install
npx -y skills add D-sudoasd/closeout

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 22 days oldThe repository was created 22 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.9 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

Closeout

closeout = ship the work and leave a clean desk.
phase = one step; gate = must pass before the next; delegate = call an existing skill instead of reinventing it.

Read USER.md if present, else USER.example.md.
Details: references/phases.md, references/clean-desk.md, references/scenario-matrix.md, references/auth-matrix.md, references/report-template.md.

Version: see VERSION. Changelog: CHANGELOG.md.
Public repo: https://github.com/D-sudoasd/closeout

Scripts (prefer over ad-hoc):

~/.grok/skills/closeout/scripts/status.ps1
~/.grok/skills/closeout/scripts/prune_merged.ps1
~/.grok/skills/closeout/scripts/self_check.ps1

Triggers → mode

User saysMode
收工 / 收尾 / /closeout / ship itfull
先查状态 / 现在怎样0
排 bug / 还坏 / debug then closeout1 then full
验一下 / check2
提交 / commit3
提交并推2–4
开 PR5 (do 3–4 if needed)
合并 / merge6
合并并清理6–7
清分支 / 剪枝7 list; delete only after OK
/closeout --applyexecute previously shown plan

Phases (summary)

#NameActionGate
0statusstatus.ps1 (read-only)report
0bplanshow will/won't execution listuser OK or USER allows
1diagnosedelegate diagnosing-bugs if hardsymptom fixed or deferred
2verifydelegate check-work and/or repo tests; record exit codessee Verify outcomes
3commitintentional stage + message; record pre/post HEADintended work committed
4pushgit push -u; verify local SHA == remote SHAsynced (or no remote)
5prreuse open PR or create; check head SHAURL or skipped
6landgh pr merge per USERask first unless auto_merge
7pruneprune_merged.ps1 list → confirm → apply; recheckclean desk

full: 0 → 0b → 2 → 3 → 4 → 5 → ask merge → 6? → 7 list → ask remote delete.
Insert 1 if bugs remain.

Verify outcomes (unified)

ResultNext
PassMay commit / push / PR per mode
Fail, no overrideStop. No push. No PR of broken work.
Fail, user accepts local onlyOptional local commit; no push/PR
Fail, user explicitly allows pushPush/PR only with second clear OK; PR body must list failing command, exit code, impact

Do not treat vague “accepted fail” as push permission.

Execution plan (before write ops)

Show once after status:

本次将执行:
1. …
2. …

本次不会执行:
- 合并 PR(除非已授权)
- 删除远程分支(除非已授权)
- 强制推送

One confirmation covers the listed items. Merge and remote delete stay separate (auth-matrix.md).

Delegate map

NeedSkill / tool
Hard bug loopdiagnosing-bugs
Session verificationcheck-work
User said yeet onlyyeet OK for 3–5
CI red on PRgh-fix-ci (plan + approve)
Review threadsgh-address-comments
Long PR babysitpr-babysit (does not merge)
Data folder tidytidy-data-folders — not this skill

Safety (non-negotiable)

  1. No --no-verify / skip hooks unless user insists.
  2. Never force-push default branch (main/master/detected default).
  3. Feature force only --force-with-lease when required + confirmed.
  4. Never delete default, current branch, unmerged unique work, tip-moved-after-PR, or worktree-locked branches.
  5. Do not commit secrets, .env, bulk raw scientific data, or obvious tmp/ junk.
  6. No reset --hard / clean -fdx / branch -D without explicit OK.
  7. Unexpected dirty files → report; do not clobber.
  8. Merge and delete remote branches: confirm unless USER disables the matching key. Showing a prune list is not delete authorization.
  9. Push + open PR on full/收工: follow confirm_push in USER (this install may set false for 收工).
  10. If on default with local commits and push_main_direct=false, branch off or ask before push.
  11. Every external git command: check exit code; report failure; do not claim success from invocation alone.
  12. After delete: recheck ref absence before reporting deleted.

Prune rules (v2)

tip is ancestor of default
  → SAFE candidate (classic merge)

not ancestor, but merged PR exists AND pr.headRefOid == branch tip
  → SAFE candidate (squash/rebase)

merged PR but tip differs
  → HOLD: merged-pr-but-tip-moved (no auto-delete)

cannot confirm (no gh / no PR)
  → report-only, no delete

remote enum via for-each-ref; skip symref and HEAD

Prefer prune_merged.ps1 over ad-hoc git branch --merged.

Commit / PR quality

  • Message: USER commit_style — prefer fix: / feat: / chore: or one clear Chinese sentence.
  • PR body: problem → cause → fix → how verified (commands + exit codes).
  • Multi-topic changes → split commits when cheap.

Final report

Use report-template.md (evidence fields).
Minimum fallback:

## Closeout 结果
- branch / SHA:
- verified: (commands + exit codes)
- commits:
- remote / PR:
- merged: yes/no
- pruned: deleted + skipped reasons
- remaining dirty / exceptions:
- clean desk: YES/NO + 依据

Anti-patterns

  • Re-implementing diagnosing-bugs or pr-babysit inside this skill
  • Blind git add -A then push without reading diff
  • Merging without gate
  • Prune with -D / deleting unmerged or tip-moved branches
  • Pushing red verify without explicit second authorization
  • Claiming clean desk when squash-merged branches were not considered
  • Using closeout for folder data reorg
  • Overwriting USER.md on skill upgrade
  • Editing USER preferences without showing proposed text first

Config / install

  • Shipped template: USER.example.md
  • Local prefs: USER.md (preserve across upgrades)
  • Installer: pack install.ps1 backs up previous tree and keeps USER.md
  • Self-check: pwsh -File scripts/self_check.ps1

Completion

Mode deliverable done; gates respected; user has evidence report; full mode aims at clean desk (clean-desk.md).

What ships with it: 23 files

71.8 KB alongside SKILL.md, 5 of them executable

docs/

scripts/

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.