---
name: publish-pr-review
description: Publish a completed pull request review with inline findings, or carry out its closure recommendation. Use when asked to post, submit, or publish review findings, or close a pull request after review; do not use this skill to conduct the review itself.
title: publish-pr-review
canonical_url: https://skilld.dev/gh/webpro/skills/publish-pr-review
last_updated: 2026-11-12T12:18:23.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install webpro/skills/publish-pr-review`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/publish-pr-review`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/webpro/skills/publish-pr-review) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/publish-pr-review`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/publish-pr-review --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/publish-pr-review --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Publish PR Review

Publish the verdict and findings of a completed review from this conversation, or carry out its authorized closure recommendation. Use its evidence when composing the public copy; do not conduct another review or add findings.

## Do not publish when

Stop on any of these, say which one, and ask for what would clear it.

1. The user has not explicitly authorized the requested action. Publishing a review does not authorize closing the pull request. Neither action authorizes code changes, labels, reviewer requests, or merges.
2. The head has moved past the revision that was reviewed. Checking the findings against the new commits is reviewing rather than publishing, so hand it back instead of doing it here, even when they look like they survive. Publishing against unreviewed code is worse than publishing late.
3. You are publishing a review and every finding is already on the pull request. Read the existing reviews, threads, and PR comments first, including other people's and ones predating the reviewed revision. Drop the findings those threads already cover, say which you dropped, and stop only when nothing is left to add. This condition covers duplication alone; a moved head is condition 2 and outranks it.
4. The exact review body, inline comments and locations, or closing comment have not been shown and confirmed. Show the copy itself as a separate step before any mutation; a summary or file path is not a substitute.
5. The review depends on an unresolved decision from the maintainer. Return it to triage; do not resolve the review's direction while publishing.

## Public copy

Write to the pull request author as a colleague discussing the change. Use the completed review and the PR conversation to decide what needs saying.

- Reuse wording the user already approved verbatim, adjusting only local paths and links for the pull request UI and labels under the policy below.
- On our first review or comment, including when requesting changes, thank the contributor by first name (profile or commits), falling back to `@login` only when there is none.
- On follow-ups, acknowledge the revisions and continue the discussion. Keep appreciation brief, proportionate, and specific when the evidence supports it.
- Use the body to explain what is ready or what still needs attention. A short paragraph usually suffices; leave detailed evidence in the inline comments and let the GitHub event carry the formal verdict.
- Preserve each finding's impact, evidence, and certainty. Explain the condition that causes the problem, its effect, and the needed outcome in the order that makes the concern easiest to follow.
- Omit formal priority or severity labels such as `[P1]` unless explicitly requested or already used in that PR.
- Make requests courteous and concrete: explain the result needed and give the author room to choose a fix. Keep blockers distinct from optional suggestions.
- Omit command logs, test ledgers, tool names, local paths, and review-process narration.

Before showing the assembled body and comments for confirmation, pass them through `review-prose` when available. It owns factual fidelity, wording, and active house style; this skill owns review-specific communication and placement. Check that the body and inline comments work together without repeating the same explanation.

## Place the findings

- Anchor each actionable finding to the changed line it concerns.
- Keep one concern per inline thread.
- When no changed line can honestly anchor a finding, put it in the body with its file and line rather than anchoring it to an adjacent line.

## Submit

1. For review publication, send one review carrying the verdict and every inline finding: `APPROVE` when ready, `REQUEST_CHANGES` when a finding blocks, `COMMENT` otherwise. For closure, post one comment explaining the reasons and close the pull request; inline findings invite fixes that will not be merged.
2. Verify the published review or closed state, head commit, comment bodies, and any inline locations.
3. Report a direct link, and nothing else.

## GitHub review API

`gh pr review` sends a body only and cannot attach inline comments. One request per finding fans the review out into unrelated threads. Send the whole review at once:

```sh
gh api --method POST repos/{owner}/{repo}/pulls/NUMBER/reviews --input - <<'JSON'
{
  "commit_id": "PINNED_HEAD_SHA",
  "event": "REQUEST_CHANGES",
  "body": "CONFIRMED_REVIEW_BODY",
  "comments": [
    { "path": "src/parse.js", "line": 42, "side": "RIGHT", "body": "CONFIRMED_FINDING_1" },
    { "path": "src/parse.js", "start_line": 55, "start_side": "RIGHT", "line": 58, "side": "RIGHT", "body": "CONFIRMED_FINDING_2" }
  ]
}
JSON
```

- Set `event`. Omitting it leaves the review `PENDING` and unpublished.
- Set `commit_id` to the reviewed head. It otherwise defaults to the newest commit, publishing the review against code nobody reviewed.
- Anchor with `line` and `side`; add `start_line` and `start_side` for a range. Use `RIGHT` unless the finding is about a line the pull request deletes.
- `position` is deprecated. Do not use it.
- Every anchor must sit inside a diff hunk, both ends of a range included. An anchor outside a hunk fails the whole request with `422 pull_request_review_thread.line must be part of the diff`, taking the verdict and every other finding with it.
- Collect the commentable lines from the per-file `patch` in `repos/{owner}/{repo}/pulls/NUMBER/files` before sending.
- Verify anchors through `repos/{owner}/{repo}/pulls/NUMBER/comments`; the review's own comments endpoint can omit `line` and `side`.
