Pr Commentsのロゴ

Pr Comments

コミュニティ
domengabrovsek
pr-comments

Watches an open PR for reviewer comments and addresses them: fixes the code, replies inline to bots, and drafts replies to humans for the user to post. Use after opening a PR, when the user says 'address the comments' or 'check the PR comments', or when a reviewer comments.

概要

公開者domengabrovsek
リポジトリagent-config
スキル名pr-comments
スター
22
フォーク
4
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    domengabrovsekがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Pr Comments」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/domengabrovsek/agent-config/tree/main/skills/pr-comments
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/domengabrovsek/agent-config.git /tmp/agent-config
mkdir -p .claude/skills
cp -r /tmp/agent-config/skills/pr-comments .claude/skills/pr-comments
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPr Commentsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にPr Commentsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Pr Commentsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Address PR Review Comments

Watch and address comments on: $ARGUMENTS (default: the current branch's PR)

Workflow

why-no-hook: skill workflow guidance; each step requires understanding the surrounding context (repo, task shape, prior state).

  1. Start a Monitor with bash scripts/gh-comments-monitor.sh [pr-number], resolved inside this skill's own directory. Use timeout_ms: 1800000 and the description "PR comments on " (review-time: see section note)
  2. React to each line: (review-time: see section note)
    • comment|<kind>|<id>|<author>|<bot|human>|<url>: handle the comment as below
    • Monitor expiry: re-arm the same script. Seen IDs persist, so nothing repeats (review-time: see section note)
    • pr-closed|<state> or no-pr|<branch>: report and stop (review-time: see section note)
    • error|persistent-failure: report and stop (review-time: see section note)
  3. Read the comment and its thread: gh api repos/{owner}/{repo}/pulls/comments/<id> for inline, .../pulls/<n>/reviews/<id> for a review, .../issues/comments/<id> for conversation (review-time: see section note)
  4. Judge it against the code: valid, partly valid, or not applicable. Check the claim in the source before agreeing or disagreeing (review-time: see section note)
  5. Fix valid points, bot or human: make the change, run npm run verify:fast once per batch when package.json declares it, otherwise /verify-done. Commit, push. Batch comments that arrive together into one commit when they touch the same code (review-time: see section note)
  6. Reply by author type: (review-time: see section note)
    • Bot: post the reply yourself. Inline comments get a thread reply: gh api repos/{owner}/{repo}/pulls/<n>/comments/<id>/replies -f body=.... A review body or conversation comment gets a conversation comment that quotes the line it answers (review-time: see section note)
    • Human: never post. Add the draft to .claude/state/runs/<branch-slug>/reply-drafts.md with the comment URL, and show the user the URL and the draft. hooks/pre-pr-reply-gate.sh blocks inline replies to humans (hook)
  7. Update the PR body with gh pr edit when a fix changes what the PR does (review-time: see section note)

Reply voice

Write as the engineer who owns the PR.

  • One to three sentences. Name the change and its commit, or the reason for leaving the code as it is (review-time: see section note)
  • No thanks-openers, no "Great catch", no "You're right", no apologies, no emoji (review-time: see section note)
  • End every reply you post with a blank line, then <sub>Posted by <agent> on behalf of @<login></sub> on its own line. Name your host (Claude Code, Codex, pi), and take the login from gh api user --jq .login. Mention the agent nowhere else, and leave the footer off drafts the user posts. hooks/pre-pr-reply-gate.sh blocks a posted comment without it (hook)
  • Disagree with evidence: the file and line, or the test that covers the case (review-time: see section note)
  • Run write-plain on each reply before posting or drafting (review-time: see section note)

Examples:

  • A fix, with the footer on its own line:

    markdown
    Fixed in a1b2c3d. The retry now stops after the third attempt.
    
    <sub>Posted by Claude Code on behalf of @octocat</sub>
  • "Leaving this as is. parseDate already rejects empty input, see src/date.ts:42 and the test in date.test.ts."

Rules

  • Never resolve a human reviewer's thread. The reviewer resolves it (review-time: see section note)
  • Never dismiss a review or re-request review without the user asking (review-time: see section note)
  • A comment asking for a change outside the PR's scope gets a reply naming the follow-up, not a fix (review-time: see section note)
  • The same bot comment failing the same fix twice escalates to the user (review-time: see section note)

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Pr Comments」では何ができますか?

Watches an open PR for reviewer comments and addresses them: fixes the code, replies inline to bots, and drafts replies to humans for the user to post. Use after opening a PR, when the user says 'address the comments' or 'check the PR comments', or when a reviewer comments.

TypingMindでPr Commentsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Pr Commentsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPr Commentsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/domengabrovsek/agent-config/tree/main/skills/pr-commentsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Pr Commentsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Pr Commentsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPr Commentsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Pr Comments」は無料ですか?

domengabrovsekがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇