/gh-workflow:gh-workflowfrom gh-workflow
Use when authoring, revising, or tightening a GitHub pull request or issue body (including asks to write it "in human", clearer, or shorter), composing a bug report or proposal issue, deciding whether a PR is ready to open, working through the review pipeline that gates opening a PR, formatting code-review findings, writing a review or review comment that suggests a different direction on a PR, formatting a reply to a review comment or resolving its thread via gh api (land-pr owns the review loop itself), or coordinating chained/dependent PRs that have a required merge or deploy order.
Ships in gh-workflow. 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.
How to author GitHub PRs and issues, and take a PR through review: the shared body-composition rules, the PR-description and issue-body formats, the gated review pipeline, chained/dependent-PR rules, and the code-review output convention. This is the canonical home for body structure, format, and mechanics. Prose quality lives in writing-for-humans and is not restated here; branch/commit/destructive-git invariants live in CLAUDE.md.
PR descriptions and issue bodies share the same composition rules. Write both for an interrupted reader.
writing-for-humans skill to every part of a body: readability, voice, and the author's written register. This skill owns structure, format, and mechanics only.<br>, so prose wrapped at ~80 cols displays broken mid-sentence. One physical line per paragraph; blank lines separate paragraphs. List items and table rows stay one per line; an intentional multi-line stack is fine, since the break is the point there.--body-file / -F body=@…, never heredoc. Heredoc mangles backticks, fences, !, ". Don't escape backticks. Assemble the file with the Write tool (append boilerplate via cp + printf >> if needed), never printf … "$(cat draft.md)": command substitution always escalates the Bash call to a manual permission prompt, no matter how allowlisted the inner commands are.A PR body explains the what: what will be different, for whom, and why it matters. Write it from the reader's gaps, not the session's work log.
A repo's .github/PULL_REQUEST_TEMPLATE.md is canonical when it exists: read it first, keep its headings and order, fill its required sections. A repo's own PR-body skill adds its repo rules on top of this section. Without a template, every PR body is:
## Goal
<1-3 sentences: what will be different, for whom, and why it matters.>
## Problem it solves
- <the concrete pain this fixes>
- <another, if any>
## What changes <!-- multi-part PRs only; drop for small ones -->
- **<outcome>.** <one sentence of how>
- **<another moving part>.** <...>
Read the branch diff and any linked issue or review thread before drafting. Never infer intent from the branch name. From those, identify what will be different in the running system or for its users, the concrete pain it removes, and whether a person, decision, deploy, or dependency is blocking it.
## Goal names it and who must act: Action needed: the API team must confirm the response shape before this can merge. Nothing waiting → start at ## Goal, no "No blockers" boilerplate. Chained PRs use the blocking callout below.## Verification, no aspirational checklists. When a repo template asks for testing, list the commands and manual checks that ran, one line each, never their output.## Notes only for something the merger must not miss: a merge-order blocker, a deploy step, a risky migration.Before publishing, a reviewer must answer these in about ten seconds without opening the diff:
After creating a PR or pushing to its branch, end the reply with the title in backticks and the bare URL on the next line, read from gh pr view --json title,url, never from memory. Every push, not only the first.
`feat(billing): show invoice totals by currency`
https://github.com/acme/api/pull/3596
An issue is a bug report or a proposal. Both open with a summary, then layer precision beneath.
<BLUF: 1-3 sentences. Bug → what's wrong and its impact. Proposal → the
decision or change you want. This is what a reader skims to decide if it's theirs.>
## Problem / Context
- <the concrete pain, or the current state>
## Reproducer <!-- bug reports -->
<minimal steps or a copy-paste snippet, plus observed vs expected>
## Proposal <!-- proposals -->
- <the change you want>
## Open questions <!-- proposals with calls left to the maintainer -->
- <the decision(s) you want the reader to make>
Closes #N / Refs #N when the issue relates to an existing one.When the work splits into several pieces, file one parent issue and one sub-issue per piece. The parent tells the story, and each sub-issue is a unit someone can pick up cold.
The parent carries the story: the problem, why the obvious fix fails, the end state, the ordered list of sub-issues, and a link to the plan. Evidence and review history stay in the plan.
Each sub-issue stands alone for someone who never opens the plan:
A scope of "Step 2a" or "see plan" fails.
Get approval before filing. Show the user the breakdown (titles, owner, done-when) and confirm the target tracker and parent first. File nothing until they agree.
A public service whose hostnames should only serve webhook paths, before and after:
<!-- before -->
Title: Step 2a: CI hostname behind access gate
Scope: Step 2a. See plan.
<!-- after -->
Title: Add a token-gated hostname for CI traffic
Context: CI runs outside the VPN, so it cannot reach the internal webhook host. Without a gated public hostname, CI deploy hooks fail and the pipeline cannot report back.
Scope: Create ci-hooks.example.com, route it to the webhook paths only, and require the CI token header.
Done when: `curl -s -o /dev/null -w '%{http_code}' https://ci-hooks.example.com/hooks/build` prints 403 without the token header and 200 with it.
Depends on: #<sibling issue that exposes the webhook paths>
When the deliverable is a doc, spec, or plan landing on a docs/... or spec/... branch, push the branch and surface the branch + file URL in chat, then stop. Don't gh pr create unprompted: a PR forces review machinery (bots, approvals, conflicts) onto a doc that's still iterating. The PR is opt-in; if one is wanted, it'll be asked for.
Tier by blast radius, not line count. Gate the pipeline on risk:
Work through these in order. Don't skip ahead: each step's exit criteria must be met before moving on. Fresh context matters: re-running reviews in a new window catches what a fatigued context misses.
Step 1: Implement with tests baked in.
Build the feature end-to-end with unit, integration, and e2e tests. Tests must be hermetic. Task is not done until all tests pass and exercise real behavior (not mocks all the way down).
Exit: feature complete, every test green, behavior verified.
Step 2: Self-review (same agent).
Run /review (or /superpowers:requesting-code-review). Fix every issue raised. Open a fresh context and request review again. Finish with /security-review and repeat the loop.
Exit: clean pass on a fresh context + clean security review.
Step 3: Adversarial review (different agent).
Switch agents: if Claude wrote it, Codex reviews (and vice versa). Invoke the codex-review skill for both a standard and an adversarial review, and iterate until findings are addressed. Worktree paths, job state, and polling live in that skill; don't restate them here.
Exit: both review types pass with no outstanding findings.
Step 4: Open the PR.
Prerequisite (one-time per repo): /install-github-app if not yet wired up.
Push and open the PR. This triggers the automated AI review (Claude Code GitHub Action). gh pr create only after Step 3 exit criteria: opening a PR triggers automated bot reviews, so don't waste cycles on work that hasn't passed adversarial review yet.
Exit: PR opened, automated reviewers triggered.
Step 5: Resolve all bot comments.
Address every automated review comment: fix or justify. See Author-side for the convention.
Exit: zero unresolved bot comments.
Step 6: Human review.
Architecture, intent, tradeoffs. Address requested changes, re-request review.
Exit: human approval. Then hand off to the land-pr skill, which drives rebase, CI, re-review cycles, and the merge.
When a change spans multiple PRs with a required merge/deploy order (a stack, or a cross-repo chain like schema → issuer → enforcer), the dependency is invisible to anyone who didn't write it. GitHub will let a reviewer merge the trailing PR first and break production. Make the chain explicit on every PR in it:
⚠️ BLOCKED: do not merge until <repo>#N is merged AND deployed to all envs. This enforces a contract the issuer does not yet satisfy; merging early 403s every caller.Stack: shared-lib#56 → api#1271 (deploy) → this PR. Note where a deploy (not just a merge) is the real gate: cross-repo chains usually gate on the upstream being live, not merged.```suggestion block only when the fix is short and obviously right, so the author can apply it with one click. A fix that needs a design choice stays a sentence.What to look for: for Go diffs, load the go-style skill, which carries the review checklist.
A review that proposes a different shape, rather than reporting defects, is written as a short argument:
```suggestion block where the fix is one line.The research behind the review stays in private notes until the author asks for it.
This:
The fallback puts a transition into the shared library. A request without a tenant header falls back to the default tenant only because two callers still omit it: the batch importer (
importer/run.go:88) and the legacy webhook adapter (webhooks/legacy.go:41). Every other caller sets it. …
Becomes:
Let's drop the fallback and set the tenant at the source, in the importer and the legacy webhook adapter. Otherwise the library treats a missing tenant as both invalid and default, and removing the fallback later takes a release in every consumer.
Addressed in <commit-hash> (or your reasoning). Never silently click "Resolve."gh api (audit trail), never the web UI "Resolve conversation" button.List threads with their node id and each comment's databaseId:
gh api graphql -f query='
query($o:String!,$n:String!,$p:Int!) {
repository(owner:$o,name:$n) {
pullRequest(number:$p) {
reviewThreads(first:100) {
nodes { id isResolved comments(first:1) { nodes { databaseId author { login } path body } } }
}
}
}
}' -F o='{owner}' -F n='{repo}' -F p=<N>
Reply in the thread, using the first comment's databaseId as <comment_id>:
gh api repos/{owner}/{repo}/pulls/<N>/comments/<comment_id>/replies -f body='Addressed in <commit-hash>'
Resolve the thread by its node id:
gh api graphql -f query='
mutation($id:ID!) {
resolveReviewThread(input:{threadId:$id}) { thread { isResolved } }
}' -f id=<thread_id>
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub klaidliadon/claude-plugins --plugin gh-workflow