MCPInstall

finishing-a-development-branch

Presents options for merge, PR, or cleanup. Use when work is complete, tests pass, and you must decide how to integrate.

Installs
82
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/jamditis/claude-skills-journalism --skill finishing-a-development-branch
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads finishing-a-development-branch automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

<!-- Adapted from obra/superpowers finishing-a-development-branch skill (v5.0.7), MIT-licensed, copyright 2025 Jesse Vincent. Modifications copyright 2026 Joe Amditis. Pure consumer port, no research phase per the v0.2.0 architecture, since branch finishing is a downstream wrap-up of work whose strategic decisions were already made upstream. SKILL.md byte-identical to upstream after the attribution block strip. See CREDITS.md. -->

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 → Clean up.

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

The Process

Step 1: Verify Tests

Before presenting options, verify tests pass:

# Run project's test suite
npm test / cargo test / pytest / go test ./...

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

# Try common base branches
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null

Or 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. Push and create a 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

# Switch to base branch
git checkout <base-branch>

# Pull latest
git pull

# Merge feature branch
git merge <feature-branch>

# Verify tests on merged result
<test command>

# If tests pass
git branch -d <feature-branch>

Then: Cleanup worktree (Step 5)

Option 2: Push and Create PR

Before you push:

  • Keep the PR to one concern. Split unrelated changes into separate PRs, or stack them.
  • Get the independent cross-provider review on the exact head (see requesting-code-review).
  • Run the checks locally first. Push once when the branch is ready, so hosted CI runs once.
# Push branch
git push -u origin <feature-branch>

# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>

## Test Plan
- [ ] <verification steps>

Refs #<issue>
EOF
)"

Use Refs #n when the repository deploys after merge, and close the issue only after a live check. Use a closing keyword only when merge itself makes the change live. For a stacked PR, state its parent PR, base branch, and position in the stack.

Merging is a separate decision. Do not merge a PR without the owner's explicit approval for that PR.

Then: Cleanup worktree (Step 5)

Option 3: Keep As-Is

Report: "Keeping branch <name>. Worktree preserved at <path>."

Don't cleanup worktree.

Option 4: Discard

Confirm first:

This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>

Type 'discard' to confirm.

Wait for exact confirmation.

If confirmed:

git checkout <base-branch>
git branch -D <feature-branch>

Then: Cleanup worktree (Step 5)

Step 5: Cleanup Worktree

For Options 1, 2, 4:

Check if in worktree:

git worktree list | grep $(git branch --show-current)

If yes:

git worktree remove <worktree-path>

For Option 3: Keep worktree.

Quick Reference

OptionMergePushKeep WorktreeCleanup Branch
1. Merge locally✓--✓
2. Create PR-✓✓-
3. Keep as-is--✓-
4. Discard---✓ (force)

Common Mistakes

Skipping test verification

  • Problem: Merge broken code, create failing PR
  • Fix: Always verify tests before offering options

Open-ended questions

  • Problem: "What should I do next?" → ambiguous
  • Fix: Present exactly 4 structured options

Automatic worktree cleanup

  • Problem: Remove worktree when might need it (Option 2, 3)
  • Fix: Only cleanup for Options 1 and 4

No confirmation for discard

  • Problem: Accidentally delete work
  • Fix: Require typed "discard" confirmation

Red Flags

Never:

  • Proceed with failing tests
  • Merge without verifying tests on result
  • Delete work without confirmation
  • Force-push without explicit request
  • Treat "merged" as "live" when a deploy step remains

Always:

  • Verify tests before offering options
  • Present exactly 4 options
  • Get typed confirmation for Option 4
  • Clean up worktree for Options 1 & 4 only

Integration

Called by:

  • subagent-driven-development (Step 7) - After all tasks complete
  • executing-plans (Step 5) - After all batches complete

Pairs with:

  • using-git-worktrees - Cleans up worktree created by that skill

Reference files

Read Claims and cleanup when releasing claims, handling stacked pull requests, or cleaning up after merge.

FAQ

What does the finishing-a-development-branch skill do?

Presents options for merge, PR, or cleanup. Use when work is complete, tests pass, and you must decide how to integrate.

How do I install finishing-a-development-branch?

Run npx skills add https://github.com/jamditis/claude-skills-journalism --skill finishing-a-development-branch in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/finishing-a-development-branch/ (personal) or .claude/skills/finishing-a-development-branch/ (project).

Which AI agents can use finishing-a-development-branch?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is finishing-a-development-branch safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains finishing-a-development-branch?

It is published by jamditis in jamditis/claude-skills-journalism. It has 82 recorded installs.

More from jamditis/claude-skills-journalism

View all →

web-scraping

jamditis/claude-skills-journalism

Authorized web scraping with fallback cascades and access-failure handling. Use for social media, yt-dlp, CAPTCHA or 403 blocks.

academic-writing

jamditis/claude-skills-journalism

Scholarly writing and research compliance. Use for CRediT, preregistration, Plan S, Nelson Memo, preprints, ORCID, LLM disclosure.

Docs & Writing2.9K installs

page-monitoring

jamditis/claude-skills-journalism

Web page change detection, availability tracking, and RSS feed generation. Use to monitor changes, downtime, or make a feed.

DevOps & Cloud604 installs

fact-check-workflow

jamditis/claude-skills-journalism

Structured fact-checking workflow. Use when verifying claims for publication, rating claims, or setting pre-publication checks.

pdf-design

jamditis/claude-skills-journalism

Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.

Docs & Writing505 installs

source-verification

jamditis/claude-skills-journalism

Verify sources, claims, images, video, documents, interviews, and synthetic media with SIFT and a durable evidence trail. Use before relying on uncertain material.

Media & Creative426 installs

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs