ship
Commit, push, ensure a PR exists, capture screenshots, and attach them to the PR.
- License 许可
- MIT
- 最近更新
- 2026-10-25
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- ship
- description
- Commit, push, ensure a PR exists, capture screenshots, and attach them to the PR.
03 SKILL.md 正文
Ship
This skill is a thin wrapper over scripts/ship.sh. Do not perform the steps the script performs — invoke the script and let it drive.
Step 1: Gather state
Run these in parallel:
git status
git diff HEAD
git log --oneline -10
git branch --show-current
gh pr view --json url,state 2>/dev/null || true
Step 2: Draft commit message (if needed)
If the working tree has staged or unstaged changes, draft a conventional-commit message in present tense that focuses on "why" over "what", following the repository's existing commit style.
Do not add an AI Co-Authored-By trailer unless the current tool provides an exact configured trailer. Never copy another tool's trailer or invent an email address. If no exact trailer is configured, omit the AI trailer.
Write it to .ship-commit-msg (gitignored).
Step 3: Draft PR title and body (if needed)
If no PR exists for the current branch, draft a PR title and body using this template:
> [!NOTE]
> This PR title, description, and code were generated with [active agent tool].
## Summary
One or two sentence overview.
## Changes
* change one, one sentence
* change two, also one sentence
* no more than ten bullet points
## Example
Screenshots go here instead of a comment
Write the body to .ship-pr-body.md (gitignored).
Use the current tool's display name for [active agent tool]: OpenAI Codex, Claude Code, or Cursor. If the tool is different, use its actual display name. Never attribute one tool's work to another tool.
Step 4: Invoke the script
Always run bash scripts/ship.sh, adding flags only for state that needs action:
- Include
--commit-msg-file .ship-commit-msgonly if there were changes to commit. - Include
--pr-title "..."and--pr-body-file .ship-pr-body.mdonly if no PR existed.
The script auto-detects a clean tree and an existing PR — --screenshots-only is no longer required and is kept only as a back-compat fast-path to skip commit/push/ensure-PR.
Example (commit + new PR):
bash scripts/ship.sh \
--commit-msg-file .ship-commit-msg \
--pr-title "feat: brief summary" \
--pr-body-file .ship-pr-body.md
Example (already committed and PR exists — no flags needed):
bash scripts/ship.sh
Step 5: Handle failure
If the script exits non-zero, read the INVARIANT VIOLATED: line it printed. The script prints a compact filtered view of the Xcode output on failure; full logs are at .build/ship-*.log:
- Pre-flight build failure →
.build/ship-preflight-build.log - Screenshots build failure →
.build/ship-screenshots.log
Fix the root cause, then re-invoke scripts/ship.sh.
Do not silently retry, bypass the invariant, or improvise an alternative path.
Step 6: Report
Print the PR URL the script printed on its final line.
Rules
- Never force-push
- Never commit files that likely contain secrets (.env, credentials, keys)
- Never skip the script and perform steps by hand
- Never introduce a new fake or injected screenshot to satisfy
ship; the## Exampleimages must reflect real app behavior (see issue #221)
04 同仓库更多 Skills
workflow
Development workflow for this repo: plan → test → implement → human review → repeat. Load when starting any feature, bug fix, or refactor.
usernotifications-documentation
UserNotifications official doc index — load when building notification features, requesting authorization, scheduling local notifications, handling notification actions, or any UserNotifications framework behavior.
swiftui-macos-form-alignment
SwiftUI macOS Form layout: alignment override bug, background control, and VStack-based alternative. Load when debugging alignment issues inside Form rows, or when row controls (toggles, text fields, pickers) are visually misaligned with their labels on macOS.
swiftui-documentation
SwiftUI official doc index — load when building SwiftUI views, modifiers, state management, data flow, AppKit bridging, or any SwiftUI behavior.
swifterm-documentation
SwiftTerm official doc index — load when building SwiftTerm features, terminal emulation, terminal views, process lifecycle, delegate callbacks, GPU rendering, pseudo-terminals, or any SwiftTerm-specific behavior. Any project that uses or interacts with SwiftTerm should load this skill.
sqlite-documentation
SQLite official doc index — load when working with SQLite, the C/C++ API, import SQLite3, prepared statements, binding, query execution, result codes, or any SQLite-specific behavior. Any project that uses or interacts with SQLite should load this skill.