finish-branch

Restore branch skeleton files, run CI checks, and open or ready pull requests.

11|2|Updated Sep 8, 2015
One-click install
npx skills add https://github.com/jitrapon/astro-mobile --skill finish-branch-jitrapon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finish-branch
Source: https://github.com/jitrapon/astro-mobile/tree/main/.claude/skills/finish-branch
Command: npx skills add https://github.com/jitrapon/astro-mobile --skill finish-branch-jitrapon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the repetitive end-of-branch cleanup work that often slows down shipping, helping you safely prepare a completed feature branch for review and merge.

Core Features & Use Cases

  • Branch Wrap-Up: Restores agent working files to the main branch skeleton and keeps branch-specific audit state out of the final diff.
  • Validation and Safety Checks: Verifies that the working tree is clean, CI passes, and adversarial review findings are properly resolved or tracked.
  • PR Automation: Pushes the branch, detects whether a pull request already exists, converts drafts to ready when appropriate, and creates a new PR when needed.
  • Use Case: After finishing a feature and clearing review feedback, use this Skill to finalize the branch and get a review-ready pull request without missing required checks.

Quick Start

Ask the skill to finish the current branch, run the required checks, and open or ready the pull request.

Frequently Asked Questions about finish-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate pull request creation and branch cleanup before merge?

Automate pull request creation and branch cleanup by resetting working files to the main branch skeleton, verifying CI passes, and pushing the branch to open or ready a PR. This ensures a clean working tree and review-ready state without manual file restoration.

What is the best way to transition a draft pull request to ready for review?

Transitioning a draft pull request to ready for review involves verifying CI passes, confirming adversarial review findings are resolved, and converting the draft state. The process detects existing PRs and safely shifts them to a review-ready status.

How do I verify CI and review readiness before opening a GitHub pull request?

Verify CI and review readiness by executing build and test gates, auditing review state, and validating a clean working tree. This gate execution ensures all required checks pass and adversarial review findings are properly tracked before PR creation.

Does this branch wrap-up workflow require the GitHub CLI to open a pull request?

Yes, this branch wrap-up workflow requires the GitHub CLI to handle push operations, detect existing pull requests, and safely create new ones. Safe GitHub CLI handling ensures deterministic release completion during the end-of-branch finalization.

Why do my agent working files show up in the final pull request diff?

Agent working files show up in the final diff because they were not reset to the main branch skeleton before pushing. Restoring skeleton files while keeping branch-specific audit state separate prevents unwanted files from entering the PR.

When should I not use automated branch finalization for pull requests?

You should not use automated branch finalization when your working tree has uncommitted changes or CI checks are failing. The process requires a clean working tree and successful build and test gate execution to guarantee a deterministic release.