pr-comment
Skill192 starsChanged 37 days agoMITView on GitHub
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).
6 other projects use a version of this.
Adopted by
Most recently taken up by
- warrisk-no/claude-skillstheir own version, first seen Oct 20, 2026
- 8starlabs/uitheir own version, first seen Oct 17, 2026
- sd0xdev/sd0x-dev-flowword for word, first seen Oct 8, 2026
- MadAppGang/claudishtheir own version, first seen Aug 4, 2026
- napnap11/claude-skillstheir own version, first seen Jun 26, 2026
- BenjaminG/ai-skillstheir own version, first seen Jun 2, 2026
Other versions6 projects use a version of this.
Word for word · 1
- sd0xdev/sd0x-dev-flow★ 192100% same
Edited · 0
None found.
Wrote their own version · 5
- MadAppGang/claudish★ 1ksame name
- 8starlabs/ui★ 143same name
- BenjaminG/ai-skills★ 4same name
- napnap11/claude-skills★ 1same name
- warrisk-no/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository102 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adrSkill
- agentctl-setupSkill
- architectureSkill
- askSkill
- best-practicesSkill
- bug-fixSkill
- bump-versionSkill
- check-coverageSkill
- claude-healthSkill
- code-exploreSkill
- code-investigateSkill
- codex-architectSkill
- codex-brainstormSkill
- codex-cli-reviewSkill
- codex-code-reviewSkill
- codex-explainSkill
- codex-implementSkill
- codex-review-branchSkill
- codex-review-docSkill
- codex-review-fastSkill
- codex-reviewSkill
- codex-securitySkill
- codex-setupSkill
- codex-test-genSkill
- codex-test-reviewSkill
- contract-decodeSkill
- create-prSkill
- create-requestSkill
- de-ai-flavorSkill
- debugSkill
- deep-analyzeSkill
- deep-exploreSkill
- deep-researchSkill
- dep-auditSkill
- deploy-flowSkill
- dev-security-auditSkill
- doc-refactorSkill
- doc-reviewSkill
- epic-mergeSkill
- feasibility-studySkill
- feature-devSkill
- feature-verifySkill
- fp-briefSkill
- generate-runnerSkill
- gh-stackSkill
- git-investigateSkill
- git-profileSkill
- install-hooksSkill
- install-rulesSkill
- install-scriptsSkill
- issue-analyzeSkill
- jiraSkill
- load-pr-reviewSkill
- merge-prepSkill
- necessity-auditSkill
- next-stepSkill
- obsidian-cliSkill
- op-sessionSkill
- orchestrateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 107
Write the comments to a temp JSON file, then run:
- Distinctive: line 130
If invalid comments exist, show them with reasons.
- Distinctive: line 131
If warnings exist, note them but include in payload.
- Distinctive: line 135
Use AskUserQuestion to get user approval before submitting.
- Distinctive: line 156
If submit returns exit 3:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Comment
Trigger Keywords
pr comment, review comment, post comment, send review, pr feedback, inline comment
When NOT to Use
| Need | Use 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:
| Rule | Description | Example |
| Questions over commands | Use "would it make sense to" instead of "change this to" | "Would it make sense to extract this to a shared utility?" |
| Code, not person | Subject is the code, not "you" | "This logic seems to..." not "You wrote..." |
| Explain why | Give the reason, not just the what | "If one copy gets a bug fix but the other doesn't..." |
| Assume good intent | Confirm rather than accuse | "Just want to confirm this trade-off is intentional" |
| Praise first | Acknowledge before suggesting | "This async design is great. One thought though..." |
| No emoji | Unless user explicitly requests | -- |
| Follow PR language | Match the language used in the PR | -- |
Internal classification (Conventional Comments, not shown in output):
| Label | Purpose | Blocking |
suggestion | Improvement proposal | Configurable |
question | Clarification | No |
issue | Points out a problem | Yes |
nitpick | Stylistic preference | No |
praise | Positive feedback | No |
Workflow
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
endStep-by-Step
Step 0: Collect Comments
From the conversation context, gather the user's review comments. Each comment needs:
| Field | Required | Default | Description |
path | Yes | -- | File path (repo-relative) |
line | Yes | -- | Line number (positive integer) |
side | No | RIGHT | RIGHT (new) or LEFT (deleted) |
body | Yes | -- | Comment content |
Step 1: Prepare (Dry-run)
Write the comments to a temp JSON file, then run:
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:
## 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: KIf 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 scripts/run-skill.sh pr-comment pr-comment.js \
submit --pr <N> --repo <owner/repo> --input <payload.json>Step 4: Handle Results
| Exit Code | Meaning | Action |
| 0 | Success | Report review URL |
| 2 | Error (including 422) | Report error details |
| 3 | SHA drift | Warn user, offer to re-prepare |
SHA Drift Handling
If submit returns exit 3:
- Inform user: "PR head has changed since prepare"
- Re-run prepare with new SHA
- Show updated dry-run preview
- AskUserQuestion for re-confirmation
- 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

