/workflows:github-prfrom workflows
Create, 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.
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.
Use this skill to create a new PR, update an existing one, or respond to feedback on a PR. Treat the applicable Definition of done items as a hard gate and confirm each with the evidence it names before reporting done, so no comment is forgotten.
Check this repo's AGENTS.md/CLAUDE.md for a ## Pull requests section and apply it on top of the flow below.
It typically pins extra gh pr create flags, required labels, or a changelog/news-fragment file the PR must add.
Create PRs from the commit message - do not re-author the prose in the PR form:
gh pr create --fill
--fill takes the title from the latest commit's subject and the body from its body, so a well-formed commit (see ../commit/SKILL.md) yields a well-formed PR.
Add any repo-required flags/labels from ## Pull requests.
Hold the PR title and body to the same bar as the commit message:
--filled from; flag any drift.A PR collects feedback in three places, and all of them count:
main, no --no-verify, and no --amend on commits already pushed for review (outside the --force-with-lease patchset flow the scrutinize skill describes).../commit/SKILL.md, including the mandatory Co-authored-by: trailer.<>)gh repo view --json owner --jq .owner.login # <OWNER>
gh repo view --json name --jq .name # <REPO>
gh pr view --json number --jq .number # <N> for the current branch
# Or, if the PR number N was given explicitly, check it out:
gh pr checkout <N>
The REST endpoint /pulls/:n/comments does not expose thread resolution state, so use GraphQL for the inline threads and pull the review bodies and PR-level comments in the same query:
gh api graphql -f query='
query($owner:String!,$name:String!,$number:Int!){
repository(owner:$owner,name:$name){
pullRequest(number:$number){
reviewThreads(first:100){
pageInfo{ hasNextPage endCursor }
nodes{
id isResolved isOutdated
comments(first:50){
pageInfo{ hasNextPage endCursor }
nodes{ id databaseId author{login} path line body }
}
}
}
reviews(first:50){
pageInfo{ hasNextPage endCursor }
nodes{ id author{login} state body }
}
comments(first:100){
pageInfo{ hasNextPage endCursor }
nodes{ id databaseId author{login} body }
}
}
}
}' -F owner=<OWNER> -F name=<REPO> -F number=<N>
If any pageInfo.hasNextPage is true, request the next page with an after: <endCursor> argument on that connection (including a thread's nested comments) and merge the results before proceeding - never act on a truncated list.
Address each of:
reviewThreads with isResolved == false - reply on the databaseId of the first comment (step 4), then resolve via the thread id (step 5).reviews with a non-empty body - handle the requested change and reply at PR level (step 4) for points not covered by an inline thread.comments (PR-level) still expecting an answer - reply at PR level (step 4); these have no resolve state.Commit per ../commit/SKILL.md, then push:
git push # already-tracked branch
git push -u origin "$(git branch --show-current)" # first push of a new branch
Capture the commit SHA (git rev-parse HEAD) to reference in your replies.
Inline review thread - reply to the first comment in the thread (its databaseId from step 2); GitHub threads your reply underneath:
gh api --method POST \
repos/<OWNER>/<REPO>/pulls/<N>/comments/<COMMENT_DATABASE_ID>/replies \
-f body='Fixed in <SHA>. <optional short explanation>.'
Review summary or PR-level (issue) comment - reply at PR level:
gh pr comment <N> --body 'Addressed in <SHA>: <short explanation>.'
Do not answer an inline thread with gh pr comment (it will not thread under the review comment), and do not try to "resolve" a PR-level comment.
Use the thread node id from step 2 (the GraphQL id, not databaseId):
gh api graphql -f query='
mutation($threadId:ID!){
resolveReviewThread(input:{threadId:$threadId}){
thread{ id isResolved }
}
}' -F threadId=<THREAD_NODE_ID>
Re-run the step-2 query.
Every inline thread you addressed should now be isResolved: true, and every review summary and PR-level comment should have a reply.
Anything still open needs a fix or was intentionally deferred - never silently skip one.
../commit/SKILL.md, skipping the mandatory Co-authored-by: trailer.--amend on commits already pushed (outside the --force-with-lease patchset flow).Confirm each applicable item below with the evidence it names before you report the PR done.
Creating a PR:
## Pull requests conventions read; required flags, labels, and files added.gh pr create --fill; title and body meet the format above.Updating / addressing feedback:
commit skill and pushed (step 3); evidence: the pushed SHA.What SKILL.md sets; muted values are Claude Code's defaults
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./scrutinizeSelf-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.