git-ship

Validate Git branches, diffs, and commit messages before pushing or merging.

2|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/LiozShor/claude-code-skills --skill git-ship-liozshor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-ship
Source: https://github.com/LiozShor/claude-code-skills/tree/main/git-ship
Command: npx skills add https://github.com/LiozShor/claude-code-skills --skill git-ship-liozshor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, and includes scripts (resource) components.

What problem does it solve?

This Skill ensures secure and controlled Git commits and pushes, providing mandatory validation checks and user confirmation to prevent errors and protect the integrity of the codebase.

Core Features & Use Cases

  • Branch Guard: Prevents commits on main/master to enforce feature branching.
  • Multi-Tab Safety: Checks for foreign hunks and suggests selective staging for mixed changes.
  • Conventional Commit: Enforces a structured commit message format.
  • Push and Merge Confirmation: Asks for explicit user confirmation before pushing or merging to main.
  • Worktree-Aware Merge: Supports both multi-worktree and single-checkout repos.
  • Post-Merge Deploy: Handles post-push file updates and deployment steps.
  • Closing Design Logs: Automates design log closure after successful merge.

Quick Start

Invoke this skill with "ship it" or "commit this" before any Git write operation, like commit, push, merge, or rebase.

Frequently Asked Questions about git-ship

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

FAQPage Schema
How do I prevent accidental commits to the main branch in Git?

Git commit safety mechanisms restrict direct writes to main or master branches, enforcing feature branching workflows. This prevents accidental commits by validating the current branch and prompting explicit user confirmation before allowing any merge or push operations to protected branches.

How can I enforce conventional commit message formats automatically?

Automated Git commit validation enforces conventional commit message formats by intercepting the commit process and verifying message structure before finalizing changes. This standardizes commit history by rejecting improperly formatted messages and prompting the user to correct them.

What is the best way to selectively stage mixed changes in a Git repository?

The best way to selectively stage mixed changes is to review diffs for foreign changes and suggest selective staging for mixed changes. This multi-tab safety approach prevents unrelated code from being bundled into a single commit, maintaining cleaner commit history and code integrity.

How do I validate my current branch before pushing code?

To validate your current branch before pushing code, you can use entry points that review diffs for foreign changes and enforce conventional commit formats. This ensures branch validation and asks for explicit user confirmation before executing the push to main or merging changes.

Does Git support explicit confirmation prompts before merging to main?

Yes, Git workflows can enforce explicit confirmation prompts before merging to main by using mandatory validation scripts. These scripts ask for user confirmation before pushing or merging to main, while supporting both multi-worktree and single-checkout repositories.

When do I need branch protection for my active Git repositories?

You need branch protection for active Git repositories when you want to prevent errors and protect codebase integrity during collaborative development. It ensures secure and controlled commits by enforcing feature branching, validating diffs, and requiring explicit confirmation for main branch updates.