Agent skill

Finishing A Development Branch

by coco-research in coco-research/coco

A skill your agent uses when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it.

MITAuto-check passedDevelopment

Install Finishing A Development Branch

skills CLI
$ npx skills add coco-research/coco --skill finishing-a-development-branch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install coco-research/coco finishing-a-development-branch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/coco-research/coco.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/finishing-a-development-branch .claude/skills/finishing-a-development-branch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
finishing-a-development-branch
GitHub stars
513
Token cost
~1.1k tokens
SKILL.md length
358 words
Files
2
Skills in repo
63
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it.

  • Works in 5 steps: Verify Tests → Determine Base Branch → Present Options → …
  • Implementation is done and tests pass and the user must choose to merge locally
  • SKILL.md covers Overview, The Process, Quick Reference and Common Mistakes, plus 2 more sections
  • Calls git, npm and gh

What it does

Finishing A Development Branch is an agent skill from coco-research/coco. Use when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it. Presents those four options, executes the choice, and cleans up the worktree for merge and discard.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Development, covering Git worktrees and Pull requests. The repository describes itself as: CoCo Super Intelligence is the orchestration layer that turns Claude Code, Cursor, or Codex into an engineering department: a routed advisory board, 226 skills, 386 commands… The licence is MIT.

When your agent uses it

  • Implementation is done and tests pass and the user must choose to merge locally
  • Keep the branch

Example prompts

  • “/finishing-a-development-branch”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Verify Tests
  2. Determine Base Branch
  3. Present Options
  4. Execute Choice
  5. Cleanup Worktree

What it can do on your machine

Read from SKILL.md and the folder at commit 1a642ae. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, npm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Finishing A Development Branch loads about 1.1k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 358 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from coco-research/coco at commit 1a642ae, republished under its MIT licence (© coco-research). 358 words, ~1,111 tokens.

Download SKILL.mdSave it as .claude/skills/finishing-a-development-branch/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
finishing-a-development-branch
description
Use when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it. Presents those four options, executes the choice, and cleans up the worktree for merge and discard.
domain
engineering

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:

bash
# 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
bash
# Try common base branches
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null

If that prints nothing (neither branch exists), ask the user which base branch to use and wait for the answer. Do not continue with <base-branch> unset.

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
bash
# 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
bash
# 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>
EOF
)"

Then: keep the worktree (no cleanup for Option 2)

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:

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

Then: Cleanup worktree (Step 5)

Step 5: Cleanup Worktree

For Options 1 and 4:

Check if in worktree:

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

If yes:

bash
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)
Show full SKILL.md (144 more words)Show less

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

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 - after all tasks complete (see its Integration section)
  • executing-plans (Step 3: Complete Development) - after all batches complete

Pairs with:

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

© coco-research, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/finishing-a-development-branch of coco-research/coco.

  • SKILL.md
  • LICENSE

Open the folder on GitHubat commit 1a642ae

Compare with similar skills

Finishing A Development Branch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Finishing A Development Branch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Finishing A Development Branch this skillcoco-research/coco513—~1.1kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Cap Feature Building WorkflowCapSoftware/Cap23k—~2.5kAutomated safety check: WarnCustom licence
Om Auto Fix Issuego-musicfox/go-musicfox2.6k1 repos~5kAutomated safety check: NotesGPL-3.0
Codewhale Landing Workflowcodewhale-hq/Codewhale41k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings
  • Om Auto Fix Issue

    go-musicfox/go-musicfox

    Fix or implement a tracker issue end to end from a single command — takes an issue id or a plain problem description (filed first via om-prepare-issue), classifies, then drives the bug autofix chain…

    2.6k GitHub starsUsed in 1 repo~5k tokens
    DevelopmentAuto-check: notes
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Complete Branches

    jtenniswood/espcontrol

    Clean up completed Git branches and worktrees for this repository both locally and on GitHub.

    1.1k GitHub stars~820 tokensUpdated today
    DevelopmentAuto-check passed

More from coco-research/coco

All 63 skills in this repo
  • Coco Ads

    coco-research/coco

    Turn the project you just shipped into a short, polished, shareable launch video (an "ad") using HyperFrames.

    513 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Arch Index

    coco-research/coco

    Build and validate .arch/index.json — a committed map from each architectural component of this repository to the real directories and files that implement it, pinned to a git commit, with every…

    513 GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Openai Agents

    coco-research/coco

    Build AI applications with OpenAI Agents SDK - text agents, voice agents, multi-agent handoffs, tools with Zod schemas, guardrails, and streaming.

    513 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Skill Evolution

    coco-research/coco

    A skill your agent uses when running, reviewing or changing coco's self-evolution cycle: the 30-day loop that observes how skills are actually used, proposes evidence-backed edits to them as one…

    513 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Coco Diagram

    coco-research/coco

    A skill your agent uses for architecture, current-state, process, data-flow, medallion, or DP diagrams, including redrawing .drawio and Mermaid sources.

    513 GitHub stars~9.2k tokensUpdated today
    Auto-check passed
  • API Design Principles

    coco-research/coco

    A skill your agent uses when designing a new REST or GraphQL API, reviewing an API spec before implementation, setting team API standards, or migrating REST to GraphQL.

    513 GitHub stars~3.4k tokensUpdated today
    Auto-check passed

Categories

Questions about Finishing A Development Branch

What does Finishing A Development Branch do?

A skill your agent uses when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it. Finishing A Development Branch is an agent skill from coco-research/coco. Use when implementation is done and tests pass and the user must choose to merge locally, open a PR, keep the branch, or discard it.

When should I use Finishing A Development Branch?

Finishing A Development Branch fits situations like: implementation is done and tests pass and the user must choose to merge locally; keep the branch.

How do I install Finishing A Development Branch in Claude Code?

Run `npx skills add coco-research/coco --skill finishing-a-development-branch -a claude-code`. Or copy the skill folder (skills/finishing-a-development-branch in coco-research/coco) into .claude/skills/finishing-a-development-branch in your project. Claude Code loads it when a task matches its description.

How do I install Finishing A Development Branch in Codex?

Run `npx skills add coco-research/coco --skill finishing-a-development-branch -a codex`. Or copy the skill folder (skills/finishing-a-development-branch in coco-research/coco) into .agents/skills/finishing-a-development-branch in your project. Codex loads it when a task matches its description.

Can I use Finishing A Development Branch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add coco-research/coco --skill finishing-a-development-branch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/finishing-a-development-branch, .gemini/skills/finishing-a-development-branch, .github/skills/finishing-a-development-branch and .opencode/skills/finishing-a-development-branch in your project.

What does Finishing A Development Branch need to run?

Going by SKILL.md and its folder, Finishing A Development Branch needs the command-line tools its instructions call (git, npm and gh).

Does Finishing A Development Branch access the network?

SKILL.md contains no URLs. Its commands use git, npm and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Finishing A Development Branch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Finishing A Development Branch use?

Finishing A Development Branch is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Finishing A Development Branch use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Finishing A Development Branch?

Skills that share tags, products or a category with Finishing A Development Branch: Finishing a Development Branch (obra/superpowers, 297k stars), Pre-Release PR Triage (jamiepine/voicebox, 57k stars), Cap Feature Building Workflow (CapSoftware/Cap, 23k stars) and Om Auto Fix Issue (go-musicfox/go-musicfox, 2.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Finishing A Development Branch?

coco-research (a GitHub user) maintains it in coco-research/coco, which has 513 GitHub stars. The repository holds 63 skills in this directory. The repository was last updated on October 10, 2026.

Source: coco-research/coco on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.