Ship
Ship git changes by grouping them into small isolated commits and pushing. Use when user asks to ship, push, commit and push, or "/ship". Analyzes all unstaged/staged changes, groups them into logical isolated commits by concern, commits each group with a clear message, then pushes to the remote.From its SKILL.md
npx -y skills add jamesrwhite/skills --skill shipAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.0 KB, as published. Nobody here has run it
Ship — Group, Commit, and Push
Overview
Analyse all current git changes (staged and unstaged), split them into the smallest reasonable logical groupings, commit each group with a clear and succinct message describing what changed and why, then push the branch.
All mechanical git/gh operations are delegated to ship.sh (next to this file) so they run deterministically. Your job is the judgment calls: grouping changes, writing messages, drafting PR copy, and deciding when to pause and ask. Never call git/gh directly for anything ship.sh already covers — use the script so behaviour stays consistent across runs.
Resolve the script path relative to this SKILL.md file and call it as $SHIP throughout, e.g.:
SHIP=/absolute/path/to/ship.sh
"$SHIP" status
1. Understand the current state
"$SHIP" status
This prints the current branch, remote, git status --porcelain, diff stats (staged and unstaged), and the last 5 log entries.
2. Read the full diff
"$SHIP" diff
Look at every changed file and understand what changed and why. Group by logical concern — not by file type or directory, but by the reason the change exists.
Good groupings:
- All changes that implement a single feature or fix a single bug
- A dependency bump and any code changes it required
- A config change and the code that uses it
- Tests for a specific area
- A pure refactor with no behaviour change
Bad groupings:
- Everything in one commit
- One file per commit when files are tightly coupled
- Mixing unrelated changes
3. Check the branch
"$SHIP" check-branch
If this exits non-zero, you're on main/master — pause and confirm with the user before doing anything further.
4. Stage and commit each group
For each logical group, stage only the relevant files and commit:
"$SHIP" stage path/to/file1 path/to/file2
This prints the resulting staged file list — review it before committing (this is also your chance to catch secrets: .env, credentials, private keys). If a file mixes unrelated concerns and needs hunk-level splitting, or there are untracked files you're unsure about, ask the user rather than guessing.
Before the first commit, determine the Co-Authored-By trailer based on your own identity:
| Agent | Trailer |
|---|---|
| Claude (Anthropic) | Co-Authored-By: Claude [Model Name] <[email protected]> |
| GitHub Copilot | Co-Authored-By: GitHub Copilot <[email protected]> |
| OpenAI Codex / ChatGPT | Co-Authored-By: OpenAI Codex <[email protected]> |
| Gemini | Co-Authored-By: Google Gemini <[email protected]> |
| Amazon Q | Co-Authored-By: Amazon Q <[email protected]> |
| Windsurf | Co-Authored-By: Windsurf <[email protected]> |
| Cursor | Co-Authored-By: Cursor <[email protected]> |
Use the row that matches your identity. If you are Claude, substitute your specific model name (e.g. Claude Sonnet 4.6). If your agent is not listed, use Co-Authored-By: [Your Agent Name] <noreply@ai>.
Write the commit message to a temp file (via the Write tool, not shell interpolation) — a short, direct description of what changed and why, then a blank line, then the trailer — and commit from it. Use a unique filename (e.g. /tmp/ship-commit-msg-$$.txt) so concurrent invocations of this skill don't clash, and delete the file once the commit succeeds:
MSG_FILE="/tmp/ship-commit-msg-$$.txt"
# write MSG_FILE via the Write tool, then:
"$SHIP" commit --message-file "$MSG_FILE"
rm -f "$MSG_FILE"
Good commit message style:
- Say what changed and why, not how
- One sentence is usually enough; add a blank line + body only when context is genuinely non-obvious
- Present tense, imperative: "add retry logic" not "added retry logic"
- Under 72 characters on the first line
Repeat stage → write message file → commit until "$SHIP" status shows nothing left.
5. Push
"$SHIP" push 2>&1 | tee /tmp/ship-push-output.txt
ship.sh handles setting the upstream automatically if the branch has none.
6. Offer to create a PR (if applicable)
Check whether a PR prompt appeared in the push output, and whether gh is available:
"$SHIP" needs-pr /tmp/ship-push-output.txt # exit 0 = no PR yet
"$SHIP" gh-available # exit 0 = gh is installed
If needs-pr exits non-zero, a PR likely already exists — skip this step silently. If gh-available exits non-zero, skip silently.
Otherwise, use AskUserQuestion to prompt the user with a single question:
- Question: "No PR exists for this branch — would you like me to create one?"
- Options:
- "Draft PR" — create the PR in draft state
- "Ready for review" — create the PR ready for review
- "No PR" — skip PR creation
If the user chooses "No PR", skip silently.
Otherwise, draft a title and body from the commits just pushed. Use the same agent identity you determined for the Co-Authored-By trailer to populate the generated-by footer — e.g. 🤖 Generated with Claude Sonnet 4.6 or 🤖 Generated with GitHub Copilot. Write the title and body to files (via the Write tool) so nothing gets shell-interpolated, then run:
"$SHIP" create-pr --mode draft \
--title-file /tmp/ship-pr-title.txt \
--body-file /tmp/ship-pr-body.txt
# or --mode ready
Body template:
## Summary
<bullet points derived from the commits>
## Test plan
- [ ] <relevant test steps>
🤖 Generated with <agent name and version>
Show the PR URL after creation.
7. Confirm
"$SHIP" summary
Then respond with a selection of ship/rocket emojis to celebrate the launch. 🚀🛸⛵🚢🛳️🌊💫🔥
Safety Rules
- Never commit secrets — skip
.env, credentials, private keys. Warn the user. - Never skip hooks (
--no-verify) unless the user explicitly asks.ship.shnever passes it. - Never force-push
mainormaster.ship.shhas no force-push path. - If a commit hook fails — fix the issue, re-stage, and create a NEW commit via
"$SHIP" commit. Do not--amend. - Never stage everything blindly —
ship.sh stagetakes explicit paths, never.or-A; always review"$SHIP" statusfirst. - If already on
main/master—"$SHIP" check-branchwill flag it; pause and confirm with the user before pushing.
Tips
- When a single file mixes two concerns, fall back to
git add -p path/to/filedirectly (not wrapped byship.sh, since it's interactive) or ask the user how to split it. - If there are untracked files you're unsure about, ask the user before staging them.
- Aim for commits that make sense independently — each one should build and be reviewable alone.