/source-control:pull-request [prep|create|ready|monitor|comments|ci|merge|reassess|evidence|status|full|…] [--unattended] [args]from source-control
Manages the full pull request lifecycle: prep, create, mark ready, monitor CI, address reviews, and merge. Handles state detection and worktree transitions.
Ships in source-control. 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.
Arguments. [prep|create|ready|monitor|comments|ci|merge|reassess|evidence|status|full|…] [--unattended] [args]. Full set: the Arguments table below. e.g., /pull-request prep, /pull-request create, /pull-request ready, /pull-request monitor, /pull-request comments, /pull-request merge, /pull-request evidence <pr> --evidence <file>, /pull-request media <pr> --manifest <file>, /pull-request status, /pull-request full, /pull-request fetch-logs <pr|run>, /pull-request view <pr> --diff, /pull-request list --head <branch>, /pull-request review-venue
The read actions view, list, review-comments and review-venue, comments --ci, conflicts --ci, dependency --ci and ci --ci skip this section. Every other action gathers these.
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
git branch --show-currentgit log --oneline -5git status --porcelaingit diff --name-only HEADPointer: when an isolated session refuses a git command, fetch How Claude Code enforces isolation live.
Run the PR lifecycle from quality review through merge and the post-merge worktree transition, detecting state and resuming.
The two non-negotiable gates:
This skill is self-contained: it runs on git, the forge's CLI, jq, and its bundled scripts (skill-private ones under ${CLAUDE_PLUGIN_ROOT}/skills/pull-request/scripts/, plugin-shared ones under ${CLAUDE_PLUGIN_ROOT}/scripts/, which the reference/ files call <scripts-dir>: substitute the resolved path before a command from them reaches Bash). jq is required (the merge and readiness paths pipe forge API output through it): check command -v jq before the first phase that parses; if missing, stop with the install remediation (https://jqlang.org/download/; a separate install under Git Bash on native Windows) instead of failing mid-phase. The readiness thread gate (Gate 7) also needs Python 3.11+; without it that gate holds as unproven and the rest of the skill runs. The media action and the stale reviewer-media check need Python 3.11+ too: without it media stops with the install remediation (https://www.python.org/downloads/) and the stale check is skipped. An adjacent capability a phase names (a code-review skill or agents, a simplifier, a build/test/lint verifier, an external research skill, an exploration skill, a work-item tracker, a CI-log-audit agent, a forge-events push channel) is optional: invoke it when your environment provides it (a skill, plugin, agent, or MCP server), else follow the inline guidance, which stands on its own. Never block a phase because an adjacent tool is absent.
Consumer conventions come from the consuming project's own CLAUDE.md, AGENTS.md, and rules. Notably: PR body template, branch naming, merge style (this skill defaults to squash), review-reply identity (some projects post bot-identity replies via a wrapper; default is the forge CLI under your own login), and any extra pre-PR gates. Read them before creating or merging.
Provider commands. This body names forge operations (resolve the PR, read its checks, reply on a thread); their GitHub commands (the one forge supported today) are in the GitHub provider reference. Read it before the first forge operation. The phase files under reference/ carry each phase's full GitHub procedure.
PR title format resolves via the same ladder /source-control:commit uses for the commit subject (see its SKILL.md), checked in order: the pr_title_pattern resolved across the layers of the source-control convention config (team value in docs/conventions/source-control.yaml) per ../../reference/config-resolution.md → the consuming project's own CLAUDE.md/AGENTS.md/rules → Conventional Commits (11-type vocabulary. build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test; security is not a member. Pointer: when the default set is questioned, fetch commitlint's config-conventional type-enum live. As of: 2026-11-10. Recheck trigger: that rule's value changes) as the default. See reference/create.md §2.4.1 for where the title is derived. When no layer resolves a pr_title_pattern and nothing is inferable, point the user at /source-control:setup.
PR-body attribution (the 🤖 Generated with [Claude Code]… line) resolves from the pr_body_attribution key across the same layers (team YAML first, ../../reference/config-resolution.md). Absent → the default line, none → omitted, any other value → that line. It is the PR-body analogue of /source-control:commit's trailer_policy and gated separately; see reference/create.md §2.4.1 for the assembly.
Branch-to-issue grammar is a POSIX ERE whose LAST capture group is the work-item reference (an issue number or a tracker key), e.g. ^[^/]+/([0-9]+)-. It resolves first from the branch_issue_pattern key across the layers (team value in the YAML; ../../reference/config-resolution.md), which parse-branch-issue.sh reads itself. The branch_issue_pattern userConfig is a deprecated fallback, read only when no layer sets the key: its value is ${user_config.branch_issue_pattern} (this line is the substituted surface; a literal ${user_config.branch_issue_pattern} token means unset), and reference/create.md §2.4.0 fills its <branch-issue-pattern> slot with a real ERE from it. When the script falls back to that value it prints a deprecation note on stderr; relay it to the user. Neither set: a bound work-item tracker's adapter supplies the grammar (§2.4.0), else the built-in <type>/<N>-<slug> (and routine-issue-<N>) convention.
PR open state (ready or draft) decides whether create takes the new PR through ready or leaves it a draft. A draft means a person asked to see the work early or the PR is a multi-session container; ready means complete and through ready's gates. The per-user value is ${user_config.pr_open_state} (this line carries the substituted value; a literal ${user_config.pr_open_state} token means unset). A pr_open_state key in the repository's docs/conventions/source-control.yaml, read at the PR's base branch and never at its head, wins over it; a request for a draft wins over both; with none set the state is ready, and a consumer opts into draft. An unattended run follows the resolved value like an attended one, and ready --unattended's holds still apply. reference/create.md §2.4.3 holds the state meanings, resolves the state and reports the supplying level; the levels and the invalid-value rule are in ../../reference/config-resolution.md.
Review venue (auto, local, ci or both) decides which local review steps run before and at the ready flip. The per-user value is ${user_config.review_venue} (this line carries the substituted value; a literal ${user_config.review_venue} token means unset), passed as --user to scripts/read-review-venue.sh. A review_venue key in the repository's docs/conventions/source-control.yaml, read at the PR's base branch, wins over it. reference/review-venue.md reads it and owns what each value does.
PR body preview (post or preview) decides whether an attended run shows a body and waits for a yes before posting it. The per-user value is ${user_config.pr_body_preview}; PR body refresh (true or false) decides whether a push to an open PR also rewrites the body sections it made stale, per-user value ${user_config.pr_body_refresh}. A literal unexpanded token means unset. A key of the same name in the repository's docs/conventions/source-control.yaml wins over each; the levels are in ../../reference/config-resolution.md. reference/create.md §2.4.3 applies the preview and reference/monitor.md §3.3.2 the refresh.
Merged worktrees left to the reaper (true or false, default false) decides whether the merge's worktree transition leaves a merged branch checked out in a linked worktree for ${CLAUDE_PLUGIN_ROOT}/scripts/worktree-reap.sh instead of deleting it. The per-user value is ${user_config.leave_merged_worktree_to_reaper} (a literal unexpanded token means unset), passed as --leave-for-reaper to scripts/merged-branch-disposition.sh; it has no repository level. reference/merge.md §4.3 applies it.
For runs spanning 3+ phases, copy ${CLAUDE_PLUGIN_ROOT}/skills/pull-request/templates/checklist.md into your project's working-notes location (or track it inline) and tick each - [ ] as its phase produces output. It survives /clear.
$ARGUMENTS. Action selector:
| Action | Entry point | Use case |
|---|---|---|
| (empty) | Smart default | Detect current state, resume from right phase |
prep | Phase 1 | Review (skipped when the CI code-review lane covers it, reference/review-venue.md) + verify findings + simplify + comment pass + verify build |
prep quick | Phase 1 (fast) | Code errors only, skip simplify and the comment pass |
prep review-only | Phase 1 (partial) | Just review + verify findings |
prep simplify-only | Phase 1 (partial) | Just simplify + comment pass + re-verify |
create [--draft '<reason>'] | Phase 2 | Branch-name check + commit + changelog fragments where the repo releases from them (reference/create.md §2.3.3) + push + open the PR as a draft, its body carrying the plan Brief's acceptance criteria when the branch implements a plan and Closes only for an issue whose done-when items the diff delivers, else Refs: with a ## Remaining section (reference/create.md §2.4.0, §2.4.1), then run ready on it when the resolved PR open state is ready; --draft requests a draft whose Draft: line names the reason. Detail: reference/create.md. |
create --pushed --worktree <path> [--draft '<reason>'] [--hold] | Phase 2 (PR-only) | PR-only entry for an orchestrated flow, the branch is already committed and pushed (by a dispatched worker), so this skips commit / push / branch update, re-resolves branch and diff from the given target worktree (not the session cwd), and runs body assembly + gates + opens the PR for <branch>, then follows the resolved open state like an attended run (the repository level is read at the base branch, never from the worktree). --draft requests a draft whose Draft: line names the reason; --hold opens the PR with the do-not-merge label. Used by the orchestrator of /work-items:work (if enabled) after its pre-PR gate. See reference/create.md §2.7 |
ready | Phase 2.5 | Update the branch from its base by the method the shared branch-update decision chooses (ready --unattended never rewrites a pushed head), run the code and security reviews over the PR diff in fresh-context subagents (each skipped when its CI review lane is present and healthy, reference/review-venue.md) and the verify gate on the updated head (a failure with the same exit status and the same failing test names on the base commit records base-fail, reported and not holding the flip; its test suites skipped when CI's test lanes already passed on that head, reported as skipped (CI covers it); ready --verify-local runs them anyway), flip the draft to ready (the base branch's pre_ready list can turn off any of its six configurable steps; each step's outcome is reported), post the evidence comment when an evidence file exists for the confirmed head (--evidence <file> names one; attended runs only, and a refusal is reported, never undoes the flip), then hand the PR to /review:explain-change (if enabled), whose digest_policy decides whether a digest is offered or built, then to /review:reviewer-media (if enabled), whose policy decides whether a narrated walkthrough is built (neither gates anything). Detail: reference/ready-for-review.md. |
monitor | Phase 3 | Watch CI, fix failures, evaluate comments. Detail: reference/monitor.md. |
comments | Phase 3.5 | Evaluate/respond to PR comments only |
comments --ci | Phase 3.5 (CI) | The pr-unblock lane's unattended mode: the runner's kept reviewer-bot threads and the trusted people's top-level comments addressed to the lane, or an earlier pr-verify FAIL's notes, only, through its review-thread tool, running no head code. Detail: reference/comments-ci.md. |
conflicts --ci | Phase 2.5.2 (CI) | Unattended conflict resolution for the pr-unblock lane: reads the runner's conflicts.json as data, resolves each conflicted path in place under the base-merge step's discipline, runs no command, never edits a path under .github/workflows/, and leaves a path whose two intents cannot both hold with its markers, which escalates it. Detail: reference/conflicts-ci.md. |
dependency --ci | Phase 3.5 (CI) | The pr-unblock lane's unattended review of one risky Dependabot update: reads the context file, the checkout and the upstream release notes as data, leaves a scoped fix outside .github/ uncommitted for a later job to push, and returns a merge, fix, close or escalate verdict as structured output, running no head code. Detail: reference/dependency-ci.md. |
ci --ci | CI | The pr-unblock lane's unattended fix of a PR's failing checks: reads the runner's context file as data, reproduces each check with the repository's own command, fixes the cause, reruns it, and leaves the fix uncommitted for the runner's patch; never weakens a check, and escalates what it cannot fix with a named reason. Detail: reference/ci-ci.md. |
merge | Phase 4 | Squash merge, or merge or enqueue without asking once the PR is CLEAN and the AI review checks have passed on the reviewed head, with the plain merge command (a refusal is reported, never handed to the user or retried in another shape), then confirm a merge-queue PR entered the queue (enqueue a CLEAN one left out, report the refusal text verbatim; §4.2.2) and wait for MERGED (no strategy flag behind a merge queue, --auto only pinned to the reviewed head; reference/merge.md §4.2.1) + worktree transition (reuse it, or release this session's lock) + verify. Detail: reference/merge.md. |
evidence <pr> --evidence <file> [--before <file>] [--attach <path>]... [--summary <file>] [--verified-by <name>] [--issues <file>] [--artifact-url <url> [--retention-days <n>]] | Evidence | After the verifier passed for the PR's head, post one evidence comment, or update it in place for a new head, with gh pr comment --edit-last --create-if-none --attach: the text result first, then publishable captures only, laid out by templates/evidence-comment.md as a Before/After table for a small change (evidence_inline_max_captures) or collapsed sections otherwise, an optional who/when/issues record block (evidence_record_fields, off by default), and the CI capture artifact link with its expiry. Detail: reference/evidence.md. |
media <pr> --manifest <file> [--artifact-url <url> [--retention-days <n>]] | Reviewer media | Place a produced walkthrough (video, contact sheet, chapter list, screenshots) in the marked ## Reviewer media section near the top of the PR body, rewriting only the text between its two marker lines: claim the head first, attach only the files the producer's manifest.json lists with gh pr edit --attach, else link the Actions artifact with its expiry, and swap the request label for the posted one. Detail: reference/media.md. |
reassess [<pr>] [--act] [--state-dir <dir>] | Reassess | Judge whether one open PR should still land, even when green and mergeable, and return continue, rework or close with its evidence: report-only unless --act carries out the verdict. --state-dir defaults to ${CLAUDE_PLUGIN_DATA}/state/babysit-prs. Detail: reference/reassess.md. |
status | Report only | Unified status across all phases, with the pr-verify verdict at the head from scripts/monitor-poll.sh --verdict (reference/monitor.md B3) |
full | Phase 1-4 | Run prep → create → monitor → merge end-to-end |
fetch-logs <pr|run> [--raw|--job <job-id>] | CI log retrieval | Pull failed-CI evidence: default = ::error/::warning annotations only (cheapest); --raw = full ZIP dump for archive review; --job <id> = per-job plain text |
view [<pr>] [--repo <owner/repo>] [--diff] [--out <file>] | Read only | One PR's facts as JSON, or its diff with --diff; no number reads the current branch's PR. See reference/read.md |
list [--head <branch>|--head-match <ERE>] [--search <text>] [--state open|closed|merged|all] [--repo <owner/repo>] | Read only | PRs as a JSON array, open by default |
review-comments (--prs <n> | --pr <number>) [--repo <owner/repo>] | Read only | The review comments of the last <n> merged PRs, or of one PR, as JSON lines. See reference/read.md |
review-venue [--repo <owner/repo>] [--max-age-days <n>] [--head <sha>] | Read only | Per AI review lane (code, security): ci when the repository's CI lane is present and healthy, so no local review runs for it, else local; with --head, a tests line: ci when CI's test lanes passed on that commit. Detail: reference/review-venue.md. |
For the all-PR continuous loop (discover every open PR, work each to readiness, self-pace), use
the sibling skill /source-control:babysit-prs. It wraps this skill's per-PR review discipline
in fleet orchestration and never merges.
merge squash-merges (one squashed commit per PR onto the default branch), see reference/merge.md §4.2. Follow the consuming project's convention when it differs. A stacked PR lands every layer below it: see stacked-prs.md.create opens a PR that builds on another open PR, decide stack versus sequential PRs off the trunk by "When to stack" in stacked-prs.md.monitor polls the PR's checks (the §3.0.1 REST read) and comment fetches every 90 seconds, see reference/monitor.md §3.1; every loop follows the API budget. A wait is a REST poll that runs in the background (the §3.0.1 Monitor watch, or a run_in_background poll where Monitor is unavailable), never a foreground sleep or until loop and never the CLI's blocking checks watch, and it first reports each pending job as queued or running ("Waiting on a pending check"). A dispatched subagent does not wait: it stops once its PR is marked ready and reports the full head sha, and the dispatching session watches and merges (reference/monitor.md).create requests no reviewers when it opens the PR. See reference/create.md §2.4.3.PR identity (number, URL) resolves live from the forge, the authoritative source, at every phase that needs it. No caching, no state files.
Standard pattern (every phase): resolve the current branch's PR number; when that is ambiguous (multiple open PRs, stale checkout, returning days later), name the branch explicitly. Both commands are in the provider reference's "Resolve a pull request".
After resolving once at phase entry, pass <pr_number> explicitly to all subsequent forge calls in that phase (reading checks, merging, etc.). Never rely on bare-branch resolution mid-phase.
Why explicit PR numbers? Resolution with no number goes by the HEAD branch, which fails when the worktree was cleaned up (branch context lost), multiple open PRs exist (wrong match), you return days later (stale checkout), or another session's PR merged first. Resolving once per phase bounds this risk to one point.
Parse $ARGUMENTS to extract the action (first token) and any sub-arguments, after taking out
--unattended wherever it appears: it is the caller declaring that nobody is present. Pass it on
to ready (which takes it as its own flag) and to no script; with nothing else left, the action
is the smart default.
Smart default (empty args): read live state from the forge to determine the right phase:
1. Check git branch — on the default branch? → "Create a worktree or branch first"
2. Resolve PR for current branch, reading its number, state and draft flag:
a. no PR found → no PR yet → start at Phase 1 (prep); skip steps 3-6
entirely (they all need a PR number that does not exist yet)
b. state = MERGED → skip to Phase 4.3 (worktree transition only: new branch from the default branch, delete the merged local branch, or leave it for the reaper when §4.3's disposition says `leave`)
c. state = CLOSED → report "PR was closed without merging" and stop
d. state = OPEN → capture pr_number, continue to step 3
3. isDraft = true → start at Phase 2.5 (ready); skip steps 4-6. A draft owes its
review and its flip, not monitoring: no reviewer has been asked to read it yet
4. Read the PR's checks — still running? → start at monitor
5. Check for unaddressed comments → start at monitor (comments sub-phase)
6. CI green + comments addressed → suggest merge
Present the detected state and proceed to its phase, announcing it in interactive mode; in autonomous mode (full), proceed without pausing. Phase transitions are not decision points.
Status action: read the PR's number, URL and state, then report current state across all phases.
Execute in order. Each phase is self-contained. Read the relevant file for detailed steps:
| Phase | File | Entry actions |
|---|---|---|
| 1. Prep | reference/prep.md | prep, prep quick, prep review-only, prep simplify-only |
| 2. Create | reference/create.md | create |
| 2.5. Ready for review | reference/ready-for-review.md | ready |
| 3. Monitor | reference/monitor.md | monitor, comments |
| 2.5.2 (CI) | reference/conflicts-ci.md | conflicts --ci |
| 3.5 (CI) | reference/comments-ci.md | comments --ci |
| 3.5 (CI) | reference/dependency-ci.md | dependency --ci |
| CI | reference/ci-ci.md | ci --ci |
| 4. Merge | reference/merge.md | merge |
| Evidence | reference/evidence.md | evidence |
| Reviewer media | reference/media.md | media |
| Reassess | reference/reassess.md | reassess |
On monitor, comments, or full reaching monitor, read reference/monitor.md before any CI polling or comment evaluation: its entry checklist runs first, and its per-iteration checklist governs every CI or comment event. Standalone create runs Steps 1-3 of that entry checklist when its session will keep acting on the PR it opened (reference/create.md §2.6); create --pushed leaves them to its caller. comments --ci skips it, and conflicts --ci, dependency --ci and ci --ci do not enter Phase 3. Before posting a reviewer's trigger phrase or reading its completion signal, read its record in reference/reviewer-shapes.md.
/source-control:pull-request full)full chains prep, create, monitor, and merge in one invocation. Read
reference/full-lifecycle.md when invoked with full, and only
then: it owns the phase-to-phase handoff state, the abort points, and what full does
differently from running the four phases by hand. Any other action routes through the phase table
above instead.
/source-control:pull-request fetch-logs <pr|run> [--raw|--job <job-id>])Public action for failed-CI evidence, a tiered fetch chain: cheapest signal first, escalating only when the lower tier is insufficient. Consumers say what they want; the skill picks the internal helper from the flags.
Behaviors:
| Invocation | What it returns | When to use |
|---|---|---|
fetch-logs <pr-number> (default) | ::error:: + ::warning:: annotations across all failed jobs | First-pass. Usually enough to identify the cause |
fetch-logs <pr-number> --failed | Annotations from failed jobs only | When the run has many jobs and noise is a concern |
fetch-logs <run-id> --raw | Full CI log archive, dumped in scope | When annotations are sparse / missing. Debug-grade detail |
fetch-logs <run-id> --job <job-id> | Plain-text log of one job | Targeted dive after seeing which job failed |
<pr-number> and <run-id> are interchangeable; given a PR number, the skill resolves its latest run.
Composition with monitor: monitor invokes this action on CI failure. Direct fetch-logs is for ad-hoc post-mortem (e.g., a closed PR's CI failure, auditing a green run for warnings).
Implementation note: this action delegates to the bundled, private fetch-annotations.sh and fetch-failed-logs.sh scripts. Consumers must not cite script paths; use this action.
view, list)view and list are the read-only actions other skills call instead of a forge CLI. Read
reference/read.md when invoked with either, and only then: it owns the
command, the output fields, and the exit codes.
review-venue)review-venue is the read action prep, ready and other skills call before a local AI review, so a
review runs in CI or locally, never in both. Read
reference/review-venue.md when invoked with it, or when a phase
reaches a review: it owns the command, what makes a lane healthy, and how each line is applied and
reported.
code class is detected, and the pre-PR check reduces to lint. ready still reviews a diff that touches an instruction surface (definition). Extra project-specific prep-evidence requirements come from the consuming project's own hooksThree native surfaces cover parts of this lifecycle and get conflated with it when a PR is opened or watched.
pr (bundled skill): creates one pull request generically; it gathers branch
context and applies Claude Code's own title, body, and attribution. The model and
the person can both invoke it./commit-push-pr (built-in command): commits, pushes, and opens a PR in one prompt-driven
step. The model and the person can both invoke it./autofix-pr (built-in command): spawns a cloud session that watches the current branch's
PR and pushes fixes when CI fails or reviewers comment. Reserved for the
person to run; the model does not invoke it.Routing. Where no draft discipline, body contract, or later lifecycle step applies: when the
bundled pr skill resolves in this session, prefer it to open a PR from work already committed;
when /commit-push-pr resolves, prefer it only when the whole working tree belongs in the commit,
since it commits, pushes and opens the PR in one step. With unrelated uncommitted changes, pr
is the native route, never /commit-push-pr. Prefer
this skill whenever the repository declares a PR convention or the work continues into ready,
monitor, or merge.
Native suggestions are on unless native_suggestions resolves off: a personal docs/conventions/source-control.local.yaml value wins over the team docs/conventions/source-control.yaml value, which wins over the per-user value ${user_config.native_suggestions} (a literal unexpanded token means unset); with none set they are on. A value other than on or off is named and that layer dropped: a valid higher layer still wins, otherwise on, never a lower layer's value. When off, leave /autofix-pr and its prompt out of the recommendation and write nothing in their place, not even a note that it was skipped or why.
Choose who watches the PR. At the end of ready, and at monitor entry when no choice was
made, pick between this skill's monitor, a background agent, /background, /autofix-pr and the
babysit loop by whether the person is staying and whether the machine stays on, after reading the
plan's rate-limit windows: at 95% or above, report the window and the options, and the person decides. For a route only
the person can start, print it ready to run. If /autofix-pr is available in your session (gate
basis: it registers gated and needs forge CLI and cloud-session access; records in
reference/native-surfaces.md) and native suggestions are on
(native_suggestions, Configuration), the person can run it instead of or
alongside this skill's monitor, with a filled-in prompt carrying this skill's review discipline. The
matrix and the prompt:
reference/watch-handoff.md. When the caller passes --unattended,
with any action, the run omits the /autofix-pr suggestion and its prompt, writes
Withheld suggestion (unattended): /autofix-pr in its output, and does not ask the person; without
that flag it asks.
Mutation gate. pr and /commit-push-pr commit, push, and open a PR; /autofix-pr pushes
fixes to the PR branch from a cloud session. This skill never chains into any of them on its own
behalf. When /autofix-pr runs alongside this loop, both push to one branch. Before each fix
commit, fetch the PR head and merge it into the checked-out branch (git merge --ff-only when there
are no local commits, else git merge), then re-check the pending edit against the merged tree and
drop it when the cloud session already fixed that finding. A fetch alone leaves the local branch on
the old tip, and the push that follows is rejected as non-fast-forward.
Availability is never assumed. pr and /autofix-pr register gated, and /autofix-pr also
needs forge CLI and cloud-session access; this section states what to do when a surface resolves, never
that it is present. The four-part records live in
reference/native-surfaces.md.
The reference/ files write this skill's directory as <skill-dir>, which is
${CLAUDE_SKILL_DIR}, the plugin's root directory as <plugin-root>, which is
${CLAUDE_PLUGIN_ROOT}, and the plugin's data directory as <plugin-data>, which is
${CLAUDE_PLUGIN_DATA}. Put each path in place of its placeholder before running a command or
writing it into a brief: we never rely on a ${…} token in a file read from disk being expanded
later. Where each plugin variable resolves: the plugins reference,
https://code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves.
reassess returned rework: /implementation:implement.media action: /review:reviewer-media <pr>.${user_config.fetch_logs_max_bytes}; when that value is a number other than the 52428800 default (not empty, not a literal unexpanded token), pass it to the archive fetch as --max-bytes <value>. The CLI's failed-log view truncates large logs (provider reference "Checks and CI logs"); the script-based paths return complete data. Do not use broad keyword grep (error|fail|...): it matches cleanup steps, variable names, and incidental output<pr_number> once at phase entry and pass it to every later forge call ("PR identity resolution" above)git branch -D, not -d. After a squash merge the local branch commit is not in the default branch's history (different SHA), so -d says "not fully merged." -D is safe because you already confirmed the mergegit add -A and git add . are banned. They risk committing secrets, build artifacts, or unrelated changes. Always git add <specific-files>pull_request). Integrate the default branch first, then pollmerge_guard_ignored_checks setting, before merge is even suggested; no failure is informational. See readiness.md for the full 6-gate checklistgit reflog recovers only commits. Before staging (Phase 2.3.1) and before the post-merge worktree transition (Phase 4.3), check git status --porcelain for unrelated uncommitted changes and stash them (git stash push -m "desc" -- <files>); stashes survive branch deletion. Never silently ignore uncommitted changesCLAUDE_CODE_REMOTE=true) poll the PR's checks and comment surfaces on a fixed 90s cadence, and subscribe to PR activity where offered so reviews and failed checks wake them sooner. The poll stays, since pushes and green checks produce no event (§3.0.0 of monitor.md holds the decision, its pointer and its recheck trigger)Monitor watch armed with an explicit timeout_ms and re-armed at each deadline, per monitor.md §3.0.1; 90s poll fires on real CI/comment events; cancel via TaskStop), (3) fixed-interval cron polling (deprecated, wasteful). Check for a channel before the Monitor tool: polling sends seven conditional reads per 90s interval vs ~0 idle with push delivery. Pointer: for what a conditional read counts against the rate limit, fetch Use conditional requests liveevals/docs/conventions/source-control.yaml (opens in a new tab)evals/evals.json (opens in a new tab)evals/fixtures/ci-status-security-fail.md (opens in a new tab)evals/fixtures/source-control-open-draft.yaml (opens in a new tab)evals/fixtures/source-control-open-invalid.yaml (opens in a new tab)evals/fixtures/source-control-open-ready.yaml (opens in a new tab)evals/fixtures/source-control-pre-ready-security-off.yaml (opens in a new tab)evals/fixtures/source-control-pre-ready-unknown-step.yaml (opens in a new tab)evals/fixtures/source-control-prep-audits-replace-markdown.yaml (opens in a new tab)evals/fixtures/source-control-prep-audits-unknown-class.yaml (opens in a new tab)evals/fixtures/source-control-required-none.yaml (opens in a new tab)evals/fixtures/source-control-required-related.yaml (opens in a new tab)evals/fixtures/source-control-required-summary-test-plan.yaml (opens in a new tab)reference/ci-ci.md (opens in a new tab)reference/comments-ci.md (opens in a new tab)reference/conflicts-ci.md (opens in a new tab)reference/create.md (opens in a new tab)reference/dependency-ci.md (opens in a new tab)reference/evidence.md (opens in a new tab)reference/full-lifecycle.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin source-control6 skills in this plugin
/babysit-loopBabysit loopRun one project's PR queue as a standing or drain merge lane via /loop (needs OWNER/REPO), invoking /source-control:babysit-prs each cycle (human approval until adopted). Use for 'babysit loop', 'merge lane', or draining a queue. Not for single sweeps (run once) or one PR: /source-control:pull-request./babysit-prsBabysit PRsBabysit open GitHub pull requests as a repo fleet loop: safe default checks own PRs, fixes branch issues (no thread resolve/merge); 'worker' resolves outdated bot threads, gate-proven merges; 'autopilot' adds all authors under watched owners. Use to babysit/watch/advance a PR fleet or pair with /loop. Not for one PR: /source-control:pull-request./commitOther plugins' skills for the same job