ship

star 0

Commit changes and ship pull requests

u29dc By u29dc schedule Updated 3/21/2026

name: ship description: Commit changes and ship pull requests argument-hint: [commit or pr preferences] allowed-tools: Bash, Read, Write, Glob, Grep, Edit

Ship

Commit changes with deterministic batching and execute safe repository-specific pull request flow. If the user invokes this skill without extra instructions, assume the task is to commit the relevant local changes and push the current branch to its configured remote.

How to Use

  • /ship - create optimal commit batches for the current changes, commit them, and push the current branch
  • /ship pr - create, validate, and merge a PR using the repo's configured source and base branches
  • /ship only src/lib single commit - scope and batching override

Arguments

Optional: $ARGUMENTS

  • no arguments: default to standard commit-and-push flow on the current branch
  • path scope: only <path>
  • file filter: <glob> only
  • batching override: single commit or separate commits
  • message context: free text hints for subject/body wording

Commit Workflow

  1. Read status and full diff (git status --porcelain, git diff HEAD).
  2. Load commit rules from commitlint.config.js if present; otherwise use conventional defaults.
  3. Classify changes by type/scope and detect unrelated clusters.
  4. Determine batching strategy (auto or argument override).
  5. For each batch: reset staging, stage exact files, generate compliant message, commit.
  6. Push the current branch to its configured upstream remote unless the user explicitly requested commit-only behavior.
  7. Report commit SHAs, titles, scopes, file counts, and push target.

Commit Message Contract

  • Header MUST be type(scope): subject.
  • Header MUST be lowercase, imperative, <=100 chars, no trailing period.
  • Body MUST be present and explain rationale, not only restate diff.
  • Body SHOULD use concise dash bullets when multiple reasons exist.

Git Commit Execution

  • MUST write commit message to /tmp/commit-msg.txt then commit with git commit -F /tmp/commit-msg.txt.
  • MUST NOT use heredoc syntax (<<EOF) for commit messages; shell heredocs create temp files that fail under macOS sandbox.
  • MUST remove the temp file after successful commit.

Batching Rules

  • Single commit when changes share one type/scope and are tightly coupled.
  • Multiple commits when independent concerns can be reviewed/reverted separately.
  • Never mix docs/chore/refactor with feature/fix work unless tightly coupled.

PR Workflow (/ship pr)

  1. Validate environment: clean tree, remotes configured, gh authenticated, and source/base branches identified from repo policy.
  2. Sync the source branch with remote before PR creation.
  3. Analyze the commit range between source and base branches and derive PR title type/scope.
  4. Create the PR with summary body and risk/testing notes.
  5. Detect and watch required checks (CI, deployment, release workflows).
  6. Abort with actionable failure context if checks fail or timeout.
  7. Merge using the repo's required strategy; default to merge commit when no stricter policy exists.
  8. Sync affected long-lived branches per repo policy.
  9. Report PR URL, merge commit SHA, and release tag if produced.

PR Title Contract

  • Format: type(scope): subject.
  • Type priority when mixed: feat > fix > refactor > perf > docs > style > test > chore.
  • Scope priority: derive from commits/paths; fallback repo.

Safety Rules

  • MUST preserve unrelated staged work if outside requested scope.
  • MUST avoid force-push during normal ship flow.
  • MUST avoid deleting long-lived repo branches.
  • MUST avoid squash merges unless explicitly requested or required by repo policy.
  • SHOULD block merge when required checks are missing or failing.

Quality Standards

  • Commitlint-compliant headers and scopes.
  • Commit bodies included for every commit.
  • Atomic commit grouping with clear review boundaries.
  • Clean staging boundaries between batches.
  • PR checks verified before merge.
  • Final branch state synced per repo policy.
  • Clear report with exact next-state verification commands.
Install via CLI
npx skills add https://github.com/u29dc/dot --skill ship
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator