一键导入
finisher
Complete development work — verify tests pass, detect environment state, present structured merge/PR options to user, execute choice with proper cleanup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Complete development work — verify tests pass, detect environment state, present structured merge/PR options to user, execute choice with proper cleanup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | finisher |
| description | Complete development work — verify tests pass, detect environment state, present structured merge/PR options to user, execute choice with proper cleanup. |
| mode | required |
Guide completion of development work by presenting clear options and handling the chosen workflow. Use this when implementation is complete and all tasks have passed review.
Always announce at start: "I'm using the finisher skill to complete this work."
Before presenting options, run the project's test suite:
npm test # JavaScript/TypeScript
cargo test # Rust
pytest # Python
go test ./... # Go
If tests fail:
Tests failing (<N> failures). Must fix before completing.
[Show failures]
Cannot proceed with merge/PR until tests pass.
Stop. Don't proceed to Step 2.
If tests pass: Continue to Step 2.
Determine workspace state before presenting options:
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
This determines which menu to show and how cleanup works:
| State | Menu | Cleanup |
|---|---|---|
GIT_DIR == GIT_COMMON (normal repo) | Standard 4 options | No worktree to clean up |
GIT_DIR != GIT_COMMON, named branch | Standard 4 options | Provenance-based (Step 6) |
GIT_DIR != GIT_COMMON, detached HEAD | Reduced 3 options (no merge) | No cleanup (externally managed) |
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
If that fails, ask: "This branch split from which base branch? (main or master)"
Normal repo and named-branch worktree — present exactly these 4 options:
Implementation complete. What would you like to do?
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work
Which option?
Detached HEAD — present exactly these 3 options:
Implementation complete. You're on a detached HEAD (externally managed workspace).
1. Push as new branch and create a Pull Request
2. Keep as-is (I'll handle it later)
3. Discard this work
Which option?
Don't add explanation — keep options concise.
# Get main repo root for CWD safety
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
# Merge first — verify success before removing anything
git checkout <base-branch>
git pull
git merge <feature-branch>
# Verify tests on merged result
<test command>
# Only after merge succeeds: cleanup (Step 6), then delete branch
Then proceed to Step 6, then:
git branch -d <feature-branch>
git push -u origin <feature-branch>
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>
## Test Plan
- [ ] <verification steps>
EOF
)"
Do NOT clean up — the user needs the branch alive to iterate on PR feedback. Report: "PR created. Branch is live for iteration."
Report: "Keeping branch . Work preserved at current working directory."
Don't cleanup. Don't delete anything.
Confirm first:
This will permanently delete:
- Branch <name>
- All commits: <commit-list, last 5 SHAs>
Type 'discard' to confirm.
Wait for exact typed confirmation. If confirmed:
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
Proceed to Step 6, then force-delete branch:
git branch -D <feature-branch>
Only runs for Options 1 and 4. Options 2 and 3 always preserve the workspace.
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
WORKTREE_PATH=$(git rev-parse --show-toplevel)
If GIT_DIR == GIT_COMMON: Normal repo, no worktree to clean up. Done.
If the current path is under .worktrees/ or worktrees/: We created this — we own cleanup.
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
git worktree remove "$WORKTREE_PATH"
git worktree prune # Self-healing: clean up any stale registrations
Otherwise: The host environment owns this workspace. Do NOT remove it. If the platform provides a workspace-exit tool, use it. Otherwise leave the workspace in place and report: "Workspace preserved (externally managed)."
| Option | Merge Locally | Push | Keep Workspace | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | ✅ | — | ❌ | ✅ |
| 2. Create PR | — | ✅ | ✅ | — |
| 3. Keep as-is | — | — | ✅ | — |
| 4. Discard | — | — | ❌ | ✅ (force) |
Never:
git worktree remove from inside the workspace being removedAlways:
cd to main repo root before any worktree removalgit worktree prune after removalStakeholder requirements-intake skill — helps a stakeholder or user, via a series of structured prompts, turn their ideas or requests into a right-sized, refinable scope artifact. Adaptive: asks a few high-leverage questions when a request isn't specific enough, drafts-and-trims when it's too broad. Honest about what a non-technical stakeholder cannot know. Stand-alone; does not hand off to other agents.
Pull data out of raw files (PDF, XLSX, CSV/TSV, JSON, HTML, Markdown, plain text), clean each one, and converge everything into one consistent dataset ready for analysis. Use when you have a pile of messy files to extract and normalize. Scales from one file to many via an explicit parallelism ladder.
Answer a question or find patterns in a clean dataset — aggregations, groupings, comparisons, trends, outliers, distributions, joins. Use after data has been ingested and normalized, when the user wants insight rather than just extraction. Single-pass; produces findings, not a formatted report.
Deliver analysis findings as a polished output in one or more formats — Markdown, CSV, XLSX, JSON, plain text, or inline. Use as the final pipeline stage once analysis is done. Always asks for the format if unspecified, and always documents the artifacts and scripts it created.
Inbound request triage skill — the front door of the product work-shaping funnel. Classifies a raw, unsorted request into a routing bucket (product shaping, engineering, data, needs-info, or not-actionable) and produces a fast triage decision artifact. Single-pass; inline-only; stand-alone — recommends a next step but never invokes another agent or skill.
Engineering hand-off packaging skill — turns a refined scope brief into a self-contained, liftable engineering hand-off artifact that seeds the engineer agent's design phase. Produces a separate liftable artifact; stand-alone; points to the engineer agent but never invokes it.