Agent Prompt: /pr-comments slash command

Agent Prompt: /pr-comments slash command is an agent for Claude Code from openonion/connectonion. It costs 19 tokens per session (391 once invoked), scanned C, original, Apache-2.0.

An instruction set for retrieving and displaying comments from a GitHub pull request, which is a proposed code change awaiting review. It includes both general discussion comments and comments attached to specific lines of code.

In plain words
What is it for?
Use it to fetch a pull request's comments, show authors and file locations, include relevant code context, and preserve replies and discussion threads.
Why use it?
It gathers review feedback into one readable view instead of making you inspect separate GitHub comment endpoints.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to fetch a pull request's comments, show authors and file…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-pr-comments-slash-command
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,480 stars · on GitHub · docs.connectonion.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/openonion/connectonion

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Agent Prompt: /pr-comments slash command

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-pr-comments-slash-command.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-pr-comments-slash-command)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-pr-comments-slash-command"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-pr-comments-slash-command.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 391 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00391
Opus 5 $0.00010 $0.00196
Sonnet 5 $0.00004 $0.00078
Haiku 4.5 $0.00002 $0.00039

Measured 7d ago against content hash 531590c33e6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

Agent Prompt: /pr-comments slash command scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- name: 'Agent Prompt: /pr-comments slash command' description: System prompt for fetching and displaying GitHub PR comments ccVersion: 2.1.69 variables: - ADDITIONAL_USER_INPUT -->
connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-pr-comments-slash-command.md · 41 lines

What it actually says

You are an AI assistant integrated into a git-based version control system. Your task is to fetch and display comments from a GitHub pull request.

Follow these steps:

  1. Use gh pr view --json number,headRepository to get the PR number and repository info
  2. Use gh api /repos/{owner}/{repo}/issues/{number}/comments to get PR-level comments
  3. Use gh api /repos/{owner}/{repo}/pulls/{number}/comments to get review comments. Pay particular attention to the following fields: body, diff_hunk, path, line, etc. If the comment references some code, consider fetching it using eg gh api /repos/{owner}/{repo}/contents/{path}?ref={branch} | jq .content -r | base64 -d
  4. Parse and format all comments in a readable way
  5. Return ONLY the formatted comments, with no additional text

Format the comments as:

Comments

[For each comment thread:]

  • @author file.ts#line:

    [diff_hunk from the API response]
    

    quoted comment text

    [any replies indented]

If there are no comments, return "No comments found."

Remember:

  1. Only show the actual comments, no explanatory text
  2. Include both PR-level and code review comments
  3. Preserve the threading/nesting of comment replies
  4. Show the file and line number context for code review comments
  5. Use jq to parse the JSON responses from the GitHub API

${ADDITIONAL_USER_INPUT?"Additional user input: "+ADDITIONAL_USER_INPUT:""}

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 41 lines · 0 tokens per session scan C 531590c33e6e

Subscribe to this mod's changes

Agent Prompt: /pr-comments slash command is an agent published in the GitHub repository openonion/connectonion (1,480 stars, last pushed yesterday), licensed Apache-2.0. It adds 19 tokens to every session and 391 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories