skill-finish-branch

Automates branch completion by running tests, reviewing diffs, and creating pull requests.

Updated Aug 15, 2026
One-click install
npx skills add https://github.com/GongYuanCaiJi/dsh-claude-octopus --skill skill-finish-branch-gongyuancaiji
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: skill-finish-branch
Source: https://github.com/GongYuanCaiJi/dsh-claude-octopus/tree/main/.claude/skills/skill-finish-branch
Command: npx skills add https://github.com/GongYuanCaiJi/dsh-claude-octopus --skill skill-finish-branch-gongyuancaiji

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Finishing a development branch involves many error-prone manual steps: verifying tests, reviewing changes, bumping versions, updating changelogs, pushing, and creating PRs. This Skill orchestrates that entire ship pipeline safely, preventing broken code from being merged and work from being accidentally lost. ## Core Features & Use Cases - Test-Gated Shipping: Automatically detects and runs the project's test suite (npm, pytest, cargo, go, make) and stops immediately if tests fail. - Multi-Provider Diff Review: Runs an automated review of the branch diff through the orchestrate.sh script to catch bugs and security issues before they reach PR reviewers. - Version Bump & Changelog: Offers semantic version bumps (patch/minor/major) and generates changelog entries from commit history. - Four Safe Exit Paths: Create a PR via GitHub CLI, merge locally, keep the branch as-is, or discard it with typed confirmation, plus automatic git worktree cleanup. - Use Case: After finishing a feature, say "I'm done, create a PR" and the Skill verifies tests, reviews the diff, pushes the branch, and opens a pull request with a structured description. ## Quick Start Ask the assistant to wrap up the current branch by running tests, reviewing the changes, and creating a pull request for this work.

Frequently Asked Questions about skill-finish-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I finish a git branch and create a pull request automatically?▼

Invoke the branch completion workflow, which verifies tests pass, runs a multi-provider diff review, pushes the branch, and creates a PR using the GitHub CLI with a structured summary and test plan. You choose between PR creation, local merge, keeping, or discarding the branch.

How to run tests before merging a feature branch?▼

The Skill auto-detects the project's test runner by checking for package.json, pytest.ini, pyproject.toml, Cargo.toml, go.mod, or a Makefile test target, then executes the matching command. If tests fail, the process stops and shows the failures before any merge occurs.

Can I discard a git branch without losing work accidentally?▼

Yes, the discard option requires typing the exact word 'discard' after displaying the branch name and full commit list. Only after explicit confirmation does it force-delete the local branch and optionally remove the remote branch.

Does the branch finishing workflow support semantic version bumps?▼

Yes, when a VERSION file or package.json exists, it offers patch, minor, or major bumps and prepends a changelog entry generated from the branch's commit history. You can also skip versioning entirely.

What happens to git worktrees after merging a branch?▼

For merge, PR, and discard options, the Skill detects whether the current directory is a git worktree, switches to the main worktree, and removes the feature worktree. The keep-as-is option leaves the worktree untouched.