# Finish Development Branches Safely

Finishing a branch requires safe choices after tests pass. This skill guides Claude, Codex, and Claude Code through merge, PR, keep, or discard workflows.

## Install

```bash
npx skillstore add cycleaddict/finishing-a-development-branch
```

## Metadata

- Status: approved
- Slug: cycleaddict-finishing-a-development-branch
- Skillstore revision: r1
- Version status: missing
- Tree hash: 8264c95dce7e7273b92236c138af4f14b33cf983ca412570bbecd6a28b65bdef
- Author: Cycleaddict
- GitHub username: Cycleaddict
- License: MIT
- Repository: https://github.com/Cycleaddict/generic-superpowers/tree/main/skills/finishing-a-development-branch
- Ref: 02f077c174c5335e2f5d02ca15e77b70d9543e58
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/cycleaddict-finishing-a-development-branch
- Manifest: https://skillstore.pages.dev/api/skills/cycleaddict-finishing-a-development-branch/manifest

## Capabilities

- Verifies tests before presenting branch completion options.
- Finds a likely base branch with git merge-base or asks for confirmation.
- Presents four clear paths: merge locally, create a PR, keep the branch, or discard work.
- Guides local merge, push, PR creation, and cleanup commands.
- Requires typed confirmation before discarding branch work.
- Handles worktree cleanup differently for merge, PR, keep, and discard choices.

## Use Cases

- Complete a Feature Branch: Verify tests, choose a completion path, and clean up branch state after implementation.
- Prepare a Pull Request: Push a finished branch and create a PR with a concise summary and test plan.
- Close Worktree-Based Tasks: Finish a temporary worktree branch while preserving or removing the worktree as selected.

## Prompt Templates

### Finish Current Branch

```
Use this skill to finish my current development branch. Verify tests, then present the four completion options.
```

### Create a Pull Request

```
Use this skill to verify my branch and guide me through pushing it and creating a pull request.
```

### Merge Locally

```
Use this skill to finish the branch with a local merge. Confirm tests pass before and after the merge.
```

### Finish Worktree Implementation

```
Use this skill after a multi-worktree implementation. Identify the base branch, verify tests, present options, and apply my selected cleanup path.
```

## Limitations

- Requires a working Git repository and a known project test command.
- Depends on the GitHub CLI for pull request creation.
- Does not decide team policy for merging or reviewing changes.
- Does not proceed when tests fail or discard work without confirmation.

## Best Practices

- Run the relevant test suite before choosing any completion path.
- Confirm the base branch before merging or deleting feature work.
- Use typed confirmation before any discard or branch deletion step.

## Anti Patterns

- Do not offer merge or PR options while tests are failing.
- Do not delete a branch or worktree without exact user confirmation.
- Do not clean up a worktree when the selected path keeps it available.

## Security Audit

- Audited at: 2026-07-05T07:59:41.499\+00:00
- Summary: Static analysis flagged Markdown code fences and shell examples used to document a Git completion workflow. I found no prompt injection, credential access, network exfiltration, or hidden execution intent in SKILL.md.

## Stats

- Views: 247
- Downloads: 6
- Favorites: 0
- Popularity score: 0
