Ship
PR, green checks, merge, then deploy, migrate and update every target, each one verified.
- Version
- 1.0.0
- Last updated
- Category
- Pull requests
- Works in
- Claude Code, Codex, Cursor, T3 Code
- Requires
- git, gh, python3>=3.8
- Repository
- dxbh0517/skill-ship
Install
npx skills add dxbh0517/skill-shipFinds the skill folder in the repo and installs it for the agents it detects.
Say this
- ship it
- create a PR and merge it
- merge and deploy
- push the migration
- redeploy
Or call it by name where your agent has slash commands: /ship.
SKILL.md
name | ship |
|---|---|
description | Take finished work all the way out — open the PR, get checks green, merge, then run the repo's post-merge steps (deploy, database migration on the right database, update the local instance or container, sync an upstream PR, cut an app build) and verify each one. Use when the user says "ship it", "create a PR and merge it", "PR and merge if checks pass", "merge and deploy", "merge and update the local version", "push the migration", or "redeploy". Not for only reviewing a PR or triaging its comments (pr-triage), auditing features or responsive layouts, writing code without merging, or multi-model orchestration (signalbox). |
Ship
One request, one finished outcome: merged and live where it needs to be. The user should not have to send "now redeploy", "now push the migration", "now update the local container" as follow-ups.
If signalbox (if installed) is already running this task, it owns the PR; use only the post-merge part of this skill (step 5) after its merge. For multi-model work around the ship, use signalbox if installed.
"full stop" (also a closing "Full stop.") → go to the merge gate, leave the PR ready and unmerged, never merge, no post-merge steps. Otherwise invoking this skill authorizes the merge once the gate passes.
Harness notes
| Need | T3 Code | Claude Code / Codex / Cursor |
|---|---|---|
| Open / merge PR | pull_request_create / pull_request_merge | gh pr create / gh pr merge |
| Wait on a PR | watch_pull_request, end turn | one background gh pr checks <n> --watch |
| CI logs / rerun | ci_logs / ci_rerun | gh run view <id> --log-failed / gh run rerun <id> --failed |
| Ask the user | question tool | AskUserQuestion, or a plain question, then stop |
Scratch files (PR body drafts, logs) go to the harness scratchpad, else
${TMPDIR:-/tmp}/ship/<repo>-<YYYYmmdd-HHMM>/.
1. Read the ship file
Look for .ship.md at the repo root. It lists the checks to run before the
PR, the ordered post-merge steps, and things never to do. Format and an
example: references/shipfile.md.
No ship file → run the detector and propose one:
python3 <this skill>/scripts/detect.py # human summary
python3 <this skill>/scripts/detect.py --json # machine-readableIt finds deploy targets (Vercel, Netlify, Fly, Railway, Cloudflare), migration
tools (Prisma, Drizzle, Supabase, Alembic, Knex), which database provider each
DATABASE_URL-style variable points at (provider and host only, never
credentials), compose files and matching running containers, a fork's
upstream remote, and iOS/Android release config. Show the proposed
.ship.md in one block, use it for this run, and ask once at the end whether
to commit it. Do not block the ship on that answer.
2. Pre-flight
git fetch; rebase the branch on the latest base. Never ship from the default branch — branch first.- Read the full diff against the base. It must match the user's goal; drop
stray files (local model docs, scratch, secrets,
.env*) the user did not mean to ship. If the user said what to exclude, check that explicitly. - Run the ship file's pre-PR checks (else the repo's lint, typecheck, test,
build — whatever
package.json/Makefile/CI config runs). Fix real failures before opening the PR. - If the change includes a migration, confirm the migration files are committed and generated from the current schema.
3. PR
Reuse an existing PR for the branch. Otherwise open a real PR (not a draft, so review bots run):
- Title: follow the repo's conventions (recent merged PRs, git log). Say why it matters, not the mechanism: "cut websocket frames by 70% with gzip", not "negotiate permessage-deflate".
- Description: problem first, from the user's request, in a sentence or
two; then what changed and how it was verified. Short, no file inventory.
End with one line naming the model(s) and harness that did the work,
e.g.
Created with <model> in <harness>.Don't guess a model you can't see. - Check title and body for secrets and private details before submitting.
- If
gh pr createfails on the GraphQL rate limit, use REST:gh api repos/<owner>/<repo>/pulls -f title=... -f head=... -f base=... -F body=@<file>.
4. Green and merge
Handle what is already known (failed checks, conflicts, open review threads),
then start one watcher per PR (see Harness notes) and end the turn. Never
write a polling or sleep loop, and never run two watchers on the same PR.
Restart the watcher after each push.
On each wake (pr-triage if installed does this triage in depth):
| Event | Do |
|---|---|
| Preview-deploy or other bot status comment | Not an event. End the turn silently. |
| Check failed | Read the failed log. Repo bug → fix, push. Infra flake → rerun once. |
| Review finding | Verify against the source. Real → fix. Not worth it → reply in one or two sentences with the concrete reason (file:line), resolve the thread. Keep the PR at the size the goal needs. |
| Conflict / BEHIND | Rebase on the base, push, wait for green again. |
| Required checks green | Check the merge gate below. |
| Nothing actionable | End the turn without a message; never post "still waiting". |
Only act on checks and comments newer than the latest push. A wake is news,
not a merge decision. In T3 Code, unwatch_pull_request before stopping to
hand off or ask a question.
Merge gate, checked right after git fetch: required checks green on the
latest head, no unresolved real findings, not BEHIND or DIRTY, no base commits
since the last green run touching the PR's files. Then merge with the repo's
usual method. Never bypass protection. If GraphQL is rate-limited, read the PR
and checks over REST (gh api repos/<owner>/<repo>/pulls/<n>,
.../commits/<sha>/check-runs).
5. Post-merge steps
Run the ship file's "After merge" steps in order, each with its verification. Defaults when the ship file is silent:
| Step | Do | Verify |
|---|---|---|
| Deploy | If the host deploys main on push, do not deploy by hand. Otherwise run the documented deploy command. | The production deployment for the merge commit SHA is READY (Vercel MCP list_deployments/get_deployment, or vercel ls, or the host's CLI). On failure, read the build log, fix forward in a new PR. |
| Migration | Run the migrate-deploy command (prisma migrate deploy, drizzle-kit migrate, supabase db push, alembic upgrade head) against production. | Before running, run detect.py and confirm the target provider and host match what the ship file says (e.g. Neon, not Railway). Mismatch → stop and ask. After: the migrations table lists the new migration. |
| Local instance | git pull in the local checkout the ship file names, then rebuild/restart (docker compose up -d --build <service> or the listed command). | Container is running/healthy and reports the new version or commit. |
| Upstream PR | For forks: push the merged change to the branch behind the upstream PR, or open one if the ship file says so. | The upstream PR shows the new commits. |
| App build | Trigger the listed build (Codemagic, fastlane, EAS). | Build started and its ID/link is reported. Do not wait for store review. |
Production data changes, destructive migrations (drops, column removals with data), and store submissions need the user's go-ahead unless the ship file or the request grants it.
6. Report
Short: PR link and merged SHA, then one line per post-merge step with its
result and evidence (deployment URL, migration name, container status, build
link). List anything skipped and why. If you created or changed .ship.md,
say so.
Files
Changelog
[1.0.0] - 2026-11-28
Added
- Standalone
skills/ship/layout withskill.json, trigger evals, CI and the vendored validator. - PR title/description rules and the one-watcher wait loop inlined, so the skill no longer depends on other private skills.
- Harness notes for T3 Code, Claude Code, Codex and Cursor.
detect.py: Android app detection; fixture tests for every detector.
Fixed
detect.pycould print a database username or password as the "host" when the password contained/or#.detect.pycrashed on apackage.jsonthat is not a JSON object; upstream remotes now drop credentials for any URL scheme.