ship-branch

Automate pushing, merging, and cleaning up feature branches with safety guardrails.

2|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/nodatall/primedirective --skill ship-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ship-branch
Source: https://github.com/nodatall/primedirective/tree/main/skills/ship-branch
Command: npx skills add https://github.com/nodatall/primedirective --skill ship-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually shipping feature branches requires juggling multiple git commands, GitHub CLI operations, and validation steps, with high risk of human error, leftover branches, or merging unvalidated code.

Core Features & Use Cases

  • End-to-end branch shipping: Automates the full workflow from handling uncommitted changes to pushing, PR creation/merge, and cleaning up local and remote branches.
  • Built-in safety guardrails: Stops for ambiguous state, failed CI checks, or unapproved actions, never force pushes or deletes the base branch.
  • Use case: When you finish a feature on a development branch, use this skill to safely merge it to main, run required validation, and clean up all branch artifacts without manual step-by-step git or GitHub work.

Quick Start

Use the ship-branch skill to finish your current feature branch by pushing it, creating or using an existing PR, merging it after required checks pass, and cleaning up all related local and remote branches.

Frequently Asked Questions about ship-branch

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

FAQPage Schema
How do I automate git branch merging and cleanup after finishing a feature?

Automating git branch merging requires a workflow that pushes your feature branch, creates a PR, merges after CI checks pass, and deletes local and remote branches. This eliminates manual multi-step git and GitHub CLI operations and the risk of missed cleanup steps.

What is the safest way to merge a feature branch to main while CI checks are running?

Safe feature branch merging waits for required GitHub PR checks to pass before proceeding. Built-in guardrails prevent merging unvalidated code, stop for ambiguous state, and ensure local merge gates are respected without force pushing.

Can I ship a feature branch if I have uncommitted changes in my git working directory?

Yes, shipping a feature branch handles uncommitted changes during the workflow. The process manages your local state before pushing, ensuring your working directory is safely accounted for prior to PR creation and merging.

How do I prevent accidental force pushes or base branch deletion when shipping code?

Preventing accidental force pushes and base branch deletion requires built-in safety guardrails. The branch shipping workflow stops for unapproved actions and explicitly protects the base branch from being deleted or overwritten.

Does automated branch shipping work with GitHub PR check monitoring and local merge gates?

Yes, automated branch shipping integrates with GitHub PR check monitoring and local merge gates. It waits for required validation to pass and respects repo-specific rules before merging your feature branch to the main codebase.