worktree-closeout
Skill6 starsChanged 8 months agoMITView on GitHub
Use when the user asks for worktree closeout, branch closeout, parallel closeout, worktree janitor, 工作树收口, 分支收口, or 并行收口, especially when work spans multiple Codex sessions and you need a date-based scan of open worktrees, closeout status, suggested merge/prune order, and prompt-ready handoff instructions.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- gerivdb/SKILLStheir own version, first seen Nov 1, 2026
- tedix-hq/tedixtheir own version, first seen Oct 15, 2026
- borgesme/fastapi-general-templateword for word, first seen Apr 9, 2026
Other versions3 projects use a version of this.
Word for word · 1
- borgesme/fastapi-general-template★ 1100% same
Edited · 0
None found.
Wrote their own version · 2
- tedix-hq/tedix★ 40same name
- gerivdb/SKILLS★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 17 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Read-only closeout triage for Codex work that spans multiple sessions, branches, or worktrees.
- Very specific: line 23
Single current session wrap-up: use session-wrap
- Very specific: line 24
Same-day project report: use project-daily-summary
- Very specific: line 25
Single branch is already chosen for final handling: use finishing-a-development-branch
- Distinctive: line 26
Dangerous branch actions: do not use this skill as permission to merge, delete, prune, or push automatically
- Distinctive: line 34
Always resolve the date before asking anything else.
- Distinctive: line 38
If the user already supplied a clear date, confirm it instead of inventing a different one
- Distinctive: line 42
Ask whether to scan:
- Distinctive: line 47
Do not assume the scope.
- Very specific: line 49
If scope is repo, pass the absolute repo root with --repo.
- Distinctive: line 60
Run the command from the skill root directory, or adapt the script path to your local install path
- Very specific: line 61
Read the artifact path from the script output (Wrote closeout artifact: ...)
- Distinctive: line 62
Keep the run read-only; do not chain cleanup commands after the scan
- Distinctive: line 85
If the artifact is effectively empty, say so explicitly instead of pretending there is work to close out.
- Distinctive: line 89
Use the artifact’s closeout phases directly:
- Very specific: line 95
Do not promote blocked or orphaned items into a broad parallel merge wave.
- Distinctive: line 104
When presenting per-item prompts, preserve the artifact’s label context:
- Distinctive: line 150
Do not hide uncertainty. If the artifact and current chat context disagree, call that out.
- Very specific: line 162
Use worktree-closeout only when the user also needs a date-based branch/worktree closeout appendix
- Distinctive: line 173
No automatic branch deletion
- Distinctive: line 174
No automatic worktree removal
- Distinctive: line 175
No automatic push or PR creation
- Distinctive: line 176
No fabricated status if the scan comes back empty or ambiguous
- Distinctive: line 178
Use this skill to organize closeout work, not to silently execute risky git actions.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
worktree-closeout
Overview
Read-only closeout triage for Codex work that spans multiple sessions, branches, or worktrees.
This skill does not auto-merge, auto-delete, auto-push, or auto-prune. It asks for a date and scope, runs the scanner, reads the generated artifact, then turns that artifact into a chat summary, a suggested closeout order, and prompt-ready handoff instructions.
When to Use
- User wants to know which worktrees or branches still need 收口
- Work was split across multiple sessions and the current status is unclear
- You need a date-based scan before deciding merge / keep / prune actions
- You want a controller prompt plus per-item prompts for closeout follow-up
When Not to Use
- Single current session wrap-up: use
session-wrap - Same-day project report: use
project-daily-summary - Single branch is already chosen for final handling: use
finishing-a-development-branch - Dangerous branch actions: do not use this skill as permission to merge, delete, prune, or push automatically
project-daily-summary may optionally call this skill when the user wants a same-day all-repo summary with a closeout appendix.
Required Flow
1. Ask for the date first
Always resolve the date before asking anything else.
- Accept
YYYY-MM-DDor a relative day such as “昨天” - Restate the resolved exact date
- If the user already supplied a clear date, confirm it instead of inventing a different one
2. Ask for the scope second
Ask whether to scan:
当前 repo/current repo→ scanner scoperepo所有 repo/all repos touched that day→ scanner scopeall
Do not assume the scope.
If scope is repo, pass the absolute repo root with --repo.
3. Run the scanner
python -X utf8 ./scripts/scan_closeout.py --date <YYYY-MM-DD> --scope <repo|all> [--repo <ABSOLUTE_REPO_PATH>]Notes:
scan_closeout.pyis the source of truth for classification and artifact rendering- Run the command from the skill root directory, or adapt the script path to your local install path
- Read the artifact path from the script output (
Wrote closeout artifact: ...) - Keep the run read-only; do not chain cleanup commands after the scan
4. Read the artifact
Open the generated Markdown artifact and use references/artifact-format.md if you need a quick schema reminder.
Pay attention to:
- frontmatter counts and
status ## 建议收口顺序- per-repo category sections
## 建议总控 Prompt## 建议子 Prompt
5. Output the chat summary
Summarize the artifact in chat, in Chinese by default:
- scan date and scope
- repo/worktree totals
- which repos or branches need attention first
- any uncertain or orphaned items that need manual re-triage
If the artifact is effectively empty, say so explicitly instead of pretending there is work to close out.
6. Output the suggested parallel order
Use the artifact’s closeout phases directly:
Phase 1: 可并行 -> safe_prunePhase 2: 条件并行 -> ready_to_mergePhase 3: 串行收尾 -> blocked, orphaned
Do not promote blocked or orphaned items into a broad parallel merge wave.
7. Output the prompts
Always output:
- the controller prompt
- each closeout item prompt
When presenting per-item prompts, preserve the artifact’s label context:
- classification
- repo
- branch or fallback worktree label
Classification Guide
safe_prune
- Branch is already merged into the base branch
- Worktree is clean
- Suitable for manual cleanup confirmation
ready_to_merge
- Branch is not merged
- Worktree is clean
- Branch is ahead of base
- Recent session evidence suggests it is an active, real candidate
Hand these to finishing-a-development-branch when the user wants to actually complete one branch.
blocked
- Dirty worktree, behind-base state, base-branch worktree with active changes, or another signal that the item is not ready for final closeout
These need the smallest safe unblock step first.
orphaned
- Missing or weak git/session evidence
- Cannot justify merge/prune confidently from current facts
These need re-triage, not aggressive cleanup.
Output Contract
Your final closeout response should contain, in this order:
- short chat summary
- suggested parallel order
- controller prompt
- per-item prompts
- artifact path
Do not hide uncertainty. If the artifact and current chat context disagree, call that out.
Relationship to Other Skills
session-wrap
session-wrapcloses one current sessionworktree-closeoutscans across sessions/worktrees for a chosen date
project-daily-summary
project-daily-summaryis still the primary same-day, by-project summary skill- Use
worktree-closeoutonly when the user also needs a date-based branch/worktree closeout appendix - For “当天所有 repo closeout appendix” scenarios,
project-daily-summarymay choose to call this skill
finishing-a-development-branch
worktree-closeoutidentifies which items are candidatesfinishing-a-development-branchperforms the single-branch finish flow after a candidate is chosen
Guardrails
- No automatic merge
- No automatic branch deletion
- No automatic worktree removal
- No automatic push or PR creation
- No fabricated status if the scan comes back empty or ambiguous
Use this skill to organize closeout work, not to silently execute risky git actions.
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
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.

