Reply To Pr Threads logo

Reply To Pr Threads

Community
tobihagemann
reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, posts via GraphQL, resolves threads whose entry carries a resolution reason, and dismisses the code-scanning alert behind a thread whose entry carries an alert number. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

Overview

Publishertobihagemann
Repositoryturbo
Skill namereply-to-pr-threads
Stars
417
Forks
32
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by tobihagemann on GitHub. Read the source before you install it.

Installation

Install the Reply To Pr Threads AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/tobihagemann/turbo/tree/main/claude/skills/reply-to-pr-threads
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tobihagemann/turbo.git /tmp/turbo
mkdir -p .claude/skills
cp -r /tmp/turbo/claude/skills/reply-to-pr-threads .claude/skills/reply-to-pr-threads
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Reply To Pr Threads in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Reply To Pr Threads on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Reply To Pr Threads is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Reply to PR Threads

Draft replies for a processed review-thread list, confirm with the user, post the surviving drafts, dismiss the code-scanning alerts their entries name, and resolve threads whose entry carries a resolution reason.

Step 1: Re-fetch Thread State

Auto-detect owner, repo, and PR number from the current branch if not provided, then query the current resolution state:

bash
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
  repository(owner: $owner, name: $repo) {
    pullRequest(number: $pr) {
      reviewThreads(first: 100) {
        nodes { id isResolved }
      }
    }
  }
}' -f owner='{owner}' -f repo='{repo}' -F pr={pr_number}

Drop threads whose isResolved is now true. Reviewers or bots such as CodeRabbit may resolve threads after the original fetch, and drafting replies for them is wasted work.

Step 2: Run /github-voice Skill

Run the /github-voice skill to load voice rules and the insider-vs-outsider detection.

Step 3: Draft Replies

Use the processed-thread list from conversation context. Each entry has: thread id, file path, line, category (fix, skip, answer, clarify, or resolve-only), and per-category payload. An entry may also carry a resolution reason: ADDRESSED, WONT_FIX, or INVALID. A skip entry that carries a resolution reason may also carry a code-scanning alert number and a dismissal reason: false positive, won't fix, or used in tests. Its reply doubles as the alert's dismissal comment, so keep it within 280 characters.

Keep every reply to one or two sentences. No bullet-point reasoning. No bolded labels.

fix: payload is a commit SHA, optionally with a divergence note.

Fixed in <commit-sha>.

Only add a brief sentence after the SHA when the fix meaningfully diverges from what the reviewer suggested. Otherwise the SHA alone is enough.

skip: payload is the skip reasoning. State the reasoning directly. Do not apologize.

answer: payload is the raw answer text. Tighten to one or two sentences and apply /github-voice rules. Do not cite transcripts or mention Claude. The reply reads as the implementer's own explanation.

clarify: payload is a user-directed question. Draft it as directed.

resolve-only: payload is the commit SHA that already addressed the thread. Draft no reply.

Step 4: Present Drafts and Confirm

Output all drafts as text, grouped by file:

### <file-path>

**Thread <id>** (<category>, line <line>)
Reviewer: <original comment, truncated if long>
Reply: <drafted reply>
Dismiss: alert <alert-number>, <dismissal reason>
Resolve: <resolution reason>

Show the Reply line only for entries with a drafted reply, the Dismiss line only for entries that carry an alert number, and the Resolve line only for entries that carry a resolution reason.

Then use AskUserQuestion to ask whether to post. Offer:

  • Post — post all drafts as shown, dismiss the alerts that show a Dismiss line, and resolve the threads that show a Resolve line
  • Cancel — skip posting

Step 5: Post Replies

For each approved draft, write the drafted reply to .turbo/pr/thread-<thread-id>.md with the Write tool, then post via the reply mutation:

bash
gh api graphql -f query='
mutation($threadId: ID!, $body: String!) {
  addPullRequestReviewThreadReply(input: {pullRequestReviewThreadId: $threadId, body: $body}) {
    comment { id }
  }
}' -f threadId='<thread-id>' -F body=@.turbo/pr/thread-<thread-id>.md

Substitute <thread-id> with the thread's id for each post.

After posting the reply of an entry that carries an alert number, dismiss its alert with the reply as the dismissal comment:

bash
gh api -X PATCH repos/{owner}/{repo}/code-scanning/alerts/<alert-number> -f state=dismissed -f dismissed_reason="<dismissal reason>" -F dismissed_comment=@.turbo/pr/thread-<thread-id>.md

Count the alert as dismissed only when the response's state is dismissed. Leave the thread of an alert that was not dismissed unresolved.

After posting the reply of an entry that carries a resolution reason, and for each resolve-only entry, resolve its thread:

bash
gh api graphql -f query='
mutation($threadId: ID!, $reason: PullRequestReviewThreadResolutionReason) {
  resolveReviewThread(input: {threadId: $threadId, resolutionReason: $reason}) {
    thread { isResolved }
  }
}' -f threadId='<thread-id>' -f reason='<reason>'

Count a thread as resolved only when the response shows isResolved: true.

Report the outcome as a table, one row per thread, keeping every cell to a single line:

ThreadCategoryOutcome

Where Outcome is one of:

  • Posted — the reply was posted
  • Posted and resolved — the reply was posted and the thread resolved; name the reason
  • Posted, not resolved — the reply was posted but the resolve failed; name the error
  • Posted, dismissed, and resolved — the reply was posted, the alert dismissed, and the thread resolved; name the dismissal reason
  • Posted and dismissed, not resolved — the reply was posted and the alert dismissed, but the resolve failed; name the dismissal reason and the error
  • Posted, not dismissed — the reply was posted but the dismissal failed, so the thread stays unresolved; name the error
  • Resolved — a resolve-only thread was resolved; name the reason
  • Not resolved — a resolve-only thread's resolve failed; name the error
  • Skipped — name the reason, such as auto-resolution between the re-fetch and the post

Keep the report to the table. When the table would be empty, report one line stating that no replies were posted or threads resolved, and why, instead.

Then use the TaskList tool and proceed to any remaining task.

Rules

  • Resolve only the threads whose entry carries a resolution reason, dismiss only the alerts whose entry carries an alert number, and dismiss no review. Leave every other thread for its reviewer to resolve.
  • If a post mutation fails because the thread is already resolved, log the skip and continue with the rest.

Frequently asked questions

What does the Reply To Pr Threads AI skill do?

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, posts via GraphQL, resolves threads whose entry carries a resolution reason, and dismisses the code-scanning alert behind a thread whose entry carries an alert number. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

Why use Reply To Pr Threads on TypingMind?

Because you install it once and use it with any model. Reply To Pr Threads is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Reply To Pr Threads in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tobihagemann/turbo/tree/main/claude/skills/reply-to-pr-threads. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Reply To Pr Threads?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Reply To Pr Threads?

As many as you like. As long as a model supports skills, you can use Reply To Pr Threads with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Reply To Pr Threads AI skill free?

Yes. It is published on GitHub by tobihagemann under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇