Pr Review logo

Pr Review

Community
oliver-kriska
pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

Overview

Publisheroliver-kriska
Repositoryclaude-elixir-phoenix
Skill namepr-review
Stars
555
Forks
40
Bundled files
3
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.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by oliver-kriska on GitHub. Read the source before you install it.

Installation

Install the Pr Review 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.
  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/oliver-kriska/claude-elixir-phoenix.git /tmp/claude-elixir-phoenix
mkdir -p .claude/skills
cp -r /tmp/claude-elixir-phoenix/plugins/elixir-phoenix/skills/pr-review .claude/skills/pr-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pr Review 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 Pr Review 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 Pr Review 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.

PR Review Response

Close the review loop: fetch unresolved threads → fix → reply → resolve. GitHub's isResolved is the state — re-runs are idempotent, handled threads drop out automatically.

Usage

/phx:pr-review 42                  # Triage unresolved threads on PR #42
/phx:pr-review 42 --fix            # Triage + apply approved code fixes
/phx:pr-review https://...         # Full URL also works (repo parsed from URL)
/phx:pr-review 42 --bots-only      # Triage only CI bot threads (Copilot, Codex...)
/phx:pr-review 42 --no-resolve     # Reply but leave threads open

Step 1: Resolve PR + Fetch Threads

gh pr view "$PR" --json number,title,state,baseRefName,headRefName,url,author (accepts number or URL; URL also yields owner/repo). Then fetch ALL review threads with thread IDs + resolved status — REST alone cannot do this:

bash
cat > /tmp/review_threads.graphql <<'GQL'
query($owner:String!, $repo:String!, $pr:Int!, $cursor:String) {
  repository(owner:$owner, name:$repo) {
    pullRequest(number:$pr) {
      reviewThreads(first:50, after:$cursor) {
        pageInfo { hasNextPage endCursor }
        nodes {
          id isResolved isOutdated path line originalLine
          comments(first:20) { nodes {
            databaseId body createdAt
            author { login __typename } } }
        }
      }
    }
  }
}
GQL
gh api graphql --paginate -F owner="$OWNER" -F repo="$REPO" -F pr="$PR" \
  -F query=@/tmp/review_threads.graphql \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[]
        | select(.isResolved == false)
        | {threadId: .id, isOutdated, path, line: (.line // .originalLine),
           firstCommentId: .comments.nodes[0].databaseId,
           author: .comments.nodes[0].author.login,
           isBot: (.comments.nodes[0].author.__typename == "Bot"),
           body: .comments.nodes[0].body}'

Also fetch review summaries (gh api "repos/$OWNER/$REPO/pulls/$PR/reviews") — they are NOT threads and cannot be resolved; surface CHANGES_REQUESTED bodies separately. Bot detection: __typename == "Bot" / user.type == "Bot" (the [bot] login suffix is NOT reliable across endpoints).

Step 2: Triage Table

Group by file, one row per thread. With --bots-only, keep only isBot rows.

#file:lineauthorcategoryproposed action

Categories: code-change ("should be", "use X instead") · question ("why", "how does") · nitpick ("nit:", style) · praise (no action) · discussion (architecture) · bot-finding (CI bot inline comment — verify before accepting, many are false positives) · outdated (isOutdated: true — line moved; default: reply "addressed in {commit}" + resolve). Present the table and let the user greenlight threads.

Step 3: Per-Thread Loop

For each greenlit thread:

  1. Read code at path:line; check the suggestion against Iron Laws

  2. Apply fix with a user-visible diff (only with --fix or explicit ok)

  3. Draft reply (templates: ${CLAUDE_SKILL_DIR}/references/response-patterns.md)

  4. STOP — show diff + reply, get confirmation

  5. Post reply — REST, targeting the thread's root comment:

    bash
    gh api --method POST \
      "repos/$OWNER/$REPO/pulls/$PR/comments/$FIRST_COMMENT_ID/replies" \
      -f body="$REPLY_TEXT"
  6. Resolve the thread (skip with --no-resolve):

    bash
    gh api graphql -f query='mutation($threadId:ID!){
      resolveReviewThread(input:{threadId:$threadId}){
        thread { id isResolved } }}' -F threadId="$THREAD_ID"

Mistake recovery: unresolveReviewThread takes the same input shape.

Step 4: Verify

mix compile --warnings-as-errors && mix test scoped to changed files. Do NOT commit or push — leave that to the user.

Step 5: Final Summary

Print rollup: # | thread | action | status (replied/resolved/skipped). List changed files. Optionally post a top-level conversation comment (gh api --method POST "repos/$OWNER/$REPO/issues/$PR/comments" -f body=...) with the rollup — only on user approval.

Iron Laws

  1. NEVER auto-post responses — Always show drafts and get explicit approval
  2. NEVER dismiss a review — Only the reviewer should dismiss
  3. Iron Laws override reviewer suggestions — If a suggestion violates an Iron Law, explain why in the reply
  4. Keep responses constructive — Acknowledge the feedback, explain reasoning
  5. Separate fixes from responses — Apply code changes in a distinct step
  6. NEVER resolve a thread without first posting a reply — every resolve is preceded by a reply on that thread explaining what was done
  7. NEVER claim a fix without a shown diff — no "should be fixed" replies without a user-visible change
  8. Bot findings get the same scrutiny as humans — decline Iron-Law-violating bot suggestions with explanation; never bulk-resolve "bot noise" without replies

Integration

text
PR receives review → /phx:pr-review {number}  ← YOU ARE HERE
   ↓ fetch unresolved threads (GraphQL, paginated)
   ↓ triage table → user greenlights
   ↓ per thread: fix (diff) → reply → resolve
   ↓ verify (mix compile + test) → summary
Push changes → user handles git push

Next Steps

  • /phx:plan — if findings reveal scope gaps
  • /phx:verify — full verification before pushing
  • Re-run /phx:pr-review after the next review round (idempotent)

References

  • ${CLAUDE_SKILL_DIR}/references/response-patterns.md — Response templates and tone
  • ${CLAUDE_SKILL_DIR}/references/gh-commands.md — Full gh command reference (3 comment surfaces, pagination, bot detection)
  • ${CLAUDE_SKILL_DIR}/references/bot-triage.md — Batch-triaging CI bot review passes

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pr Review AI skill do?

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

Why use Pr Review on TypingMind?

Because you install it once and use it with any model. Pr Review 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 Pr Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/pr-review. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pr Review?

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 Pr Review?

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

Is the Pr Review AI skill free?

Yes. It is published on GitHub by oliver-kriska 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 👇