home / skills / vadimcomanescu / codex-skills / finishing-a-development-branch

This skill helps you finish a development branch by syncing with the base, running tests, removing leftovers, and preparing for review.

npx playbooks add skill vadimcomanescu/codex-skills --skill finishing-a-development-branch

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
647 B
---
name: finishing-a-development-branch
description: Use when preparing to finish a development branch. Ensure tests pass, changes are clean, and the branch is ready for review or merge.
---

# Finishing a Development Branch

Prepare a branch for review or merge with a clean, verified state.

## Quick Start
1) Sync with the target base branch.
2) Run relevant tests and linters.
3) Review diff for scope creep or leftovers.
4) Update docs or release notes if needed.

## Guardrails
- Don’t merge without tests or explicit approval.
- Avoid mixing unrelated changes in the same PR.

## References
- Extended examples: `references/examples.md`

Overview

This skill streamlines the final checks and cleanup when preparing a development branch for review or merge. It guides you to synchronize with the target base, verify tests and linters, and ensure the branch contains only intended changes. The goal is a high-quality, review-ready branch that can be confidently merged.

How this skill works

The skill inspects the branch state, runs or recommends running the relevant test suites and linters, and prompts a focused diff review to catch scope creep or leftover debug code. It also identifies missing documentation or release-note updates and enforces simple guardrails like requiring tests or explicit approvals before merging.

When to use it

  • Before opening a pull request from a development branch
  • When preparing a hotfix or feature branch for integration into the mainline
  • After rebasing or merging the target base into your branch
  • When a review has been requested but automated checks are failing
  • Before cutting a release candidate from a development branch

Best practices

  • Always sync the branch with the target base branch and resolve conflicts locally
  • Run the full test suite and linters; treat failures as blocking issues
  • Review diffs for unrelated changes, debug statements, or sensitive data
  • Split unrelated work into separate branches or follow-up PRs
  • Update documentation and release notes for user-visible changes

Example use cases

  • A feature branch needs a final run of unit and integration tests before PR creation
  • A teammate rebased a branch and you need to verify no regressions were introduced
  • Preparing a branch for code review to ensure diffs are focused and small
  • Finalizing a bugfix branch to include a changelog entry and verify tests pass

FAQ

What if tests are flaky or take too long?

Prioritize fixing flaky tests or isolating slow tests; use targeted test runs for the changed areas and include a note in the PR if longer integration tests are pending.

Can I merge without updating docs?

Avoid merging user-visible changes without documentation. For small internal tweaks, document in follow-up PRs but call that out in the description and ensure reviewers agree.