Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

pr-review-post

/pr-review-post

Publikuje w GitHubie jedną recenzję PR-a z werdyktem i komentarzami w kodzie, jednym wywołaniem API.

Repozytorium
empire ↗
Licencja
MIT
Ostatnia zmiana repozytorium
07.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 07.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Publikuje w GitHubie jedną recenzję PR-a z werdyktem i komentarzami w kodzie, jednym wywołaniem API.

Wyzwalacze z opisu

PR reviewcode reviewreview with inline commentsapprove the PRrequest changespost the reviewsubmit the reviewpublish the review comments
Oryginalny opis (EN)

Post a GitHub PR review (verdict + inline comments) in one API call. Use when posting, submitting, or publishing a "PR review", "code review", "review with inline comments", "approve the PR", "request changes", or any payload bound for `gh api repos/*/pulls/*/reviews`. Triggers on "post the review", "submit the review", "publish the review comments", "approve this PR", "request changes on the PR", "leave a review". MUST be used for any review POST so comments and verdict land atomically. Never posts without the caller's confirmed verdict.

Jak działa

  1. Step 1 — Resolve the target
  2. Step 2 — Anchor comments
  3. Step 3 — Build the payload
  4. Step 4 — Post
  5. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 78 linii, 567 słów
Podgląd SKILL.md
---
name: pr-review-post
description: >
  Post a GitHub PR review (verdict + inline comments) in one API call. Use
  when posting, submitting, or publishing a "PR review", "code review",
  "review with inline comments", "approve the PR", "request changes", or any
  payload bound for `gh api repos/*/pulls/*/reviews`. Triggers on "post the
  review", "submit the review", "publish the review comments", "approve this
  PR", "request changes on the PR", "leave a review". MUST be used for any
  review POST so comments and verdict land atomically. Never posts without
  the caller's confirmed verdict.
compatibility: Requires the gh CLI and network access. Runs in Claude Code and OpenAI Codex.
allowed-tools: Bash Read Grep
---

# PR Review Post

Posts ONE review — verdict, summary, and inline comments — in a single GitHub API call. The caller supplies the confirmed event, summary, and comment list; this skill owns the mechanics of anchoring, payload building, posting, and retrying.

CRITICAL:

- The ENTIRE review goes in ONE POST. Never post comments individually; never create a pending review then submit separately.
- Never post without an explicit confirmed verdict from the caller. This skill does not decide the verdict.

## Step 1 — Resolve the target

- Inputs from the caller: PR (number or URL), event (`APPROVE` | `REQUEST_CHANGES` | `COMMENT`), summary body (may be empty), and the comment list (`path`, `line`, optional `start_line`, `side`, `body`).
- Derive `OWNER`/`REPO` from the PR's OWN base repo, never from `gh repo view` (cwd may be a different repo or fork): `gh pr view "$PR" --json number,url` then parse `OWNER`/`REPO` from `.url` and set `PR` from `.number`.
- Fetch the head SHA right before posting: `SHA=$(gh pr view "$PR" --json headRefOid -q .headRefOid)`. If the caller validated comments against an earlier SHA and it changed, warn that anchors may have drifted and get re-confirmation before posting.

## Step 2 — Anchor comments

- Every inline comment MUST land on a line present in the PR diff:
  - Added or context line → `side: RIGHT`
  - Deleted line → `side: LEFT`, only when that line sits inside a displayed diff hunk
  - Span → `start_line` + `line` (same side)
- A finding outside the diff → fold into the summary body. Never invent a line.

## Step 3 — Build the payload

Build with `jq` into a temp file; pass every comment `body` and the summary as `--arg` values, NEVER via string interpolation (bodies hold quotes, backticks, `$()`):

```bash
payload=$(mktemp)
# Append each comment as data, never interpolated into the JSON:
comments='[]'
comments=$(jq -c --arg path "$P" --argjson line "$N" --arg side RIGHT --arg body "$Q" \
  '. + [{path: $path, line: $line, side: $side, body: $body}]' <<<"$comments")
# repeat per comment; for a span add --argjson start_line and --arg start_side
jq -n --arg commit "$SHA" --arg event "$EVENT" --arg body "$SUMMARY" --argjson comments "$comments" \
  '{commit_id: $commit, event: $event, body: $body, comments: $comments}' >"$payload"
```

Payload shape:

```json
{
  "commit_id": "<SHA>",
  "event": "COMMENT|APPROVE|REQUEST_CHANGES",
  "body": "<summary or empty>",
  "comments": [
    { "path": "src/x.ts", "line": 42, "side": "RIGHT", "body": "..." },
    {
      "path": "src/x.ts",
      "start_line": 40,
      "start_side": "RIGHT",
      "line": 44,
      "side": "RIGHT",
      "body": "..."
    }
  ]
}
```

- With `comments` present, any event MAY omit `body`; with no `comments`, `COMMENT` and `REQUEST_CHANGES` require a non-empty `body` (`APPROVE` MAY always be empty).

## Step 4 — Post

```bash
gh api --method POST "repos/$OWNER/$REPO/pulls/$PR/reviews" --input "$payload"
rm -f "$payload"
```

- After posting, report the review URL from the API response.
- On API error (line not in diff, stale `SHA`): re-resolve the anchor or `SHA` and retry the single call, max 2 retries. If a retry changes an anchor the caller already validated, re-confirm that comment first. Never split into multiple posts; surface to the caller after repeated failure.

## Boundaries

- The single review POST is the only GitHub write. MUST NOT push commits, edit the PR body, change labels, or comment outside the review.
- MUST NOT modify the code under review.
- MUST NOT alter comment bodies, the summary, or the event beyond what the caller confirmed.

Wersje

W bazie nie ma innych skilli o nazwie pr-review-post.

Migawka bazy z 13.11.2026 · wersja paczki 74cd7b9c946f (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 3 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100pr-review-comments
    Publikuje inline komentarze przeglądu do konkretnych linii pull requesta na GitHub.
  • 100review-pr
    Przegląda kod równolegle agentami i publikuje w GitHubie oczekującą recenzję z komentarzami przypisanymi do linii kodu.
  • 100pr-comment
    Publikuje przyjazne komentarze review w PR na GitHubie: przygotowuje je lokalnie, pokazuje podgląd i wysyła jako jedną atomową recenzję.
  • 100review-pr
    Przegląda cudzy PR w gcx, tworzy ranking ustaleń z werdyktem i opcjonalnie publikuje komentarze w liniach kodu na GitHubie.
  • 100review-pr
    Przegląda istniejący pull request na GitHubie i publikuje komentarze inline w jego diffie, gdy zmiany są już na otwartym PR.
  • 100inline-pr-comments
    Publikuje jeden skonsolidowany przegląd pull requesta z podsumowaniem i komentarzami w linii, dostarczając uwagi z code review jako jedną całość.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.