/mthines-agent-skills:create-pr [--split] [--quick] [--no-pre-review] [--no-post-review] [--no-review] [--no-simplify] [--no-quality] [--no-ui-verify] [--attach <file>] [--no-media] [--merge]from mthines-agent-skills
Writes a narrative PR description, converges the branch, pushes, opens a draft PR, runs review-loop until threads are resolved, and hands red CI to ci-auto-fix. Supports split, quick, and no-review modes.
Ships in mthines-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write a short, narrative PR description that tells reviewers why the change exists and what to expect in the diff, open it as a draft, converge it, and watch CI.
Parse $ARGUMENTS. --split selects an alternate workflow; the other flags scale down the default full review + simplify loop (Step 6.5) and compose with both workflows.
| Mode / Flag | Trigger | Behaviour |
|---|---|---|
default | No flag | One PR for the whole branch; Step 6.5 runs Skill("review-loop", "<pr-url> --no-ci"). |
split | --split, -s, or first positional token split | 2–4 dependency-ordered draft PRs (hard cap 5), executed only after user approval. See Split Mode. |
no-review | --no-review | Step 6.5 runs only polish simplify once. |
no-simplify | --no-simplify | Step 6.5 runs only pr-reviewer (one-shot, no apply). |
quick | --quick | Step 6.5 runs only Skill("polish", "quick"). |
no-quality | --no-quality anywhere | Skip Step 6.5 entirely. Wins over every other quality flag. |
no-ui-verify | --no-ui-verify anywhere | Skip the default-on Step 6.4. |
no-pre-review | --no-pre-review anywhere | Skip the default-on Step 5.5. |
no-post-review | --no-post-review anywhere | Skip Step 6.5 only; the PR gets no posted review. aw passes it because the branch already converged locally. |
merge | --merge | Step 6.5 runs Skill("review-loop", "<pr-url> --no-ci --merge"), so a clean convergence squash-merges. Needs the default review loop (row 4); see Step 6.5. |
attach / no-media | --attach <file> (repeatable) / --no-media | --attach adds a local file to Step 6.2 ahead of the branch's captures; --no-media skips Step 6.2. |
rules/legacy-flags.md — read when $ARGUMENTS carries --review, --simplify, --pre-review, --no-feedback, or --no-preview-spec.
Before any GitHub step, resolve which path you have — gh CLI, mcp__github__* tools, or neither — per agents/shared/rules/github-access.md. Resolve once, state the path you took, and use it for the whole run.
gh is absent in Claude Code cloud sessions; the commands below are the gh-path form, so on the MCP path use that file's verb mapping. With neither path, say so precisely, do the git work you can, and hand the rest back — never report a step you could not perform as blocked-by-something-else.
Follow rules/description-contract.md (gather information → understand the narrative → choose output format → write the title → length self-check); review-loop uses the same contract.
If its Step 5 length self-check says the PR is too big, offer /create-pr --split instead of expanding the body.
If you can't infer the why / what from the diff, ask the user — never pad with guesses.
Worked examples: rules/description-examples.md.
review-loop)Runs by default, in both default and split mode; skip on --no-pre-review, --no-quality, --no-review, or a non-code diff.
review-loop with no PR reference runs local mode: it dispatches branch-reviewer with zero GitHub calls, so the draft opens already converged.
| Mode | Invoke |
|---|---|
| default | Skill("review-loop", "--cap 3") |
split (--split) | Skill("review-loop", "") |
rules/pre-push-review.md — read when entering this step (skip conditions, handling each return, the outcome value for Step 10). Load-bearing:
flagged finding to the user before pushing.NOT REVIEWED, never a skip.Open the PR as a draft so pr-reviewer can post inline comments during Step 6.5.
git push # tracking already configured by gw add
gh pr create --draft \
--title "<imperative title>" \
--body "$(cat <<'EOF'
<your narrative description>
EOF
)"
Capture the PR URL/number from the output.
attach-media)Skip on --no-media. Otherwise rules/attach-media-step.md — read now: it selects up to 6 images and 2 videos (--attach files, then this branch's captures newer than the merge base) and delegates to Skill("attach-media", "<pr-url> <file>#<alt> ... --to body").
Record its first report line for Step 10. Never write a media placeholder.
Skip this step when --no-ui-verify or --no-quality is in $ARGUMENTS, or when ui-verify is not installed (Skill() raises — catch, log one line, continue).
Do not eyeball the diff to decide whether it is UI: ui-verify author decides mechanically with its shared is-ui-diff gate and returns not authored (no UI files in diff) for a non-UI diff.
So delegate unconditionally when neither skip condition holds:
Skill("ui-verify", "author <pr-url>")
ui-verify edits the PR body in place, adding one <!-- ui-verify:v2 --> block; the block is exempt from the length budget and preserved by the review-loop's description refresh (description contract).
Continue to Step 6.5 regardless. This step only authors; Step 6.5's review-loop runs the spec against the preview once at exit (do not pass --no-preview-run).
Record which branch you took, now, before continuing. Write down exactly one of the six values for the Step 10 UI verify slot:
| What happened here | Record |
|---|---|
Delegated, ui-verify reported <N> specs authored | authored (<N> specs) |
Delegated, and ui-verify's is-ui-diff gate found no UI files in the diff | not authored (no UI files in diff) |
Skipped: --no-ui-verify in $ARGUMENTS | skipped (--no-ui-verify) |
Skipped: --no-quality in $ARGUMENTS | skipped (--no-quality) |
Skipped: Skill() raised — ui-verify not installed | skipped (ui-verify not available) |
Delegated, and ui-verify reported a failure — including its own failed (no GitHub access path), which means the block never reached the PR body | failed (<reason>), quoting its reason verbatim |
Never soften the last row into a skip: a failed return means no block exists for any later reader to run.
review-loop)Skip entirely on --no-quality, --no-post-review, or a non-code-only diff (docs, generated artefacts, lockfiles, asset binaries).
Otherwise evaluate in this precedence order (first match wins):
| # | Flags present | Invoke | What runs |
|---|---|---|---|
| 1 | --quick, or both --no-review and --no-simplify | Skill("polish", "quick") | Light mechanical pass (comments, docstrings, else after return, naming). |
| 2 | --no-review | Skill("polish", "simplify") | Mechanical cleanups (comments, dead code, nesting, constants) applied once, each behind a test check. |
| 3 | --no-simplify | Task(subagent_type="pr-reviewer", prompt="<pr-url>") | pr-reviewer agent (Task tool, not Skill()) one-shot — findings surfaced, not applied. |
| 4 | none of the above (default) | Skill("review-loop", "<pr-url> --no-ci") | pr-reviewer → implement-suggestion → polish simplify, up to 5 iterations, until every thread is resolved (fix or reply); refreshes the PR description. |
Pass --critical through to review-loop / pr-reviewer if the user passed it.
--merge (row 4 only): invoke Skill("review-loop", "<pr-url> --no-ci --merge"); review-loop owns the merge gates (its --merge rule): PASS or WARN, zero open threads, green CI, squash only.
Rows 1–3, --no-quality, --no-post-review, and --split never run review-loop, so --merge cannot fire there: do not merge, and record not merged (--merge needs the default review loop) for Step 10.
# correct: /create-pr --merge → Skill("review-loop", "<pr-url> --no-ci --merge")
# wrong: /create-pr --merge --quick → gh pr merge (no review ran, so nothing approved it)
Always pass --no-ci to review-loop here — Steps 7–8 own CI for this invocation and cover every commit the loop pushes.
Rows 3 and 4 both need sub-agent dispatch. Before taking either row, confirm that some available tool dispatches a sub-agent — a capability check, never a tool-name check (Task in Claude Code, Agent in the Agent SDK, task in OpenCode-based hosts such as Dash0 Agent0). If none does, do not attempt the dispatch and do not fall through to row 2 — record NOT REVIEWED (sub-agent dispatch unavailable) for Step 10.
After the loop returns:
NOT REVIEWED into Step 10 verbatim; never describe the PR as converged, clean, or review-ready.Never delete or weaken a test or change public API / exported types as a mechanical fix. One review-loop invocation per PR creation.
There is no background external-bot watch; a later reviewer is picked up by the next review-loop run or by /implement-suggestion <pr> --watch run on purpose.
Block on CI so the user doesn't come back to a red PR. Two harness facts govern this step:
timeout parameter explicitly set to 600000. The default is 120 000 ms; without it the call is killed at 2 minutes with no exit code, whatever the inner timeout.gh pr checks exits non-zero (8) while checks are merely pending. Classify on the exit code plus a literal stderr match, never on "was there output".Run the shared poll — rules/registration-poll.md — and map its outcomes:
| Poll outcome | Step 7 does |
|---|---|
registered | Go to Step 7b |
tooling-failure | Report the failure and escalate. Do not conclude anything about CI, and do not go to Step 8 |
no-ci (after 3 polls, no runs awaiting approval) | This repo does not run CI on PRs — jump to Step 10 |
# Issue this Bash call with the tool parameter timeout: 600000.
# 540 < 600 so `timeout` fires first and yields a real exit 124.
timeout 540 gh pr checks <pr-number> --watch
| Exit | Next |
|---|---|
| 0 | CI green — jump to Step 10 |
| 124 | Timed out with checks still running — watch again, up to 4 attempts total (≈ 36 min). After the fourth, run gh pr checks <pr-number> once, report the still-pending checks, and escalate — never watch again |
127, or stderr matching command not found / could not resolve / authentication / rate limit | Tooling failure, not a CI failure (timeout is absent on stock macOS — use gtimeout). Report it; do not fan out CI-log triage against a run that never failed |
| Any other non-zero | A check genuinely failed — go to Step 8 |
Print ci-watch attempt N/4 (or registration poll N/3) as you make each attempt and carry the lines into Step 10. Increment before comparing. Both caps are local to this invocation; there is no shared counter across skills or sub-agents.
ci-auto-fixA check genuinely failed. Invoke once:
Skill("ci-auto-fix", "<pr-url>") → fixed | still-failing | escalated, with its report
ci-auto-fix owns the whole failure path (grouping, log reading, flake rerun, fix, local verify, push, re-verify); add no triage fan-out or /confidence pass of your own around it.
Cap: 2 invocations per create-pr run. Invoke a second time only when the first returned fixed and a different check went red on the pushed revision; never re-invoke on a check the first gave up on. Print ci-auto-fix invocation N/2 as you make each one.
Never do these to make CI green:
continue-on-error on a failing check--no-verify or otherwise skip hooksShort summary: final check status, one line per auto-fix, and anything left for the user (only if Step 8 escalated or hit the cap).
PR: <pr-url>
Title: <imperative title>
Pre-push review (Step 5.5, local review-loop): <converged (<N> iterations, <A> applied, <D> declined) | flagged (<G> findings) | cap-reached (<O> open) | checks-red (<checks>) | skipped (<flag>) | skipped (non-code diff) | NOT REVIEWED (sub-agent dispatch unavailable; fallback: <polish simplify | none>)>
Media (Step 6.2): <the attach-media summary line | none (no captures or --attach files) | none (merge base unresolved) | skipped (--no-media) | skipped (attach-media not available)>
UI verify (Step 6.4): <authored (<N> specs) | not authored (no UI files in diff) | skipped (--no-ui-verify) | skipped (--no-quality) | skipped (ui-verify not available) | failed (<reason>)>
Review loop (review-loop / pr-reviewer):
Iterations: <N> of <cap>
Stop reason: <all-threads-resolved | no-progress (flags remain) | cap-reached | skipped (--no-quality) | skipped (--no-post-review) | NOT REVIEWED (sub-agent dispatch unavailable)>
Open threads at exit: <count>
Description refreshed: <yes | unchanged | skipped>
Final verdict: <PASS | FAIL>
Merge: <review-loop's `Merge:` line | not requested (no --merge) | not merged (--merge needs the default review loop)>
CI:
Watch attempts: <the `ci-watch attempt N/4` lines you printed, or "none needed">
Final status: <green | which checks red>
Auto-fixed: <one line per fix, or "none">
ci-auto-fix: <the `ci-auto-fix invocation N/2` lines you printed, or "not needed">
Head commit: <sha — the head CI was last verified on>
The UI verify line is mandatory on every run, including a non-UI diff — not authored (no UI files in diff) is the informative answer there, not silence.
The Pre-push review line is mandatory on every run too, including every skipped one; when it is flagged, list every flagged finding underneath.
Why these slots exist: references/design-rationale.md.
--split)rules/split-mode.md — read when --split is set, before Step 1. It defines how split mode changes Steps 1–5.5, then Steps S1–S8 (analyse, group, detect dependencies, propose and wait for approval, execute, watch CI bottom-up, rollback, report) and the split-mode hard rules.
TODO: add screenshots, an empty <!-- screenshots -->, or a local .agent/ path in the body.Co-Authored-By: Claude or any AI co-author attribution.Closes #123) over re-explaining context already in the issue.references/design-rationale.md (opens in a new tab)rules/attach-media-step.md (opens in a new tab)rules/description-contract.md (opens in a new tab)rules/description-examples.md (opens in a new tab)rules/legacy-flags.md (opens in a new tab)rules/pre-push-review.md (opens in a new tab)rules/registration-poll.md (opens in a new tab)rules/split-mode.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (mthines/agent-skills) — no native marketplace selected
npx claudepluginhub p/mthines-mthines-agent-skills54 skills in this plugin
/ai-engineeringReviews and guides LLM/AI application engineering — prompts, caching, RAG, agent loops and tools, resilience, model migration, evals, prompt-injection defence, and observability. Invoke with /ai-engineering for "review my prompt", "set up RAG", or "write evals".
/animationsAuthors performant CSS-first web animations and picks the right feedback for an interaction — transitions, View Transitions, scroll-driven motion, Motion for React, reduced motion, and perceived performance. Triggers on "animate this", "hover effect", "feel faster", "skeleton loader", "/animations".
/animations-nativeAuthors performant React Native / Expo animations and gestures with Reanimated and react-native-gesture-handler on the UI thread; web animations go to `animations`. Triggers on "reanimated", "react native animation", "gesture handler", "swipe gesture", "/animations-native".
Other plugins' skills for the same job