Skills for Real Engineers. Straight from my .agents directory.
finishing-a-development-branch
Agent skill fromobra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
How to install finishing-a-development-branch
npx skills add obra/superpowers# or add only this skill to Claude Code: copy the folder
skills/finishing-a-development-branch/
# into
~/.claude/skills/finishing-a-development-branch/ (all projects)
.claude/skills/finishing-a-development-branch/ (one project)
1# Finishing a Development Branch23## Overview45**Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.67**Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."89## Step 1: Verify Tests1011Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`).1213**If tests fail**, report the failures and stop — the menu comes after a green suite:1415```16Tests failing (<N> failures). Must fix before completing:1718[Show failures]19```2021**If tests pass:** continue to Step 2.2223## Step 2: Detect Environment2425```bash26GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)27GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)28# Capture now, while still inside the workspace — Step 5 changes directory29# before cleanup (Step 6) needs this value30WORKTREE_PATH=$(git rev-parse --show-toplevel)31```3233This determines which menu to show and how cleanup works:3435| State | Menu | Cleanup |36|-------|------|---------|37| `GIT_DIR == GIT_COMMON` (normal repo) | Standard 3 options | No worktree to clean up |38| `GIT_DIR != GIT_COMMON`, named branch | Standard 3 options | Provenance-based (see Step 6) |39| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |4041## Step 3: Determine Base Branch4243The base branch is whatever this work forked from — usually named in the44…
Excerpt shown under the repository's MIT license.
More skills in superpowers
Similar skill repositories
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create motion, prototypes, websites, apps, dashboards, presentations, images, and videos with your team and AI agents. Share work, exchange feedback, and iterate together in one workspace.
