# Finish Development Branches Safely

Completed branches need a clear, verified path to integration or cleanup. This skill checks tests, presents four choices, and executes the selected Git workflow.

## Install

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

## Metadata

- Status: approved
- Slug: davila7-finishing-a-development-branch
- Skillstore revision: r2
- Version status: missing
- Tree hash: 8264c95dce7e7273b92236c138af4f14b33cf983ca412570bbecd6a28b65bdef
- Author: davila7
- GitHub username: davila7
- License: MIT
- Repository: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/development/finishing-a-development-branch
- Ref: c43861a65bb95efcae259cd161c9d6f4dc7eec6f
- 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/davila7-finishing-a-development-branch
- Manifest: https://skillstore.pages.dev/api/skills/davila7-finishing-a-development-branch/manifest

## Capabilities

- Runs the project test suite before offering completion choices.
- Identifies a likely base branch using Git merge-base.
- Offers local merge, pull request, preservation, and discard workflows.
- Pushes a selected branch and prepares a pull request with a test plan.
- Requires typed confirmation before force-deleting a branch.
- Removes associated worktrees after selected completion workflows.

## Use Cases

- Complete a Solo Feature: Verify a feature branch, merge it locally, retest the result, and remove the completed branch.
- Prepare a Team Review: Push tested work and create a pull request with a concise summary and verification plan.
- Clean Up Release Worktrees: Review completed branches and remove worktrees only after the selected workflow permits cleanup.

## Prompt Templates

### Finish My Current Branch

```
Finish the current development branch. Run the appropriate tests, then present the available integration and cleanup options.
```

### Create a Pull Request

```
Verify this branch, push it to the configured remote, and create a pull request with a summary and test plan.
```

### Merge Locally and Retest

```
Determine the base branch, verify the feature branch, merge locally, retest the merged result, and clean up the completed branch.
```

### Review a Complex Worktree

```
Inspect the current branch and worktree relationships. Present all completion options, preserve anything uncertain, and require explicit confirmation before destructive actions.
```

## Limitations

- Requires an existing Git repository with a completed development branch.
- Depends on the project test command being available and correctly configured.
- Pull request creation requires GitHub CLI authentication and a configured remote.
- Base branch detection may require user confirmation for uncommon repository layouts.

## Best Practices

- Run the complete relevant test suite before selecting an integration workflow.
- Confirm the detected base branch when the repository uses uncommon branch names.
- Review branch, commit, and worktree details before confirming permanent deletion.

## Anti Patterns

- Do not merge or open a pull request while required tests are failing.
- Do not remove a worktree that must remain available for review or later work.
- Do not force-delete a branch without exact, explicit user confirmation.

## Security Audit

- Audited at: 2026-07-23T13:58:13.033\+00:00
- Summary: All 24 static findings are false positives caused by Markdown code fences, constrained local shell substitutions, and benign standard-device redirection. The documented Git workflow includes explicit confirmation before destructive branch deletion, with no evidence of prompt injection or malicious intent.

## Stats

- Views: 251
- Downloads: 7
- Favorites: 0
- Popularity score: 0
