gbdraw-ship-pr
Skill162 starsChanged 15 days agoMITView on GitHub
Open, watch, and merge a gbdraw pull request into dev - how many PRs and CI slots, body size and screenshots, the language check, auto-merge, when to update other branches, and how to read CI failures. Use when a branch is ready for a PR, while its CI runs, and when it merges.
- Commits and pushes
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Check version literals: If the change bumps a schema or version constant, grep tests/, docs/capture/, docs/recipes/, and tool fixtures for …
- Distinctive: line 40
Never commit screenshots that the Owner pasted.
- Very specific: line 44
Follow .claude/skills/write-clear-pull-request/SKILL.md and choose the change class in the PR template.
- Very specific: line 46
Keep the body under about 60,000 characters.
- Very specific: line 56
When the PR does not expand authority (see AGENTS.md), arm auto-merge: gh pr merge <n> --auto --merge --match-head-commit <full sha>.
- Very specific: line 63
Run gh pr update-branch on other open PRs only under the rules in WEB_CHANGE_POLICY.md, on a conflict, or to pick up a fix they need, never …
- Very specific: line 70
Run one watcher per session, not one per agent: python3 .claude/skills/gbdraw-ship-pr/scripts/watch_prs.py --prs <n> ...
- Very specific: line 75
Before you act on an event line (rebase, update-branch, merge, or report the PR done), re-read the PR with gh pr view <n> --json …
- Distinctive: line 82
When a local check predicts a CI failure, settle it now with CI's own comparison, then fix it or state that nothing is needed.
- Very specific: line 88
Read only failing logs, into a file: gh run view <id> --log-failed > "$TASK_DIR/logs/<id>.log".
- Very specific: line 94
Remove the worktree and the branch (skill gbdraw-worktree) and record the merge in the task's STATE.md (skill gbdraw-campaign).
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ship a gbdraw pull request
This skill covers the procedure only; the content of the PR is decided
elsewhere. AGENTS.md and
docs/internal/WEB_CHANGE_POLICY.md
("Merging pull requests into dev") are the authority. Where they differ from
this skill, they win.
Before opening
- Open few PRs. Each runtime PR runs the full functional Playwright tier (about 40 minutes) on a job limit that every session shares. Fold small fixes into an open PR that touches the same files, and fold behaviour-neutral refactors into the PR they prepare. Keep a PR separate only when it is already in CI, when other work builds on it, or when its class must stay alone (authority, Product Contract, governance).
- Use at most two or three CI slots per session. Serialize PRs that touch
the same files: open the next one only after the previous one merges, then
rebase it on
origin/dev. Stack linearly; never stack through merge commits.CHANGELOG.mddoes not count: while two or more of your PRs are open at once, leave their entries out. Add them together to the last open PR once the others have merged, or in one documentation-only PR afterwards. - Check version literals. If the change bumps a schema or version
constant, grep
tests/,docs/capture/,docs/recipes/, and tool fixtures for the old value, including suites that run only onmain, nightly, or by dispatch. Prefer asserting the exported constant. - Predict the CI tier.
node tools/ci-impact.mjs classify --base origin/dev --head HEAD. - Show visible GUI changes. Take Before (base) and After (branch)
screenshots with the same fixture, viewport, and state, cropped to the
change; add a phone width when a popup or drawer changes. Push the PNGs to
the orphan branch
pr-screenshotsaspr/<PR#>/<name>-before.pngand-after.png, and embedhttps://raw.githubusercontent.com/satoshikawato/gbdraw/pr-screenshots/pr/<PR#>/<file>. Never commit screenshots that the Owner pasted.
Write and open
- Follow
.claude/skills/write-clear-pull-request/SKILL.mdand choose the change class in the PR template. - Keep the body under about 60,000 characters. GitHub refuses a body over
65,536 characters, and "Web base policy (trusted base)" accepts any body
GitHub accepts (
DEFAULT_MAX_BODY_BYTES). Move long tables into a PR comment. - In a bundled PR, list the bug IDs and the former PRs it contains.
- Run
node tools/check-pr-language.mjs --title "<title>" --body-file <file>once, thengh pr create --base dev.
Merge
- When the PR does not expand authority (see
AGENTS.md), arm auto-merge:gh pr merge <n> --auto --merge --match-head-commit <full sha>. The Owner allows this for agent PRs intodev. - An authority expansion waits for the Owner's approval. An
ARCHITECTURE_EXCEPTIONneeds one ordinary Owner approval (a review or a comment); it stays valid across merges and fixes that leave the exception rows unchanged. Never post an approval yourself. - Run
gh pr update-branchon other open PRs only under the rules inWEB_CHANGE_POLICY.md, on a conflict, or to pick up a fix they need, never just to stay current. When such a merge lands while other PRs have auto-merge armed, disarm theirs before updating.
Watch CI
- Run one watcher per session, not one per agent:
python3 .claude/skills/gbdraw-ship-pr/scripts/watch_prs.py --prs <n> ...under Monitor or in the background, and act on its event lines (merged, closed, conflict, failed, cancelled, green). It polls every five minutes, asAGENTS.mdrequires. - Before you act on an event line (rebase, update-branch, merge, or report the
PR done), re-read the PR with
gh pr view <n> --json state,mergeStateStatus,statusCheckRollup. The Owner may have merged it already, and a green line covers only the checks that existed at that poll, not those of a workflow that starts later. - A run whose jobs all passed but which ended
cancelledis recovered withgh run rerun <id> --failed. - When a local check predicts a CI failure, settle it now with CI's own
comparison, then fix it or state that nothing is needed. "Web change budget"
diffs
pull_request.base.shaagainst the head (two-dot), so reproduce it with--base <PR base.sha>, notorigin/dev. "Web base policy (trusted base)" compares thedevtree with the PR head, so a branch that lacks a laterdevbaseline reduction must merge or rebasedev. - Read only failing logs, into a file:
gh run view <id> --log-failed > "$TASK_DIR/logs/<id>.log". Quote the failing lines, not the whole log.
After the merge
Remove the worktree and the branch (skill gbdraw-worktree) and record the
merge in the task's STATE.md (skill gbdraw-campaign).
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- avoid-ai-writingSkill
- gbdraw-campaignSkill
- gbdraw-promotionSkill
- gbdraw-videoSkill
- gbdraw-worktreeSkill
- love-me-love-my-docsSkill
- translate-web-uiSkill
- web-gallery-screenshot-maintenanceSkill
- write-clear-pull-requestSkill
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.

