Claude Skill

reply-to-pr-thread

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.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download motleyai-living-architecture-plugin_la_skills_reply-to-pr-thread-c1ecf0a.zip · 1 KB

Install

skills CLI npx skills add https://github.com/MotleyAI/living-architecture/tree/main/plugin/la/skills/reply-to-pr-thread
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install motleyai-living-architecture@llmmart
Git git clone https://github.com/MotleyAI/living-architecture.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole motleyai/living-architecture collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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

# 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.

Files (living-architecture)
  • SKILL.md 3.6 KB
    ---
    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.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.