adr
Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as…
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
Claude Code
$ npx -y skills add sd0xdev/sd0x-harness --skill pr-comment --agent claude-code
Codex
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a codex -y
Cursor
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a cursor -y
Gemini CLI
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a gemini-cli -y
GitHub Copilot
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a github-copilot -y
OpenCode
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a opencode -y
Windsurf
$ npx skills add sd0xdev/sd0x-harness --skill pr-comment -a windsurf -y
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`, `review comment`, `post comment`, `send review`, `pr feedback`, `inline comment`
| 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` |
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.
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 |
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
endFrom 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 |
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: K
If invalid comments exist, show them with reasons. If warnings exist, note them but include in payload.
Use AskUserQuestion to get user approval before submitting.
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>
| 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 |
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
Language: English | 繁體中文 | 简体中文 | 日本語 | 한국어 | Español The harness layer for Claude Code. Let the model choose the path. Keep "done" verifiable. Claude has discretion inside a closed, test-pinned anchor set.
Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as…
Install and set up the optional agentctl mod (task scope, refusal before execution, evidence that goes stale, model-free…
Architecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and…
Context-aware Q&A with auto context gathering. Use when: user has a quick question about codebase, git history, rules, docs, or…
Industry best practices conformance audit with mandatory adversarial debate. Produces audit artifact: verdict (OK/WARN/FAIL) +…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.