finish-branch
Skill0 starsChanged 39 days agoMITView on GitHub
Integrates a finished branch by local merge or pull request, only with your approval, and writes the PR description from the run. Use when implementation is complete and tests pass, and the work needs integrating.
- Deletes or force-pushes
- Commits and pushes
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Yesterday-AI/ytstacktheir own version, first seen Nov 8, 2026
- LARi-UQAC/ResearchToolstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- sergvss/agents-best-teamstheir own version, first seen Nov 1, 2026
- Chrike/coding-agent-skillstheir own version, first seen Aug 4, 2026
- jnsfhrmnn/jf-agentic-coding-starter-kittheir own version, first seen Jul 18, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- LARi-UQAC/ResearchTools★ 14same name
- ariadoss/superskills★ 12same name
- KhaledSaeed18/dotclaude★ 5same name
- sergvss/agents-best-teams★ 2same name
- Yesterday-AI/ytstack★ 2same name
- Chrike/coding-agent-skills★ 1same name
- jnsfhrmnn/jf-agentic-coding-starter-kit★ 1same name
- kazemcodes/skill-tree★ 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.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- brainstormSkill
- execute-planSkill
- find-root-causeSkill
- handle-feedbackSkill
- prove-doneSkill
- tddSkill
- triage-open-itemsSkill
- update-specSkill
- write-planSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
When you find something worth doing later that this work does not include, add it as an item to .dietpowers/trackers/open-items.md, …
- Very specific: line 14
If the dietpowers:prove-done skill just ran on this state of the branch, use its result.
- Distinctive: line 32
keep: keep the branch as it is, to handle later
- Distinctive: line 39
keep: keep it as it is, to handle later
- Very specific: line 48
every Changed note in the spec since approval.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Finish Branch
Integration is the step that touches shared state, so it waits for your partner's choice. When the choice is a pull request, the description should let a reviewer judge the work without rereading the conversation.
Ask your partner one question at a time, in plain text; do not use the AskUserQuestion tool, because some clients show only the tool's question and drop the text around it. Put what your partner needs to answer in the same message: the problem and why it matters, then the options, recommended first, each with a short bold label in words (never numbers or letters) and a one-line reason. End with a line naming those labels in the same order, such as Reply with **new PR**, **straight to main**, or **drop it**., and make the question the last thing in the message, after any tool use. Your partner may answer with an option, their own alternative, a question or an aside. Keep messages short: lead with the decision, then only the detail needed to answer it. Before a stretch of work that takes more than a moment, such as dispatching a reviewer, writing a spec or plan, or fixing findings, say in one line what you are about to do; after your partner answers, say what comes next before starting it.
When you find something worth doing later that this work does not include, add it as an item to .dietpowers/trackers/open-items.md, following ## Open items in ${CLAUDE_PLUGIN_ROOT}/shared/trackers.md, and say so in one line.
- If the
dietpowers:prove-doneskill just ran on this state of the branch, use its result; otherwise run the project's full test suite. If anything fails or a success criterion is unmet, report it and stop — the menu comes only after a green suite. - Detect the workspace, capturing all three values now, before anything changes directory:
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)Establish the base branch from the plan's
Base:line, the conversation, or the branch's upstream. If it is not already known, ask — merging into the wrong base is expensive to undo.If the spec or plan is uncommitted because commits were held back, propose commits before the menu: the spec, then the plan. List them with their messages and create them only after your partner approves; then set the plan's
Spec:line to the spec's commit and itsCommits:line toapproved. If your partner declines, offer only to keep the branch as it is.- If
.dietpowers/trackers/open-items.mdhasopenitems, first ask, unless thedietpowers:handle-feedbackskill invoked you, which asks after posting its replies: "There are<N>open items. Triage them now? Reply with triage or later." On triage, invoke thedietpowers:triage-open-itemsskill, then continue. If the branch already has an open pull request, skip the menu. Push the new commits once your partner has approved the push (thedietpowers:handle-feedbackskill asks for it together with the replies; otherwise ask), report the URL, and if another skill invoked you, return to it. Otherwise, ask the integration question the same way as every other question: say the work is complete and what state it is in (base branch, commits, anything unmet), then list the options with their bold labels, recommending the pull request unless your partner has said otherwise, each with a one-line reason, and end with theReply withline. Then wait. The integration decision is your partner's.
On a named branch (a normal repo, or a worktree on a named branch), the options, in this order when the pull request is recommended, are:
- pull request: push the branch and open a pull request against
<base-branch> - merge locally: merge back to
<base-branch>on this machine - keep: keep the branch as it is, to handle later
ending Reply with **pull request**, **merge locally**, or **keep**. If you recommend another option, put it first and reorder the ending to match.
On a detached HEAD, which means an externally managed workspace, there is no merge option:
- pull request: push as a new branch and open a pull request
- keep: keep it as it is, to handle later
ending Reply with **pull request** or **keep**.
- Merge locally: first read this branch's trackers from
$WORKTREE_PATH/.dietpowers/trackers/(those whoseBranch:is this branch) and keep their deferred, won't-fix and rejected findings, since cleanup may remove the worktree. Thencdto the main repo root, thengit checkout <base>,git pull,git merge <feature>. On a conflict, rungit merge --abortand report. Run the tests on the merged result. If they fail, report and offer to undo the merge withgit reset --hard ORIG_HEAD, which needs your partner's confirmation; the branch and worktree stay in place and nothing was pushed. Once green, clean up per step 7, thengit branch -d <feature>. In your final report, list the findings you kept, one line each. Push and PR:
git push -u origin <feature>, or from a detached HEADgit push origin HEAD:refs/heads/<new-branch>. Open the request against the base branch using the forge's CLI or the URL it prints on push. Write the description from what this run produced, fitted to the repo's PR template if it has one:- what changed and why, in two or three sentences, with a link to the spec;
- the commits, one line each, grouped by plan task (
git log <base>..HEAD); - each success criterion with the test or command that shows it, from
prove-done; - every
Changednote in the spec since approval; - from the trackers in
.dietpowers/trackers/whoseBranch:is this branch: each fixed finding with how it was verified and its fix, and each deferred, won't-fix, rejected and duplicate finding with its reason; - anything left open.
Report the URL. Keep the worktree — PR feedback gets fixed there.
- Cleanup, for a local merge only. Run it from outside the worktree, using the values captured in step 2. If
GIT_DIRequalsGIT_COMMONthere is no worktree to remove. IfWORKTREE_PATHis under.worktrees/orworktrees/it is ours:git worktree remove "$WORKTREE_PATH"thengit worktree prune. Otherwise the host environment owns it — leave it in place. No skill deletes a tracker directly; removing a worktree removes the trackers inside it.
Discarding the work happens only when your partner asks for it in so many words. Show exactly what will be deleted — branch, commit list, worktree path — and wait for them to type discard before git branch -D.
Terminal state: after a pull request, when review comments arrive, invoke the dietpowers:handle-feedback skill.
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.

