finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
npx skills add guanyang/open-agent-hub --skill finishing-a-development-branch --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Finishing a Development Branch ## Overview **Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up. **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work." ## Step 1: Verify Tests Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`). **If tests fail**, report the failures and stop — the menu comes after a green suite: ``` Tests failing (<N> failures). Must fix before completing: [Show failures] ``` **If tests pass:** continue to Step 2. ## Step 2: Detect Environment ```bash 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) # Capture now, while still inside the workspace — Step 5 changes directory # before cleanup (Step 6) needs this value WORKTREE_PATH=$(git rev-parse --show-toplevel) ``` This determines which menu to show and how cleanup works: | State | Menu | Cleanup | |-------|------|---------| | `GIT_DIR == GIT_COMMON` (normal repo) | Standard 3 options | No worktree to clean up | | `GIT_DIR != GIT_COMMON`, named branch | Standard 3 options | Provenance-based (see
- Overview
- Step 1: Verify Tests
- Step 2: Detect Environment
- Step 3: Determine Base Branch
- Step 4: Present Options
- Step 5: Execute Choice
- Option 1: Merge Locally
- Option 2: Push and Create PR
- Option 3: Keep As-Is
- If your human partner asks to discard the work
- Step 6: Cleanup Workspace
- Quick Reference
- Common Rationalizations
Capture now, while still inside the workspace — Step 5 changes directory before cleanup (Step 6) needs this value Get main repo root for CWD safety cd "$MAIN_ROOT" Merge first — verify success before removing anything git checkout <base-branch> git pull git merge <feature-branch> Verify tests on merged result git branch -d <feature-branch>
What does the finishing-a-development-branch skill do?
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
How do I install it?
Run `npx skills add guanyang/open-agent-hub --skill finishing-a-development-branch --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From guanyang/open-agent-hub, a repository with 948 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.