/workflows:scrutinize GH PR <number> | commit-id | git-ref-or-range | empty for working changesfrom workflows
Self-review pass that critically challenges, tightens, verifies, and publishes a change. Takes a GitHub PR, a commit, a git range, or empty for the current working changes. Use this whenever the user asks to scrutinize, self-review, review, or clean up a change before committing or pushing.
Ships in workflows. 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.
None: SKILL.md is the whole skill.
You are a senior software development expert with years of experience.
The mechanical half (rebasing, resolving threads, committing, pushing) is the part that gets skipped once the review reads well. The run is complete only when every applicable Definition of done item is checked with the evidence it names.
git/gh state, and blocks the turn when one does not hold.../commit/SKILL.md, ../github-pr/SKILL.md) rather than hand-rolling a message or reply from memory.AGENTS.md/CLAUDE.md early for stack-specific commands and conventions, and honor them throughout.Resolve $ARGUMENTS to the exact set of changes, picking the single matching case:
GH PR 12 -> take the number N, get the diff with gh pr diff N and the metadata with gh pr view N --json number,title,body,state,headRefName,baseRefName,headRepositoryOwner,headRepository,maintainerCanModify,url,author,files,commits,labels.
Do NOT use a bare gh pr view N: its default view fetches classic project cards and fails with a "Projects (classic) is being deprecated" GraphQL error.git show <hash>.main..HEAD, HEAD~3) -> git diff <range-or-ref>.git diff unstaged, git diff --cached staged).Run git fetch origin before resolving any committed target so you scrutinize current state, not a stale checkout.
Skip the checkout below for a plain commit hash, a range, or empty working changes - but first confirm the target is contained in the current branch (git branch --contains <hash> for a commit, git merge-base --is-ancestor <end-ref> HEAD for a range), so your edits and the section-9 publish act on the reviewed commits and not an unrelated HEAD; if it is not contained, stop and ask the user.
For a PR or branch target, edit the actual code, not the tip of whatever branch is checked out:
cd into another worktree, even if git worktree list shows the PR branch checked out elsewhere - those are separate workspaces.git rev-parse --abbrev-ref HEAD) so you can return to it at the end.gh pr checkout N --detach (detaching is what lets this work when the branch is checked out elsewhere), or without gh: git fetch origin pull/N/head then git checkout --detach FETCH_HEAD.Rebase onto the PR's base branch, unless this repo's ## Pull requests conventions prefer merge commits.
A --force-with-lease push to the PR's own branch records a force-push event on the PR timeline with a compare link, keeping the patchset-to-patchset diff visible to the reviewer.
origin/<baseRefName> from the gh pr view --json metadata, NOT a hardcoded origin/main - a PR may target a maintenance/release branch.git rebase origin/<baseRefName>, resolving conflicts properly - do not --abort or --skip to make the work vanish.Read the resolved diff in full, plus all supporting material: any linked issue, existing PR/commit comments, and related discussion.
Then read the surrounding code so a "simpler" rewrite stays correct, and honor AGENTS.md/CLAUDE.md.
Research current best practices online for what the change is trying to do, so each decision below is well founded.
For a PR, follow ../github-pr/SKILL.md to REPLY to and RESOLVE each unresolved thread, not merely read them.
Record how many threads you closed; that count is the evidence for this step.
Reason through correctness against the surrounding code and the project's domain notes in AGENTS.md/CLAUDE.md. Weigh, at least:
Where the project can be exercised, correctness is confirmed by the tests in section 8, not by reasoning alone.
For each addition, ask - and then act:
Keep the result readable: no abbreviations, descriptive variable names, additions that stay legible.
Comments and docstrings, to a strict standard:
The default for every comment and every line of docstring prose is DELETE. A comment earns its place only by explaining what the code cannot - a non-obvious quirk, an empirical reason, an invariant.
AGENTS.md/CLAUDE.md or a linter mandates docstring structure, keep it but trim each entry; required docstrings are shortened, never removed.Enforce the repo's punctuation rules (e.g. ASCII-only) from ## Commit conventions; fix violations in the change.
Apply edits directly. For each, state in one line what you challenged and the verdict (removed / simpler / more elegant / tightened). If something is genuinely needed as-is, say so rather than invent a change.
Hold the commit message and, for a PR, its title and body to section 6's bar: cut any body text that explains neither why nor how the change was verified.
Judge the message against ../commit/SKILL.md: imperative subject within limits, body that explains WHY, repo punctuation honored, exactly one Co-authored-by: trailer.
Fix any failure in the publish step below, UNLESS the commit is already merged into origin/main - then flag it rather than rewrite published history.
Follow ../github-pr/SKILL.md for the PR description format, then judge the PR metadata from section 1:
--filled from; flag any drift.## Pull requests (a changelog/news fragment, a required label).
A missing file artifact is a repo file: add it HERE so the publish step carries it in the patchset; a missing label or title/body fix is a GitHub-side edit in the publish step.For added tests, challenge each: necessary, adds value beyond existing coverage, cannot fold into another?
Drop redundant ones; add or extend a test when the change touches testable logic (see AGENTS.md for what the suite covers).
Verify with this repo's own checks.
Read the commands from ## Code style and ## Testing in AGENTS.md/CLAUDE.md and run them: formatter, linter, type-checker (with autofix where provided), test suite, and any changed-line coverage gate.
If the repo documents no commands, auto-detect from the project files and run the standard toolchain, for example:
Cargo.toml): cargo fmt, cargo clippy, cargo test.pyproject.toml with ruff): ruff format, ruff check --fix, the configured type-checker, pytest.package.json): the project's format/lint/typecheck/test scripts.If you cannot run a gate, reason through it, say so explicitly, and name anything that still needs manual or environment-specific verification.
../commit/SKILL.md.
The head branch lives on headRepositoryOwner.login/headRepository.name from the metadata: for a same-repo PR that is origin, but for a fork PR it is the contributor's fork - identify (and add if missing) that remote, and require maintainerCanModify: true before pushing to it.
Push a patchset only when there is something to push - you committed edits, or the rebase advanced past the head branch's old tip; if the code was already clean and current, report it clean rather than push a no-op.
Push to the head branch on that remote: git push --force-with-lease <head-remote> HEAD:<headRefName> (never plain --force, never a default branch).
Then correct any drifted title/body with gh pr edit <N> --title ... --body ... and add any missing label with gh pr edit <N> --add-label <label>, without being asked.
Finally git checkout <original-branch> and report the new commit hash and the force-push compare link.git commit --amend, keeping the message unless you corrected it) rather than stacking a follow-up, then git push (force-push only if already pushed, confirming with the user first).
Exception: resolve the repo's default branch (git symbolic-ref --short refs/remotes/origin/HEAD, or gh repo view --json defaultBranchRef --jq .defaultBranchRef.name - never assume main); if the commit is already merged into it (git merge-base --is-ancestor <hash> <default-branch> after git fetch origin), do NOT amend - tell the user and offer a history-rewriting force-push or a follow-up commit.git push, using --force-with-lease only if the rewritten commits were already pushed and never onto the default branch. Never rewrite history already merged into the default branch.Each applicable item must hold with the evidence it names before you report done; drop only what genuinely cannot apply.
A Stop-hook verifier re-checks these independently when you stop and blocks the turn when one does not hold, so do not report success with any applicable box unchecked or waved away without proof.
git fetch origin run; evidence: which case, and the diff obtained.origin/<baseRefName> (unless the repo prefers merge commits); evidence: rebase clean or conflicts resolved.github-pr skill; evidence: count closed (state 0 if none).commit skill and fixed if needed.github-pr format and corrected if drifted; repo-required artifacts present; evidence: conforms as-is / what was fixed.## Code style + ## Testing gates run (or auto-detected), or each reasoned through; manual checks named.commit skill and, for a PR with something to push, force-with-lease pushed to <headRefName>, then returned to the original branch; evidence: the new commit hash and compare link, or "clean and current, nothing to push".What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub whmade/claude-marketplace --plugin workflows3 skills in this plugin
/commitWrite a git commit message following the repository's subject/body/trailer conventions, with the mandatory Co-authored-by trailer for AI-generated commits. Use this whenever creating a git commit or the user asks to commit, stage and commit, or record changes - always prefer it over an ad-hoc commit message./github-prCreate, update, or review a GitHub pull request - open a PR, push updates to an existing one, and reply to and resolve every comment on it. Use this whenever the user asks to create/open a PR, update a PR, or address/respond to PR review feedback - always prefer it over ad-hoc gh commands.