branch-finalization — Claude Code skill: what it does, how to install
branch-finalization verifies tests, presents four clear next steps, and handles merging, pull requests, or branch cleanup.
LicenseRef-Proprietary 131 installs ★ 50 updated 2026-01-05
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a claude-codeWhat branch-finalization does
This skill establishes a strict protocol for closing out feature branches. It starts by running project tests with npm test, pytest, cargo test, or go test. If any test fails, execution halts immediately. Merging or opening a PR on broken code is blocked.
Once tests pass, it locates the base branch and offers exactly four choices: merge locally, push and submit a PR via gh, retain the branch, or discard changes. Discarding requires typing an exact confirmation word to prevent accidental loss. Without that confirmation, nothing is deleted.
Depending on the chosen path, the skill checks for an active git worktree and removes it when merging locally or discarding the branch.
What it helps with
- merging untested commits into the base branch
- creating structured pull requests via gh CLI
- cleaning up temporary git worktrees after integration
- safely discarding abandoned feature branches with explicit confirmation
Example prompts for the agent
- Finalize this branch and verify tests.
- Wrap up work on the current feature branch.
- Prepare this branch for merging into main.
How to install branch-finalization
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a claude-code2Manually: put the files in place
~/.claude/skills/branch-finalization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/branch-finalization/
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a codex2Manually: put the files in place
.agents/skills/branch-finalization/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a cursor2Manually: put the files in place
.cursor/skills/branch-finalization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install qodex-ai/ai-agent-skills skills/branch-finalization2Manually: put the files in place
.github/skills/branch-finalization/SKILL.md1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a gemini-cli2Platform CLI
gemini skills install https://github.com/qodex-ai/ai-agent-skills --path skills/branch-finalizationManually: put the files in place
.devin/skills/branch-finalization/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about branch-finalization
How to install branch-finalization in Claude Code?
Run npx skills add qodex-ai/ai-agent-skills --skill branch-finalization -a claude-code in your terminal.
What does branch-finalization do?
It checks test results, detects the base branch, and guides you through local merging, opening a PR, keeping changes, or discarding the branch.
What happens if tests fail?
The workflow stops right away. It displays test failures and refuses to show merge or PR options until the issues are fixed.