jpskill.com
🛠️ 開発・MCP コミュニティ

agent-review

CLIツールでユーザーにコードレビューを依頼し、コード変更に関するフィードバックを自動的に収集するSkill。

📜 元の英語説明(参考)

Request interactive code review from users using the agent-review CLI tool. Automatically captures user feedback on code changes.

🇯🇵 日本人クリエイター向け解説

一言でいうと

CLIツールでユーザーにコードレビューを依頼し、コード変更に関するフィードバックを自動的に収集するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o agent-review.zip https://jpskill.com/download/6781.zip && unzip -o agent-review.zip && rm agent-review.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6781.zip -OutFile "$d\agent-review.zip"; Expand-Archive "$d\agent-review.zip" -DestinationPath $d -Force; ri "$d\agent-review.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して agent-review.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → agent-review フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

コードレビュー スキル

コード変更に対して人間のフィードバックが必要な場合は、このスキルを使用してください。

このスキルを使用するタイミング

  • 機能や修正を実装した後
  • 重要な変更をコミットする前
  • アプローチについてユーザーのフィードバックが欲しい場合
  • ユーザーが明示的にコードのレビューを求めてきた場合

インストール

agent-review がインストールされていない場合:

npm install -g agent-review
# または直接実行: npx agent-review

使用方法

ステップ 1: コードレビューツールを実行する

重要: agent-review は常にインラインで(バックグラウンドではなく)長いタイムアウトで実行してください。

Bash({
  command: "npx agent-review", 
  description: "コードレビューセッションを開始します",
  timeout: 600000,  // 10分 - ユーザーがレビューする時間が必要です
})

実行してはいけないこと:

  • run_in_background: true を使用する
  • ❌ デフォルトのタイムアウトを使用する(2分では短すぎます)
  • ❌ BashOutput で bash の出力をポーリングする

理由:

  • ツールはユーザーがレビューを送信するまでブロックします
  • インラインで実行すると、完了時に自動的に出力が得られます
  • ユーザーはコードをレビューし、コメントを追加する時間が必要です
  • フィードバックは完了時に標準出力に表示されます

ステップ 2: レビューフィードバックを自動的に読み取る

ツールが完了したら、構造化された JSON フィードバックを読み取ります。

Read({
  file_path: "/path/to/project/.agent-review/latest-review.json"
})

これにより、以下の構造化データが得られます。

  • 行ごとのコメント(ファイル、行番号、コメントテキスト)
  • 一般的なフィードバック
  • レビュー統計

ステップ 3: フィードバックに基づいて行動する

レビューフィードバックを処理します。

  1. 行コメントを読む - 各具体的な提案に対処します
  2. 一般的なフィードバックを読む - 全体的な推奨事項を検討します
  3. 変更を加える - 要求された修正を実装します
  4. 説明する - ユーザーに何を変更したか、その理由を伝えます

ワークフロー例

// 1. コードレビューを実行する(インライン、長いタイムアウト)
const result = await Bash({
  command: "npx agent-review",
  description: "ユーザーにコードレビューを要求します",
  timeout: 600000,  // 10分
});

// 2. 構造化されたフィードバックを読み取る
const reviewData = await Read({
  file_path: ".agent-review/latest-review.json"
});

// 3. 解析して処理する
const review = JSON.parse(reviewData);

// 4. フィードバックに対処する
for (const comment of review.feedback.lineComments) {
  console.log(`${comment.file}:${comment.line} - ${comment.comment}`);
  // コメントに基づいて変更を加える
}

// 5. ユーザーに報告する
"フィードバックに対処しました:
- src/app.ts:42 の問題を修正しました(let の代わりに const を使用)
- 提案されたエラー処理を更新しました
..."

レビューデータ構造

.agent-review/latest-review.json ファイルには以下が含まれます。

{
  "id": "review-1234567890",
  "timestamp": "2026-02-03T17:23:33.377Z",
  "diff": { /* 完全な git diff データ */ },
  "feedback": {
    "timestamp": "2026-02-03T17:23:33.377Z",
    "lineComments": [
      {
        "file": "src/app.ts",
        "line": 42,
        "oldLine": 41,
        "comment": "let の代わりに const を使用することを検討してください",
        "context": "let x = calculateTotal();"
      }
    ],
    "generalFeedback": "全体的に良好です!",
    "stats": {
      "filesReviewed": 5,
      "commentsAdded": 3
    }
  }
}

ベストプラクティス

  1. 常にインラインで実行する - バックグラウンドモードは絶対に使用しないでください
  2. 長いタイムアウトを使用する - 最低 600000ms (10分)
  3. フィードバックを自動的に読み取る - ユーザーにフィードバックを尋ねないでください
  4. すべてのコメントに対処する - 各行コメントを確認してください
  5. 変更点を要約する - ユーザーに何を修正したかを伝えてください

避けるべき一般的な間違い

バックグラウンドで実行する:

// 間違い - 出力を自動的に取得できません
Bash({
  command: "npx agent-review",
  run_in_background: true
})

短いタイムアウト:

// 間違い - ユーザーが完了する前にタイムアウトします
Bash({
  command: "npx agent-review",
  timeout: 120000  // 2分では短すぎます
})

ユーザーにフィードバックを尋ねる:

// 間違い - フィードバックはすでに JSON ファイルにあります!
"どのようなフィードバックがありますか?"

正しい使用方法:

// 正しい - インライン、長いタイムアウト、自動読み取り
await Bash({
  command: "npx agent-review",
  timeout: 600000
});

const review = await Read({
  file_path: ".agent-review/latest-review.json"
});

ヒント

  • レビュー前: ユーザーに変更点を伝えます。「5つのファイルにX機能を実装しました。レビューの準備はできていますか?」
  • レビュー中: ツールは自動的にブラウザを開き、ユーザーを待ちます
  • レビュー後: フィードバックをすぐに処理し、ユーザーにあなたの変更点を示します
  • コミットオプション: ユーザーはレビュー中にコミットを選択できます - bash の出力を確認してください

覚えておいてください: 常にインラインで長いタイムアウトで実行し、その後 JSON フィードバックを自動的に読み取ってください!

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Code Review Skill

Use this skill when you need to get human feedback on code changes you've made.

When to Use This Skill

  • After implementing features or fixes
  • Before committing significant changes
  • When you want user feedback on your approach
  • When the user explicitly asks you to review your code

Installation

If agent-review isn't installed:

npm install -g agent-review
# or run directly: npx agent-review

How to Use

Step 1: Run the Code Review Tool

CRITICAL: Always run agent-review inline (not in background) with a long timeout:

Bash({
  command: "npx agent-review", 
  description: "Start code review session",
  timeout: 600000,  // 10 minutes - user needs time to review
})

DO NOT:

  • ❌ Use run_in_background: true
  • ❌ Use default timeout (2 minutes is too short)
  • ❌ Poll bash output with BashOutput

WHY:

  • The tool blocks until user submits review
  • Running inline means you automatically get output when done
  • User needs time to review code and add comments
  • Feedback is printed to stdout when complete

Step 2: Automatically Read the Review Feedback

After the tool completes, read the structured JSON feedback:

Read({
  file_path: "/path/to/project/.agent-review/latest-review.json"
})

This gives you structured data with:

  • Line-by-line comments (file, line number, comment text)
  • General feedback
  • Review statistics

Step 3: Act on the Feedback

Process the review feedback:

  1. Read line comments - Address each specific suggestion
  2. Read general feedback - Consider overall recommendations
  3. Make changes - Implement requested fixes
  4. Explain - Tell the user what you changed and why

Example Workflow

// 1. Run code review (inline, long timeout)
const result = await Bash({
  command: "npx agent-review",
  description: "Request code review from user",
  timeout: 600000,  // 10 min
});

// 2. Read structured feedback
const reviewData = await Read({
  file_path: ".agent-review/latest-review.json"
});

// 3. Parse and process
const review = JSON.parse(reviewData);

// 4. Address feedback
for (const comment of review.feedback.lineComments) {
  console.log(`${comment.file}:${comment.line} - ${comment.comment}`);
  // Make changes based on comment
}

// 5. Report back to user
"I've addressed your feedback:
- Fixed the issue in src/app.ts:42 (using const instead of let)
- Updated error handling as suggested
..."

Review Data Structure

The .agent-review/latest-review.json file contains:

{
  "id": "review-1234567890",
  "timestamp": "2026-02-03T17:23:33.377Z",
  "diff": { /* full git diff data */ },
  "feedback": {
    "timestamp": "2026-02-03T17:23:33.377Z",
    "lineComments": [
      {
        "file": "src/app.ts",
        "line": 42,
        "oldLine": 41,
        "comment": "Consider using const instead of let",
        "context": "let x = calculateTotal();"
      }
    ],
    "generalFeedback": "Overall looks good!",
    "stats": {
      "filesReviewed": 5,
      "commentsAdded": 3
    }
  }
}

Best Practices

  1. Always run inline - Never use background mode
  2. Use long timeout - 600000ms (10 min) minimum
  3. Auto-read feedback - Don't ask user to tell you the feedback
  4. Address all comments - Go through each line comment
  5. Summarize changes - Tell user what you fixed

Common Mistakes to Avoid

Running in background:

// WRONG - you won't get the output automatically
Bash({
  command: "npx agent-review",
  run_in_background: true
})

Short timeout:

// WRONG - will timeout before user finishes
Bash({
  command: "npx agent-review",
  timeout: 120000  // 2 min too short
})

Asking user for feedback:

// WRONG - feedback is already in the JSON file!
"What feedback do you have?"

Correct usage:

// RIGHT - inline, long timeout, auto-read
await Bash({
  command: "npx agent-review",
  timeout: 600000
});

const review = await Read({
  file_path: ".agent-review/latest-review.json"
});

Tips

  • Before review: Tell user what changed: "I've implemented X feature across 5 files. Ready for review?"
  • During review: The tool auto-opens browser and waits for user
  • After review: Process feedback immediately and show user your changes
  • Commit option: User can choose to commit during review - check the bash output

Remember: Always run inline with long timeout, then auto-read the JSON feedback!