Agent skill

PR Comment

by sd0xdev in sd0xdev/sd0x-harness

Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

MITAuto-check passedDevelopment

Install PR Comment

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness pr-comment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pr-comment .claude/skills/pr-comment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-comment
GitHub stars
192
Token cost
~1.5k tokens
SKILL.md length
426 words
Files
3 (incl. scripts, references)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

  • Works in 5 steps: Collect Comments → Prepare (Dry-run) → Confirm → …
  • : posting code review comments
  • SKILL.md covers Trigger Keywords, When NOT to Use, Core Principle and Tone Guidelines, plus 4 more sections
  • Runs JavaScript scripts from its folder; calls bash

What it does

PR Comment is an agent skill from sd0xdev/sd0x-harness. Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review. Use when: posting code review comments, giving PR feedback, sending inline suggestions. Not for: reading existing reviews (use load-pr-review), creating PRs (use create-pr), PR status (use pr-summary).

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/api-and-guardrails.md` and `scripts/pr-comment.js`).

It sits in Development, covering Pull requests. It works with GitHub. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • : posting code review comments
  • Giving PR feedback
  • Sending inline suggestions

Example prompts

  • “/pr-comment”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Collect Comments
  2. Prepare (Dry-run)
  3. Confirm
  4. Submit
  5. Handle Results

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Comment loads about 1.5k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 426 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 426 words, ~1,458 tokens.

Download SKILL.mdSave it as .claude/skills/pr-comment/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
pr-comment
description
Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review. Use when: posting code review comments, giving PR feedback, sending inline suggestions. Not for: reading existing reviews (use load-pr-review), creating PRs (use create-pr), PR status (use pr-summary).

PR Comment

Trigger Keywords

pr comment, review comment, post comment, send review, pr feedback, inline comment

When NOT to Use

NeedUse Instead
Read existing PR review comments/load-pr-review
Create a code review (automated)/codex-review-fast or /codex-review
Create a PR/create-pr
PR status overview/pr-summary

Core Principle

Discuss locally → prepare friendly comments → dry-run preview → user confirms → atomic submit
Control plane (this SKILL.md) handles conversation, tone, orchestration.
Data plane (JS script) handles validation, API calls, safety.

Tone Guidelines

Claude prepares comments following these rules:

RuleDescriptionExample
Questions over commandsUse "would it make sense to" instead of "change this to""Would it make sense to extract this to a shared utility?"
Code, not personSubject is the code, not "you""This logic seems to..." not "You wrote..."
Explain whyGive the reason, not just the what"If one copy gets a bug fix but the other doesn't..."
Assume good intentConfirm rather than accuse"Just want to confirm this trade-off is intentional"
Praise firstAcknowledge before suggesting"This async design is great. One thought though..."
No emojiUnless user explicitly requests--
Follow PR languageMatch the language used in the PR--

Internal classification (Conventional Comments, not shown in output):

LabelPurposeBlocking
suggestionImprovement proposalConfigurable
questionClarificationNo
issuePoints out a problemYes
nitpickStylistic preferenceNo
praisePositive feedbackNo

Workflow

mermaid
sequenceDiagram
    participant U as User
    participant C as Claude (Conversation)
    participant SK as SKILL.md (Orchestration)
    participant JS as pr-comment.js (Data Plane)
    participant GH as GitHub API

    Note over U,C: Phase 1: Natural conversation
    U->>C: Discuss PR diff, observations
    C->>U: Draft N friendly comments
    U->>C: Adjust tone / content / count

    Note over U,GH: Phase 2: Skill invoked
    U->>SK: /pr-comment [PR#]
    SK->>SK: Collect comments from conversation

    SK->>JS: prepare --pr N --repo owner/repo --input comments.json
    JS->>GH: gh pr view (metadata)
    JS->>GH: gh api pulls/N/files (changed files)
    JS->>GH: gh api pulls/N (head SHA)
    JS-->>SK: Validated payload + validation summary

    SK->>U: Dry-run preview (default)

    alt User confirms
        SK->>U: AskUserQuestion gate
        U->>SK: Approved
        SK->>JS: submit --pr N --repo owner/repo --input payload.json
        JS->>JS: Re-fetch head SHA, drift check
        JS->>GH: POST /repos/{owner}/{repo}/pulls/{N}/reviews
        GH-->>JS: 200/201 Success
        JS-->>SK: Success + review URL
        SK->>U: Review posted successfully
    end

Step-by-Step

Step 0: Collect Comments

From the conversation context, gather the user's review comments. Each comment needs:

FieldRequiredDefaultDescription
pathYes--File path (repo-relative)
lineYes--Line number (positive integer)
sideNoRIGHTRIGHT (new) or LEFT (deleted)
bodyYes--Comment content
Show full SKILL.md (186 more words)Show less
Step 1: Prepare (Dry-run)

Write the comments to a temp JSON file, then run:

bash
bash scripts/run-skill.sh pr-comment pr-comment.js \
  prepare --pr <N> --repo <owner/repo> --input <comments.json>

Parse the JSON output. Display to user:

markdown
## PR #<N>: <title>
**Target**: <owner/repo> | **Head**: <branch> | **State**: <state>

### Comments to Post (<valid>/<total> valid)

| # | File | Line | Side | Preview |
|---|------|------|------|---------|
| 1 | path/to/file.go | 136 | RIGHT | First 80 chars of body... |

### Validation
- Valid: N | Invalid: M (excluded) | Warnings: K

If invalid comments exist, show them with reasons. If warnings exist, note them but include in payload.

Step 2: Confirm

Use AskUserQuestion to get user approval before submitting.

Step 3: Submit

Save the prepare output (including payload) to a temp file, then run:

bash
bash scripts/run-skill.sh pr-comment pr-comment.js \
  submit --pr <N> --repo <owner/repo> --input <payload.json>
Step 4: Handle Results
Exit CodeMeaningAction
0SuccessReport review URL
2Error (including 422)Report error details
3SHA driftWarn user, offer to re-prepare
SHA Drift Handling

If submit returns exit 3:

  1. Inform user: "PR head has changed since prepare"
  2. Re-run prepare with new SHA
  3. Show updated dry-run preview
  4. AskUserQuestion for re-confirmation
  5. Re-submit

Verification Checklist

  • Comments collected from conversation context
  • prepare validates paths against changed files
  • prepare validates line numbers (positive integer)
  • prepare validates body (non-empty)
  • Dry-run preview shown to user before submit
  • AskUserQuestion gate before submit
  • SHA drift detected and handled
  • Review URL reported on success
  • jq + temp file pattern used (no shell interpolation)

References

  • references/api-and-guardrails.md -- API contract + safety rules + exit codes

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in skills/pr-comment of sd0xdev/sd0x-harness.

  • SKILL.md
  • references/api-and-guardrails.md
  • scripts/pr-comment.js

Open the folder on GitHubat commit c9a2036

Compare with similar skills

PR Comment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Comment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Comment this skillsd0xdev/sd0x-harness192—~1.5kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Project Audit

    sd0xdev/sd0x-harness

    Project health audit with deterministic scoring. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~739 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about PR Comment

What does PR Comment do?

Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review. PR Comment is an agent skill from sd0xdev/sd0x-harness. Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

When should I use PR Comment?

PR Comment fits situations like: : posting code review comments; giving PR feedback; sending inline suggestions.

How do I install PR Comment in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill pr-comment -a claude-code`. Or copy the skill folder (skills/pr-comment in sd0xdev/sd0x-harness) into .claude/skills/pr-comment in your project. Claude Code loads it when a task matches its description.

How do I install PR Comment in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill pr-comment -a codex`. Or copy the skill folder (skills/pr-comment in sd0xdev/sd0x-harness) into .agents/skills/pr-comment in your project. Codex loads it when a task matches its description.

Can I use PR Comment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill pr-comment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-comment, .gemini/skills/pr-comment, .github/skills/pr-comment and .opencode/skills/pr-comment in your project.

What does PR Comment need to run?

Going by SKILL.md and its folder, PR Comment needs JavaScript for the scripts in its folder and the command-line tools its instructions call (bash). Our summary lists: Node.js.

Does PR Comment access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is PR Comment safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PR Comment use?

PR Comment is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Comment use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 715 tokens, read only when the agent opens those files.

What are the alternatives to PR Comment?

Skills that share tags, products or a category with PR Comment: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Comment?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.