Agent skill · software engineering · aiskillstore
finishing-a-development-branch
Git branch completion workflow. Use when implementation is complete, tests pass, and a feature branch needs to be integrated via merge, pull request, or cleanup.
Why this skill is useful
Adds a detailed, executable workflow for merging branches that includes specific commands and error handling not commonly found in standard documentation.
What it needs
Requires gh installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Finishing a Development Branch The Process Step 1: Verify Tests Determine test runner from project structure: package.json → npm test or yarn test Cargo.toml → cargo test pyproject.toml / setup.py → pytest go.mod → go test ./... Makefile with test target → make test Run tests. If any fail, report ⊘ BLOCKED:TESTS with failure count and stop. Do not proceed to Step 2. Step 2: Determine Base Branch Find the branch this feature diverged from: Select the candidate with the most recent merge-base (closest ancestor). If multiple branches share the same merge-base or detection is ambiguous, ask: "This branch could target main or develop. Which should it merge into?" Store the result - subsequent steps reference <base-branch> meaning this determined value. Step 3: Present Options Present exactly these 4 options: Step 4: Execute Choice Option 1: Merge Locally If merge conflicts: Stop. Do not proceed. If merge succeeds: Then: Cleanup worktree (Step 5). Report ✓ MERGED. Option 2: Push and Create PR Verify gh CLI is available: Extract title from first commit on branch (original intent): Report ✓ PRCREATED with PR URL. Keep worktree intact for continued work during review. Option 3: Keep As-Is Report ✓ PRESERVED with branch name and worktree path. Do not cleanup worktree. Option 4: Discard Confirm first: Wait for exact confirmation. If not received, abort. If confirmed: Then: Cleanup worktree (Step 5). Report ✓ DISCARDED. Step 5: Cleanup Worktree For Options 1 and 4 only: For Options 2 and 3: Keep worktree intact. Quick Reference Option Merge Push Keep Worktree Cleanup Branch -------- ------- ------ --------------- ---------------- 1. Merge locally ✓ - - ✓ 2. Create PR - ✓ ✓ - 3. Keep as-is - - ✓ - 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/finishing-a-development-branch