ship-pr
Skill2 starsChanged 7 months agoMITView on GitHub
Ship the current branch as a pull request. Runs tests, formats code, commits any uncommitted work, pushes the branch, and opens a PR against the base branch with a generated body following the team's PR template. Use when the user says "ship it", "open a PR", "send this for review", or finishes a feature and wants it reviewed.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
30 other projects use a version of this.
Adopted by
Most recently taken up by
- Expensify/Apptheir own version, first seen Nov 15, 2026
- connext-solutions/flowctltheir own version, first seen Nov 15, 2026
- nicholasjconn/skillstheir own version, first seen Nov 15, 2026
- NomadicDaddy/aiddtheir own version, first seen Nov 15, 2026
- labsai/EDDItheir own version, first seen Nov 15, 2026
- devcules/devculestheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ideate, triage and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillideate
Generate image-based alternatives, remixes, or new design directions from a Product Design brief. Use when the user asks for design variants, visual exploration, remixes, or image-generated approaches from provided context.
Also in 4 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 4 projects that use this
GoogleSkilldiagnosing-bugs
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
Also in 3 projects that use this
GoogleSkilldomain-modeling
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
Also in 3 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
- +3 more from google
Other versions30 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 30
- Expensify/App★ 5.1ksame name
- kentcdodds/kentcdodds.com★ 2.5ksame name
- kentcdodds/kody★ 926same name
- pedronauck/skills★ 655same name
- labsai/EDDI★ 394same name
- openbootdotdev/openboot★ 277same name
- gymcoach-app/gymcoach★ 187same name
- Julien-Au/gymcoach★ 187same name
- kentcdodds/kcd-skills★ 64same name
- svyatov/supermatt★ 20same name
20 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- review-prSkill
- save-memorySkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 30 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 25
Before doing anything, verify:
- Distinctive: line 45
If any check fails, stop and report.
- Distinctive: line 55
If it exits non-zero, stop: Read the output, report the failure, and ask the user what to do.
- Distinctive: line 69
If there are uncommitted changes:
- Distinctive: line 71
Read the diff (don't just stage everything blindly)
- Very specific: line 73
If they do: stage explicit files (git add <file1> <file2>), not git add -A
- Very specific: line 74
Write a commit message following .claude/rules/conventions.md (Conventional Commits format)
- Distinctive: line 78
If everything is already committed, skip to Step 3.
- Distinctive: line 96
If the push is rejected (someone else pushed to your branch — rare but possible on shared feature branches):
- Very specific: line 102
Never plain --force — --force-with-lease checks you're not clobbering work you haven't seen
- Distinctive: line 107
Read the commits on this branch:
“Common” is measured: kept by at least 6 in 10 of the 30 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ship PR
You are about to ship the current branch as a pull request. The user has done the work; you are doing the handoff.
This skill is the worked example from the Harness Engineering article. It demonstrates the deterministic-where-possible / LLM-where-needed split: the script does the mechanical steps; you do the judgement steps (writing the PR body, deciding whether to ship at all).
Step 0 — Sanity checks
Before doing anything, verify:
# 1. We're in a git repo
git rev-parse --is-inside-work-tree
# 2. The current branch is not the base branch
CURRENT=$(git branch --show-current)
BASE="${1:-dev}" # Default base from $ARGUMENTS, fallback to "dev"
# If your default base is "main", change the fallback above.
[ "$CURRENT" != "$BASE" ] || { echo "Refusing to ship: current branch is the base branch."; exit 1; }
# 3. The branch has at least one commit ahead of base
AHEAD=$(git rev-list --count "$BASE".."$CURRENT")
[ "$AHEAD" -gt 0 ] || { echo "Refusing to ship: branch has 0 commits ahead of $BASE."; exit 1; }
# 4. gh CLI is installed and authenticated
gh auth statusIf any check fails, stop and report. Do not try to fix the underlying issue without explicit confirmation.
Step 1 — Run the deterministic part
.claude/skills/ship-pr/scripts/run-tests.shThat script formats code, runs the test suite, and exits non-zero on any failure. If it exits non-zero, stop. Read the output, report the failure, and ask the user what to do. Do not retry, do not disable tests, do not push anyway.
This is the line you will not cross: never use --no-verify, never skip a failing
test, never push known-broken code.
Step 2 — Stage and commit any uncommitted work
# Show the user what's about to be committed
git status --short
git diff --statIf there are uncommitted changes:
- Read the diff (don't just stage everything blindly)
- Decide whether the changes belong in this PR or not. If they don't, ask
- If they do: stage explicit files (
git add <file1> <file2>), notgit add -A - Write a commit message following
.claude/rules/conventions.md(Conventional Commits format) - Commit
If everything is already committed, skip to Step 3.
git add <specific files>
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<body explaining why, wrapped at ~72 cols>
EOF
)"Step 3 — Push the branch
git push -u origin "$CURRENT"If the push is rejected (someone else pushed to your branch — rare but possible on shared feature branches):
git fetch origin "$CURRENT"git rebase origin/$CURRENT- Resolve conflicts, then
git push --force-with-lease origin "$CURRENT" - Never plain
--force—--force-with-leasechecks you're not clobbering work you haven't seen
Step 4 — Generate the PR body
Read the commits on this branch:
git log "$BASE".."$CURRENT" --oneline
git log "$BASE".."$CURRENT" --no-merges --format="%B%n---%n"And the diff stats:
git diff "$BASE".."$CURRENT" --statThen draft a PR body following the template in .claude/rules/conventions.md:
## What
<1–3 sentences: the actual change, not a diff summary>
## Why
<the problem this solves; link to the issue if there is one>
## How
<the approach; flag non-obvious decisions>
## Test plan
- [ ] <how the reviewer can verify>
- [ ] <edge case>
- [ ] <regression check>
## Notes for reviewer
<anything you want a second opinion on, deferred work>Fill it from the commits and diff. Do not invent intent. If the commits don't tell you the why, ask the user before writing the "Why" section.
Step 5 — Open the PR
gh pr create \
--base "$BASE" \
--head "$CURRENT" \
--title "<type>(<scope>): <subject>" \
--body "$(cat <<'EOF'
<the body you drafted in step 4>
EOF
)"The title should match the lead commit's subject. If multiple commits, use the most-significant one's subject (or the user's own summary if they gave you one).
Step 6 — Report back
Output to the user:
Shipped: <PR URL>
Title: <title>
Base: <base> ← <branch>
Commits: <count>
Changed: +<additions> / -<deletions> across <files> files
Tests: passed
Format: clean
Next: reviewer is <github handle if known, else "open">.What this skill will not do
- It will not merge the PR. Merging is a separate decision and a separate action.
- It will not request specific reviewers unless the user named them. Auto-tagging the wrong person is annoying.
- It will not skip any step. If the test script fails, the PR doesn't open.
- It will not commit
.env,*.key, or anything matching a secret pattern. The pre-bash hook in.claude/hooks/pre-bash.shwill block it anyway.
When to use a different skill
- You're reviewing someone else's PR → use
review-pr - You're not done yet, just want to push WIP → just
git push, don't use this skill - You want to merge an already-reviewed PR → that's a manual action; not in scope here
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

