# Finish Development Branches Safely

Completing a feature branch often requires tests, merge decisions, and cleanup. This skill guides Claude, Codex, and Claude Code through safe branch finishing choices.

## Install

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

## Metadata

- Status: approved
- Slug: zhanlincui-finishing-a-development-branch
- Skillstore revision: r1
- Version status: missing
- Tree hash: 8264c95dce7e7273b92236c138af4f14b33cf983ca412570bbecd6a28b65bdef
- Author: ZhanlinCui
- GitHub username: ZhanlinCui
- License: MIT
- Repository: https://github.com/ZhanlinCui/Ultimate-Agent-Skills-Collection/tree/main/finishing-a-development-branch
- Ref: 64ca8af0f54a325752f08bd54e52151061ea659a
- 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/zhanlincui-finishing-a-development-branch
- Manifest: https://skillstore.pages.dev/api/skills/zhanlincui-finishing-a-development-branch/manifest

## Capabilities

- Prompts the assistant to verify project tests before branch integration.
- Helps identify the likely base branch before merge or PR decisions.
- Presents four completion paths: local merge, pull request, keep branch, or discard.
- Defines Git and GitHub CLI steps for merge, PR creation, deletion, and worktree cleanup.
- Requires explicit confirmation before destructive discard actions.

## Use Cases

- Complete a Feature Branch: A developer can ask the assistant to verify tests, choose an integration path, and clean up after the work is complete.
- Prepare a Pull Request: A team member can push a finished branch and create a PR with a concise summary and test plan.
- Close Temporary Worktrees: A maintainer can remove finished local branches and worktrees after merge or explicit discard confirmation.

## Prompt Templates

### Finish This Branch

```
Use the finishing-a-development-branch skill. Verify tests, identify the base branch, then present the completion options before taking action.
```

### Create a Pull Request

```
Use the finishing-a-development-branch skill to finish this work. If tests pass, help me push the branch and create a pull request.
```

### Merge Locally and Clean Up

```
Use the finishing-a-development-branch skill. Verify tests, confirm the base branch, merge locally if I choose that option, then verify tests again.
```

### Audit Completion Choices

```
Use the finishing-a-development-branch skill and explain the safest completion path for this repository after checking tests, branch state, and worktree status.
```

## Limitations

- Does not replace project-specific release, review, or CI policies.
- Assumes Git and, for pull requests, GitHub CLI are available and authenticated.
- Commands include placeholders that the assistant must adapt and verify before execution.
- Local merges and deletions can change repository state when approved by the user.

## Best Practices

- Run the project test suite before choosing any completion path.
- Confirm destructive discard actions with exact typed consent.
- Re-run tests after a local merge before deleting the feature branch.

## Anti Patterns

- Merging or opening a PR while tests are failing.
- Deleting a branch or worktree without explicit confirmation.
- Assuming the base branch without checking repository history or asking the user.

## Security Audit

- Audited at: 2026-07-08T12:58:32.137\+00:00
- Summary: The static findings are false positives from Markdown code fences, documented Git examples, command substitution used for visible CLI arguments, and /dev/null redirection. No prompt injection, concealed exfiltration, or malicious intent was found in SKILL.md.

## Stats

- Views: 183
- Downloads: 15
- Favorites: 0
- Popularity score: 0
