finish-branch
Skill3 starsChanged 5 months agoMITView on GitHub
Use when deciding how to integrate, preserve, or discard work on a branch or isolated checkout.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- slowernet/dietpowerstheir own version, first seen Oct 4, 2026
- Chrike/coding-agent-skillstheir own version, first seen Aug 4, 2026
- KhaledSaeed18/dotclaudetheir own version, first seen Jul 4, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- KhaledSaeed18/dotclaude★ 5same name
- Chrike/coding-agent-skills★ 1same name
- slowernet/dietpowers★ 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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- action-selectionSkill
- bypassSkill
- commit-workSkill
- decision-gateSkill
- design-for-depthSkill
- diagnose-failureSkill
- discussSkill
- evaluate-skillSkill
- execute-workSkill
- handoffSkill
- launch-workSkill
- migration-workSkill
- release-workSkill
- review-artifactSkill
- review-workSkill
- setup-freeflowSkill
- simplify-codeSkill
- track-workSkill
- verify-workSkill
- workflowSkill
- write-docsSkill
- write-planSkill
- write-skillSkill
- write-specSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 17 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
Before offering or executing a route, inspect:
- Distinctive: line 24
Do not infer the base, remote destination, pull-request target, or workspace owner when the wrong choice could lose work or affect …
- Distinctive: line 28
Use Release Work for a separately approved versioned release and Launch Work for a separately approved production deployment or rollout.
- Distinctive: line 40
delete local or remote branches.
- Distinctive: line 55
no source conflict, owner decision, required evidence gap, or repository gate blocks the route.
- Distinctive: line 57
Read Verify Work when matching branch-readiness claims to evidence.
- Distinctive: line 66
use the repository's accepted merge or rebase policy.
- Distinctive: line 67
stop when a conflict requires a behavior, source, or owner decision.
- Distinctive: line 68
verify the integrated result on the resulting base state.
- Distinctive: line 69
delete branch or worktree state only when cleanup was included in the approved route and integration verification succeeded.
- Distinctive: line 75
create or update the pull request using repository conventions.
- Distinctive: line 88
Before destructive action, state exactly which commits, paths, branches, worktrees, and remote state would be lost and what remains …
- Distinctive: line 90
Do not treat “finish,” “clean up,” a menu number, or approval of integration as confirmation for broader destruction.
- Distinctive: line 94
Do not remove a worktree, checkout, session, or harness state you did not create or are not authorized to manage.
- Distinctive: line 96
Do not run destructive reset, clean, branch deletion, worktree removal, remote deletion, or force push merely to produce a clean status.
- Distinctive: line 102
Use Diagnose Failure when integrated checks fail without a supported cause.
- Distinctive: line 109
commit and dirty state handled or preserved.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Close a branch or isolated checkout without confusing readiness, integration, publication, and cleanup authority.
A verified branch does not authorize merge or push. A chosen integration route does not automatically authorize branch deletion, worktree removal, release, or deployment.
Inspect The Exact State
Before offering or executing a route, inspect:
- current branch, detached state, repository root, and worktree ownership;
- base branch or merge base supported by repository evidence;
- commits and diff relative to the base;
- staged, unstaged, and untracked work;
- upstream, remote, and ahead/behind state;
- fresh verification, silent self-review, and any selected independent-review status;
- CI, policy, or repository gates relevant to the intended route.
Do not infer the base, remote destination, pull-request target, or workspace owner when the wrong choice could lose work or affect collaborators.
After inspecting branch, base, remote, dirty state, verification, and workspace ownership, read integration options before choosing local integration, pull request, preservation, discard, or cleanup. Use Commit Work when the selected route requires a local commit or simple push; do not commit merely to make branch status look finished.
Use Release Work for a separately approved versioned release and Launch Work for a separately approved production deployment or rollout.
Keep Route Authority Explicit
Loading this skill, asking whether a branch is ready, or approving a general implementation Plan does not authorize merge, rebase, push, pull-request creation, branch deletion, worktree removal, discard, force push, release, or deployment.
The user owns whether to:
- integrate locally and by which repository-supported method;
- push or create/update a normal or draft pull request;
- preserve the branch, worktree, or dirty state;
- discard commits or uncommitted work;
- delete local or remote branches;
- rewrite or force-push history;
- clean up a checkout or worktree.
Present only routes supported by the observed state. Do not force a fixed menu when an option is impossible, unsafe, or irrelevant. Approval of one route covers only the scope shown and accepted.
State Readiness Honestly
Present a branch as ready for its intended integration boundary only when:
- the accepted branch outcome is clear;
- intended commits and remaining dirty state are known;
- fresh direct evidence supports the branch claim;
- silent self-review has no unresolved material issue;
- any selected independent review is resolved for the unchanged state;
- no source conflict, owner decision, required evidence gap, or repository gate blocks the route.
Read Verify Work when matching branch-readiness claims to evidence. A feature-branch pass does not prove the integrated result.
Unverified or failing work may still be preserved, handed off, or shared through an explicitly approved draft route. State the gaps; do not describe it as integration-ready.
Execute Only The Chosen Route
Local Integration
- refresh base evidence without overwriting local work;
- use the repository's accepted merge or rebase policy;
- stop when a conflict requires a behavior, source, or owner decision;
- verify the integrated result on the resulting base state;
- delete branch or worktree state only when cleanup was included in the approved route and integration verification succeeded.
Pull Request
- inspect remote and upstream state before pushing;
- push only intended commits to the accepted destination;
- create or update the pull request using repository conventions;
- mark incomplete or failing work as draft when that is the approved route;
- report CI, review, merge, migration, release, or launch requirements still pending;
- preserve the worktree when iteration or feedback may continue.
A pull-request URL proves creation, not readiness or merge.
Preserve
Report the branch, worktree, commit and dirty state, evidence status, reason preserved, and next approved route. Read Handoff only when continuation needs durable transfer context.
Discard
Before destructive action, state exactly which commits, paths, branches, worktrees, and remote state would be lost and what remains recoverable. Require explicit confirmation for that concrete scope.
Do not treat “finish,” “clean up,” a menu number, or approval of integration as confirmation for broader destruction.
Protect Workspace Ownership
Do not remove a worktree, checkout, session, or harness state you did not create or are not authorized to manage. If ownership is unclear, preserve it and report the uncertainty.
Do not run destructive reset, clean, branch deletion, worktree removal, remote deletion, or force push merely to produce a clean status.
Return Conflicts And Failures
Resolve a conflict locally only when both sides' intended behavior is settled and the resolution is mechanical. Return behavior, source-truth, API, data, security, compatibility, or architecture conflicts to Workflow.
Use Diagnose Failure when integrated checks fail without a supported cause. Return mixed or unrelated branch contents to Commit Work, which owns staging decisions. Preserve branch state before re-entering another owning activity.
Report The Chosen Outcome
Report:
- branch, base, and selected route;
- commit and dirty state handled or preserved;
- integration, push, or pull-request result;
- verification on the final observed state;
- selected-review and repository-gate status;
- cleanup performed or deliberately omitted;
- unresolved CI, review, migration, release, or deployment work;
- recoverability and next approved route.
Branch closeout is complete only for the chosen route. A pushed branch is not merged, a merged branch is not released, and a released artifact is not deployed.
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.

