finish-branch

finish-branch is a skill for Claude Code, Codex from shousper/claude-kit. It costs 94 tokens per session (1,525 once invoked), scanned A, original, MIT.

A branch-completion skill that checks whether tests pass and then guides you through merging locally, opening a draft pull request, keeping the branch, or discarding it.

In plain words
What is it for?
Use it when a feature branch is ready to wrap up, merge, turn into a pull request, keep, or discard.
Why use it?
It gives unfinished development work a clear final check and makes the next branch action explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a feature branch is ready to wrap up, merge, turn into a pull request, keep, or discard.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shousper/claude-kit/finish-branch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shousper/claude-kit --skill finish-branch
Clone the repo
git clone --depth 1 https://github.com/shousper/claude-kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for finish-branch

README.md
[![agentmods](https://agentmods.dev/badge/skills/shousper/claude-kit/finish-branch/github.svg)](https://agentmods.dev/skills/shousper/claude-kit/finish-branch)
Your own site
<a href="https://agentmods.dev/skills/shousper/claude-kit/finish-branch"><img src="https://agentmods.dev/badge/skills/shousper/claude-kit/finish-branch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for finish-branch

Your own site · 80×15
<a href="https://agentmods.dev/skills/shousper/claude-kit/finish-branch"><img src="https://agentmods.dev/badge/skills/shousper/claude-kit/finish-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.01525
Opus 5 $0.00047 $0.00763
Sonnet 5 $0.00019 $0.00305
Haiku 4.5 $0.00009 $0.00153

Measured 8d ago against content hash 9a5167c293b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

finish-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

shared/skills/finish-branch/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Finishing a Development Branch

Overview

Guide completion of development work by presenting clear options and handling chosen workflow.

Core principle: Verify tests -> Present options -> Execute choice.

Announce at start: "I'm using the finish-branch skill to complete this work."

The Process

Step 1: Verify Tests

Skip the re-run when verification is already fresh. If build-flow's final Verify stage (or another full-suite run this session) passed AND nothing has changed since — check git status is clean relative to that run and no files were edited after it — do not re-run. Report: "Tests verified by build-flow's final verification; no changes since." and continue to Step 2. Your human partner can always ask for a re-run.

Otherwise, verify tests pass:

# Run project's test suite — read the summary, not the full output
npm test / cargo test / pytest / go test ./...  2>&1 | tail -30

Never read full passing test output into your context — the summary line is the evidence. On failure, extract only the failing cases.

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.

Step 2: Determine Base Branch

Identify the base branch (typically main or master). If uncertain, ask: "This branch split from main -- is that correct?"

Step 3: Present Options

Present exactly these 4 options:

Implementation complete. What would you like to do?

1. Merge back to <base-branch> locally
2. Commit, push, and create a draft Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work

Which option?

Don't add explanation — keep options concise.

Step 4: Execute Choice

Option 1: Merge Locally

Your human partner should run /commit first to commit their changes.

Staging guidance:

  • Do NOT stage docs/plans/*.md (design docs, implementation plans)

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 217 lines · 94 tokens per session scan A 9a5167c293b5

Subscribe to this mod's changes

finish-branch is a skill published in the GitHub repository shousper/claude-kit (4 stars, last pushed 3d ago), licensed MIT. It adds 94 tokens to every session and 1,525 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens