Use when the user asks to reply / comment on a PR review thread, review body or conversation comment (CodeRabbit or anyone), OR when posting a reasoning/explanation reply tagging @coderabbitai for a thread you've classified as invalid. Body is read from stdin.
16 stars
0 votes
0 copies
3 views
Added October 24, 2026
developmentpythongobashgitapi
Works with
api
mcp
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Reply To Pr Thread?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/motleyai-reply-to-pr-thread)
---
name: reply-to-pr-thread
description: Use when the user asks to reply / comment on a PR review thread, review body or conversation comment (CodeRabbit or anyone), OR when posting a reasoning/explanation reply tagging @coderabbitai for a thread you've classified as invalid. Body is read from stdin.
---
**Preflight:** run `la-doctor --plugin <this skill's base directory>` once per session before using any `la-*` or `trmv-*` command; if it fails, stop and show the user its output. If `la-doctor` is not found, or reports the la tools older than the plugin, stop and give the user the install command at this plugin's `version` (in its `.claude-plugin/plugin.json`): `uv tool install living-architecture==<version> --with-executables-from type-rename-move` in a Python repo, `npm install -g living-architecture@<version> type-rename-move@<version>` in a TS/JS repo.
# Reply to a GitHub PR review thread
**Stealth mode** (`la-config get stealth` prints `true`): replies and NOSONAR reasons never mention la, trmv, OpenSpec,
specs, stage names or any `la-*`/`trmv-*` command. Post only through `la-reply-to-pr-thread` or
`la-reply-invalid-coderabbit`, which refuse a leaking body; on a refusal, reword and post again. Never post through
raw `gh` or an MCP tool. A conventions waiver goes in the waiver ledger the RED verdict names, never in an inline
comment.
Wraps the GitHub `POST /repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies` endpoint. Works for any review thread on any PR, but the canonical use case is replying to CodeRabbit threads — never resolve them, always reply with rationale.
## How to run
```bash
# Form 1 — paste the discussion URL straight from the CodeRabbit comment:
echo "@coderabbitai <reason>" | \
la-reply-to-pr-thread https://github.com/OWNER/REPO/pull/<PR>#discussion_r<COMMENT_ID>
# Form 2 — explicit IDs:
la-reply-to-pr-thread --comment-id <COMMENT_ID> --pr <PR> [--repo OWNER/REPO] <<'EOF'
@coderabbitai
multi-line
reasoning here
EOF
```
- Body is **always read from stdin**. No `--body` / `--body-file`. Pipe text in or use a heredoc.
- On success, the command prints the new reply's `html_url`. Report that URL back to the user.
- A review-body URL (`#pullrequestreview-<ID>`) or conversation-comment URL (`#issuecomment-<ID>`) cannot be threaded: the command posts a PR conversation comment whose first line is `Re: <url>`, then the body. `la-fetch-review-comments` reads that line to mark the comment answered.
## Steps
1. Identify the comment URL or comment ID. From the `la-fetch-review-comments` output, that's the URL printed under the comment. The integer after `discussion_r` is the comment ID.
2. Compose the reply body. For a CodeRabbit-invalid case: lead with `@coderabbitai`, then 1–3 sentences explaining why the comment doesn't apply (cite the relevant `CLAUDE.md` rule, the existing test, or the commit hash where it was already addressed).
3. Pipe the body into the command. Capture the printed URL.
4. **Never** call any "resolve" mutation (`resolveReviewThread` GraphQL or its UI equivalent). This command (or `la-reply-invalid-coderabbit`, which adds the `@coderabbitai` mention) is the only allowed channel for closing the loop on a CodeRabbit thread you've classified as invalid.
## Why use this instead of `gh api` directly
- Parses discussion URLs so you don't have to hand-extract owner/repo/PR/comment-id.
- Uses `jq` to build the JSON payload, so multi-line bodies with quotes / backticks / Markdown round-trip safely.
- Single output line (the reply URL) makes it easy to chain.
If the command is missing a flag you need, extend it rather than reaching for `gh` directly.