複数のAI(自分/Codex/Grok/Cursor等)でPRをレビューするスキル。GitHub PRの差分を取得し、各AIの視点を統合したレビューを提供する。GitHubへの投稿はユーザーの明示OK後に行う。「PRレビューして」「コードレビューして」「PR#123をチェック」で使用。
npx skills add https://github.com/karaage0703/ai-assistant-workspace --skill xs-code-reviewer
GitHub CLIを使用してプルリクエストを分析し、バグ・リスク・回帰・不足テストを優先してレビューする。
重要: デフォルトはチャット上でのレビュー報告。GitHubへのコメント投稿、review投稿、approve/request changes は外部状態変更なので、ユーザーの明示OKを取ってから行う。
PR#123をレビューして
owner/repo の PR#123 をレビューして
このPRを複数AIで見て
通常レビュー:
xs-multi-agent で外部AIにも見せたGitHub投稿まで依頼された場合:
# PRテンプレートがあれば確認
test -f .github/pull_request_template.md && cat .github/pull_request_template.md
# PR詳細
gh pr view <PR番号> --repo <owner>/<repo> --json title,body,headRefOid,baseRefName,headRefName,files,additions,deletions,url
# 差分
gh pr diff <PR番号> --repo <owner>/<repo>
# 変更ファイル一覧
gh pr diff <PR番号> --repo <owner>/<repo> --name-only
--repo <owner>/<repo> を明示する。remote が複数ある環境では、gh が別リポジトリを選ぶ事故が起きやすい。
各変更ファイルについて必要に応じて確認する。
gh pr diff <PR番号> --repo <owner>/<repo> -- <ファイルパス>
ローカルにブランチを取得する場合は、既存未コミット変更を確認してから行う。
優先順位:
コードレビューでは、良い点より先に findings を出す。問題がない場合は「ブロッカーなし」と明示し、残るリスクや未検証項目を書く。
複数AIで見る依頼、重要PR、大きめの差分では xs-multi-agent を併用する。
CONFIG_PATH="$(bash skills/xs-multi-agent/scripts/check_agents.sh)"
cat "$CONFIG_PATH"
依頼プロンプトはファイルに保存してから、利用可能な外部エージェントへ渡す。
cat > /tmp/pr-review-prompt.txt <<'EOF'
以下のPR差分をレビューしてください。
バグ、セキュリティ、回帰、不足テストを優先し、好みの指摘は後回しにしてください。
<PR情報と差分>
EOF
bash skills/xs-multi-agent/scripts/run_agent.sh codex /tmp/pr-review-prompt.txt "$PWD"
外部AIが使えない場合は、自分だけでレビューしてよい。その場合は「外部AIは検出したが使用できなかった」と報告する。
複数AIの意見はそのまま並べず、重複をまとめて重要度順に統合する。
重要度:
blocker: セキュリティ、データ損失、明確なバグ、重大な回帰major: 修正した方がよい設計・仕様・テスト不足minor: 軽微な改善nit: 好みや表記揺れ。必要な時だけ誤検出の可能性がある指摘は、必ず差分やファイルを再確認してから出す。
レビュー結果
- blocker: 0件
- major: 1件
- minor: 2件
Findings
1. major: <タイトル>
- file: <path>:<line>
- 内容:
- 理由:
- 修正案:
2. minor: <タイトル>
- file:
- 内容:
確認したこと
- `gh pr view ...`
- `gh pr diff ...`
- Codex: 使用 / 未使用(理由)
残るリスク
- ...
問題が見つからない場合:
ブロッカーなし。
確認したこと
- ...
残るリスク
- <未実行テストや見ていない範囲>
GitHub投稿は外部状態変更。以下を明示してOKを取る。
これから public/private repo <owner>/<repo> の PR #<番号> に以下を投稿します。
- review comment: <件数>
- summary review: 1件
OK?
OK後に投稿する。
gh pr review <PR番号> --repo <owner>/<repo> --comment --body-file /tmp/review-summary.md
GitHubのインラインコメントは diff position や line/side 指定が必要。失敗しやすいので、投稿前に対象行と diff を確認する。
COMMIT_ID=$(gh pr view <PR番号> --repo <owner>/<repo> --json headRefOid --jq .headRefOid)
gh api repos/<owner>/<repo>/pulls/<PR番号>/comments \
-F body="<コメント本文>" \
-F commit_id="$COMMIT_ID" \
-F path="<ファイルパス>" \
-F line=<行番号> \
-F side=RIGHT
投稿できない場合は、サマリーコメントにファイルパス・行番号付きでまとめる。
gh pr view でPR情報を取得したgh pr diff で差分を確認したxs-multi-agent を使ったUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Take karaage0703/xs-code-reviewer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.