ship-pr
Commit, push, open a pull request, wait for green CI, then squash merge and close the issues it finishes.
- License 许可
- MIT
- 最近更新
- 2026-10-27
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ship-pr
- license
- MIT
- description
- Commit, push, open a pull request, wait for green CI, then squash merge and close the issues it finishes.
- argument-hint
- [message hint]
- compatibility
- Requires git and an authenticated gh CLI.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml157 B
03 SKILL.md 正文
Commit every change, push, open a pull request, and merge it once CI is green. Never commit onto the default branch. The arguments, if any, are a hint at what the change is about, not the message itself.
Start from the session's working directory. When this session's work sits in another worktree (git worktree list), run every step there with git -C <path> and leave the working directory's changes untouched.
- Run
git status --short --branch,git diff HEAD --stat,git log --oneline origin/HEAD..HEAD(the branch commits),git log --oneline -10, andgh api 'repos/{owner}/{repo}/actions/permissions' --jq .enabled(whether Actions is enabled). Read the full diff (git diff HEAD), every untracked filegit statuslists, and, when there are branch commits, their diff (git diff origin/HEAD...HEAD) before writing anything. Read each issue the branch commits reference (#N) with the Read an issue operation indocs/agents/issue-tracker.md, since its comments hold the triage brief, or withgh issue view N --json title,body,commentswhen that file is missing. - Scan it for credentials, tokens, private keys, and any value that does not belong in this repository. If you find one, stop, commit nothing, and report what you found.
- If the current branch is the repository's default branch, create and switch to a new one first:
type/kebab-description, wheretypematches the Conventional Commit type you are about to use and the description comes from the change itself. Any branch commits move to the new branch with it: then rungit branch -f <default> origin/<default>so the default branch matches its remote and the merge can fast-forward it. - Stage the changes. Prefer explicit paths over
git add -A. An untracked directory that holds a local tool's state (an index, cache, or database, such as.codegraph/) belongs in the root.gitignore, even when it ships its own.gitignore: add its path there, stage that line with the rest, and say so in the report. - Write a Conventional Commit
type(scope): description, matching the subject style already ingit log. When theoss-writingskill is installed, call the Skill tool with it for the wording. - Commit, then
git push -u origin HEADwith a 10-minute timeout: a pre-push hook can run the whole test suite. gh pr create. The squash merge makes the title the one commit on the default branch, so the title and body cover the whole branch: your commit's subject when it is the branch's only commit, otherwise one Conventional Commit subject spanning every commit. Use the repository's pull request template when it has one. Otherwise, call the Skill tool with "pr" for the body, and call it again with "oss-writing" for the wording when that skill is installed, even when no commit was written in step 5.- Actions enabled
falsein step 1 means the repository runs no CI: skip the watch and treat it as green. Otherwise,gh pr checks --watchuntil every check settles. It exits non-zero on failure, so allow that and read the result. CI takes a few seconds to register a new pull request, so when it reports no checks,sleep 20and watch again. No checks the second time means the branch runs no CI: treat it as green. - Green:
gh pr merge --squash --delete-branch. When the branch is checked out in a worktree,--delete-branchcannot delete it: first confirmgit -C <worktree> status --shortis empty, then remove the worktree and merge in one shell call that starts in the main checkout (cd <main checkout> && git worktree remove <worktree> && gh pr merge ...), since removing the session's own worktree deletes the working directory the next call would start in. Red: stop, name the failing check and the reason, and merge nothing. Do not retry, do not fix, do not merge past a failure. - Merged: close each issue the branch commits reference (
#N, or a local issue path) that is still open, since the merge is what finishes it and a closed issue unblocks the tickets that wait on it. Use the Close operation indocs/agents/issue-tracker.mdwith the commentMerged in <PR URL>., orgh issue close N --commentwhen that file is missing. - Report the PR URL, whether it merged, each issue you closed, and the
.gitignoreline from step 4 if you added one.
04 同仓库更多 Skills
writing-for-agents
Writing documents for agents. Use when creating or editing skills, modifying AGENTS.md or CLAUDE.md, or writing any doc an agent reaches by a pointer.
what-would-you-do
Explain the question you just asked and recommend an answer, with the case for and against each option.
wayfinder
Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
wait-what
Stop. That last message did not land: re-pitch it.
triage
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
to-tickets
Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).