durchnull/git/ship
Claude Code and agent skill by durchnull/git
- community
Checking that the SKILL.md file is still in the repository.
Commit changes, push the branch, and open (or update) a PR with a thorough description (--split partitions the dirty tree into several focused PRs)
Install
npx vskill@latest install durchnull/git/shipSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as durchnull/git/ship.
Ship: commit, push, and open a PR
Stage, commit, push, and open (or update) a PR whose description covers the problem, the solution, and anything else useful for a reviewer.
This project's resolved git config — the branch flow and gates every step below refers to:
!node "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-git-config.mjs"
Parse `$ARGUMENTS` first: pull out recognized flags, treat the remaining free text as a hint about what/why (used for the commit message and PR body). If no hint, infer intent from the diff and recent commits. Flags:
--draft— open the PR as a draft.--no-verify— skip the pre-flight quality gates (only when the user asks; note it in your report).--split— the working tree holds several unrelated concerns; partition it into N topic branches
→ N focused PRs. Replaces steps 2–8 with [Split mode](#split-mode---split) below (step 1's survey and step 4's gates still run, per group). The free-text hint, if any, biases the grouping.
--dry-run— only meaningful with--split: produce and show the grouping preview, then stop
without creating any branch, commit, or PR.
This command ships everyday work into the integration tier (and hotfixes into the production tier). Movement along the promotion chain is separate, dedicated commands — do not open them from here:
- integration → pre-production → `/git:promote`.
- pre-production → production (then tag) → `/git:release`.
If the user asks to "release" or "promote" while running ship, point them at those.
Respect this repo's git flow
The config block above is authoritative for the names; the rules that bind ship:
- Every tier in the chain is protected — never commit or push directly to any of them.
Everyday work branches off the integration tier and merges back into it via PR (this command's job).
- Hotfixes cut from the production tier (using the configured hotfix prefix) and PR back into
it. After a hotfix merges, the fix must be merged back down the chain so no tier loses it — remind the user of this in your report.
- Merges use the project's configured merge method; when it preserves every commit (a merge
commit), each one lands verbatim in history — write messages accordingly.
- Whether merged source branches are auto-deleted is a repo setting, not this command's business.
Steps
- Survey the change — one call. Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/ship-prep.mjs" --out <scratchpad>/brief.json (add --no-gates when the user passed --no-verify; add --base <ref> only if the user overrode it). Always pass `--out` and then Read that file — the brief embeds the whole diff, so piping stdout into a parser truncates it (a class of failure that has silently wasted a full gate run). With --out, stdout is only a compact digest (ok, blockers, flow, a gates summary, existingPr) — enough to decide next steps; the file holds the full brief. It does the whole deterministic pre-flight in a single process (progress → stderr). Parse the file — do not re-run the individual git/gh probes it already did.
- Scope the gates to what you'll actually ship (
--only <p1,p2,…>, paths or dir prefixes):
by default gates key off the whole dirty tree, so unrelated dirty files can drag their layer's suites into a ship that doesn't touch them. When the free-text hint clearly narrows scope or the tree obviously spans concerns you won't all stage, pass --only with the subset so layer selection matches the PR. If you can't predict the subset until you've read the diff, do a --no-gates survey first, decide the stage set (step 5), then re-run ship-prep --only <stage-set> for correctly-scoped gates before ship-apply. The brief echoes the applied subset as gateScope (null = whole tree). Its fields drive the rest of the run:
branch,detachedHead,remoteUrl,isProtected,cleanTreeconfig— the resolved chain, roles, prefixes, labels, merge method, and any project deploy
notes / ship reminders. Write your report in these names.
flow`{ base, needsBranch, isHotfix, recommendFreshBranch, freshBranchReason,
branchAheadOfBase, readyForPrOnly } — feeds step 2 (don't re-derive the base). recommendFreshBranch is true when you're on a non-protected branch that carries its own in-flight commits but the pending changes touch **none** of that branch's files — i.e. the changes don't belong here (a stray checkout); needsBranch already folds this in. readyForPrOnly is true when the tree is clean and every commit is already pushed, but the branch is still ahead of base with no open PR — e.g. a prior ship pushed successfully and then failed or was skipped before opening the PR. This is **not** a blocker (see below); it means step 5's plan should skip stage/commit entirely and go straight to pr`.
changedFiles[]— each{ status, path, oldPath? }. `path` is always the current file
(for a rename it's the new path; oldPath carries the source), so you can copy these paths verbatim into plan.stage — including deletions and renames — without splitting -> strings or filtering vanished paths (ship-apply stages with git add -A --, which stages a removal instead of erroring). untracked[] (path + already-read content, truncated flag), diff (capped; diffTruncated ⇒ git diff HEAD -- <path> for more), diffStat, recentCommits[].
unpushedCommits[],existingPr({ url, state, number, body }ornull; already the
highest-numbered, and suppressed on protected branches so old promotion PRs don't false-match).
layers[]— one{ name, touched, forcesFullSuite }per configured gate layer: the
gate-selection inputs, already applied in step 4's run, computed over the ship scope (--only subset if you passed one, else the whole tree). gateScope echoes that subset. A project that configures no layers has an empty list — only the lint gate runs, which is correct, not a fault.
guesses{ branchType, label, slug }— starting points to confirm/override from the
diff, not authoritative (feed steps 3 & 7).
gates— see step 4.blockers[]— human-readable stop reasons (detached HEAD, no origin, **nothing to
ship, PR already MERGED). Non-empty ⇒ report them and stop. (If the user actually wanted a promotion, point them at `/git:promote` or `/git:release`.) Note: "nothing to ship" does not** fire when flow.readyForPrOnly is true — that's a real, if unusual, ship (see above), not a stop condition.
The script exits non-zero when blockers is non-empty or a gate failed, so a non-zero exit with an empty blockers means a gate failed — see step 4. In --split mode this single-PR brief doesn't apply the same way; run the script with --no-gates for the survey and follow Split mode (gates run per isolated group there).
- Determine flow, base, and whether to branch. The brief's
flowalready encodes this
(base, needsBranch, isHotfix, recommendFreshBranch) — use it rather than re-deriving. For reference, the rules it applies (first match wins):
- On a hotfix branch → base is the production tier. (To start a hotfix you must branch from
production: check it out and pull, then step 3.)
- On any protected tier → base is the integration tier;
needsBranchis true (step 3). - On a non-protected branch whose in-flight work is unrelated to the pending changes
(recommendFreshBranch) → base is the integration tier; needsBranch is true, so cut a fresh branch rather than commit onto the mismatched one. Surface flow.freshBranchReason in your report so the re-route is visible; if it looks wrong (the brief judged relatedness by file overlap only), confirm with the user before proceeding.
- Otherwise, already on a non-protected branch → base is the integration tier (or production for
a hotfix); keep the branch. If flow.readyForPrOnly is true, there's nothing to stage or commit — skip straight to step 7 for the PR content, and build step 5's plan with stage omitted.
- Name the branch (when
flow.needsBranch). Decide the<prefix><slug>here; you don't run
git — ship-apply cuts it in step 6 from `flow.base` (not the checked-out HEAD, so a stray branch's commits can't leak in — it carries only the uncommitted changes and aborts if any foreign commit comes along), and treats an existing name as a continuation. Derive a slug from the hint, else the dominant theme of the diff — the brief's guesses.slug/guesses.branchType are naive starting points (basename-derived), so prefer the hint and the actual diff: lowercase kebab-case, 2–4 words, ≤40 chars. Use the project's configured branch prefixes (in config.branchPrefixes) for the type: new functionality, bug fix, tooling/refactor/docs, or urgent production fix. If the name might already exist and it's not an obvious continuation, add a short disambiguator.
- Quality gates — already run in step 1 (unless
--no-verify, which passes--no-gates). The
pre-flight script already ran the diff-scoped gates, in order: any layer marked buildsFirst builds first and alone; then each in-scope layer's typecheck; then lint with one fixer retry; then each in-scope layer's tests — the incremental testChanged form when the layer offers one and nothing in scope forces the full suite, otherwise the full suite, and skipped with a note when a layer's requiresService probe finds the service unreachable. Layer selection is over the ship scope (--only if you passed it — step 1), so a subset ship only pays for the layers it actually touches. Each gate prints a ▸ <name>… marker to stderr as it starts, and a layer marked streamOutput streams live to stderr — so a backgrounded ship shows real-time progress instead of a silent wait. Read the brief's gates:
gates.results[]— one{ name, status: pass|fail|skipped, detail }per gate. Anyfail⇒
stop and report the detail tail; don't commit broken code unless the user says to. A skipped test layer (service unreachable) is a caveat to carry into step 8, not a blocker.
gates.lintFixRewroteFiles: true⇒ the lint fixer edited the working tree; those edits are
part of what you stage in step 5.
gates.ran: false⇒ gates were skipped (--no-gates/--no-verify, or nothing to ship) — note it.gates.cached: true⇒ results were reused from a prior run on the identical tree (same
content, HEAD, base, scope, and gate commands) within the cache TTL, not re-run — the detail is prefixed (cached …s ago). Trust them as if fresh (any content change busts the key). Pass --no-cache to force a re-run if you want to be certain.
- Only re-run a gate yourself if you need to reproduce a failure or the script couldn't (e.g. a
service came up after the fact) — run that layer's configured command.
- Project ship reminders (
config.shipReminders) apply even with--no-verify— they are
correctness checks, not gates. Echo each verbatim and confirm it before committing.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ship/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/durchnull/git/ship)