agentleFS
satoshikawatosatoshikawato/gbdraw/.claude/skills/gbdraw-ship-pr/SKILL.md

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
  1. Very specific:

    Check version literals: If the change bumps a schema or version constant, grep tests/, docs/capture/, docs/recipes/, and tool fixtures for …

    line 28
  2. Distinctive:

    Never commit screenshots that the Owner pasted.

    line 40
  3. Very specific:

    Follow .claude/skills/write-clear-pull-request/SKILL.md and choose the change class in the PR template.

    line 44
  4. Very specific:

    Keep the body under about 60,000 characters.

    line 46
  5. Very specific:

    When the PR does not expand authority (see AGENTS.md), arm auto-merge: gh pr merge <n> --auto --merge --match-head-commit <full sha>.

    line 56
  6. Very specific:

    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 …

    line 63
  7. Very specific:

    Run one watcher per session, not one per agent: python3 .claude/skills/gbdraw-ship-pr/scripts/watch_prs.py --prs <n> ...

    line 70
  8. Very specific:

    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 …

    line 75
  9. Distinctive:

    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.

    line 82
  10. Very specific:

    Read only failing logs, into a file: gh run view <id> --log-failed > "$TASK_DIR/logs/<id>.log".

    line 88
  11. Very specific:

    Remove the worktree and the branch (skill gbdraw-worktree) and record the merge in the task's STATE.md (skill gbdraw-campaign).

    line 94

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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).
  2. 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.md does 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.
  3. 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 on main, nightly, or by dispatch. Prefer asserting the exported constant.
  4. Predict the CI tier. node tools/ci-impact.mjs classify --base origin/dev --head HEAD.
  5. 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-screenshots as pr/<PR#>/<name>-before.png and -after.png, and embed https://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.md and 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, then gh 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 into dev.
  • An authority expansion waits for the Owner's approval. An ARCHITECTURE_EXCEPTION needs 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-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 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, as AGENTS.md requires.
  • 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 cancelled is recovered with gh 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.sha against the head (two-dot), so reproduce it with --base <PR base.sha>, not origin/dev. "Web base policy (trusted base)" compares the dev tree with the PR head, so a branch that lacks a later dev baseline reduction must merge or rebase dev.
  • 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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.