# 2軸コードレビュー (code-review)

> 指定した基準点以降の変更を、リポジトリのコーディング規約と元の仕様の2軸でレビューします。

- カテゴリ: [コードレビュー](https://www.myskills.tools/ja/categories/code-review/)
- 提供元: コミュニティ · Matt Pocock
- リポジトリ: https://github.com/mattpocock/skills/tree/main/skills/engineering/code-review (commit 7739eae)
- SKILL.md: https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.md
- インストールコマンド: `npx skills add mattpocock/skills --skill code-review`
- ライセンス: MIT
- 対応ツール: Claude Code, Codex, Copilot, Gemini CLI
- 権限: read-repo ✓, write-files ✗, shell ✓, network ✓
- 状態: スキャン済み
- ルールスキャンですべてのリスクを検出できるわけではありません。インストール前にこのスキルの SKILL.md を読み、権限を確認してください。

## 基本ルール

規約と仕様の2つの結果は分けて示し、統合したり軸をまたいで並べ替えたりしないこと。

## 実行フェーズ

1. **基準点を決める** — ユーザーが指定したコミット・ブランチ・タグが解決でき、diffが空でないことを確認し、git diff と git log のコマンドを控えます。
2. **仕様を探す** — コミットメッセージ内のissue参照、ユーザー指定のパス、docs/ や specs/ のファイルの順に探し、なければユーザーに尋ねます。
3. **規約を集める** — リポジトリ内のコーディング規約ファイルをすべて集め、Fowlerのコードの臭いを基準として加えます。リポジトリの規約が優先されます。
4. **並列サブエージェント** — 規約用と仕様用のサブエージェントを同時に起動し、それぞれ新しいコンテキストで400語以内の報告を返させます。
5. **結果をまとめる** — Standards と Spec の見出しの下に結果を並べ、最後に各軸の件数と最も重大な問題を1行でまとめます。

## 権限の説明（SKILL.md より）

| 機能 | 必要か | 説明 |
|---|---|---|
| ファイル書き込み | 不要 | レビュー報告を出すだけで、コードは変更しません。 |
| コマンド実行 | 一部で必要 | git rev-parse、git diff、git log で変更とコミット一覧を取得します。 |
| 外部通信 | 一部で必要 | issueトラッカーの手順に従って、コミットで参照されたissueを取得する場合のみです。 |

## SKILL.md のフロントマター（YAML）

```yaml
---
name: code-review
description: "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\"."
---
```

ホーム: https://www.myskills.tools/ja/ · URL: https://www.myskills.tools/ja/skills/code-review/
