← Back to list

code-review
by s4k10503
Unityによるアバターシステムクライアント
⭐ 0🍴 0📅 Jan 24, 2026
SKILL.md
name: code-review description: Reviews code for security, performance, bugs, and architecture violations. MUST use proactively before committing changes and after implementing new features or fixing bugs. Also triggers on "review", "レビュー", "チェック", "アーキテクチャ", "レイヤー". allowed-tools: Bash, Read, Grep, Glob, Task, TaskOutput
Code Review
コードレビューを効率的に実行する。コンテキスト節約のため、全てのレビューはサブエージェントで実行。
レビューモード(選択式)
| モード | 内容 | 用途 |
|---|---|---|
| フル | 軽量 + アーキテクチャ + 詳細 を並行実行 | コミット前の総合チェック |
| クイック | 軽量 + アーキテクチャ のみ並行実行 | 小規模変更、素早い確認 |
| 詳細のみ | Codexによる詳細レビューのみ | セキュリティ/パフォーマンス重視 |
フルレビュー(3並行実行)
推奨: コミット前の総合チェック時
3つのサブエージェントを必ず並行起動すること:
Task(subagent_type="Explore", description="軽量レビュー", prompt="git diff --cached で変更を確認し、命名規則違反、未使用変数・import、明らかなバグ(null参照等)をチェック。返却: | ファイル | 行 | 種別 | 指摘 |")
Task(subagent_type="Explore", description="アーキテクチャ検査", prompt="docs/Spec/architecture-rules.md を読み、git diff --cached の変更ファイルで以下を検出: Domain/Application層のUnityEngine参照、下位層から上位層への依存、Infrastructure→Domain直接参照。返却: | ファイル | 行 | 違反種別 | コード |")
Task(subagent_type="general-purpose", description="詳細レビュー", prompt="以下の手順でCodexを使ったコードレビューを実行してください:\n\n1. Bashで以下のCodexコマンドをバックグラウンドで実行:\n codex exec \"First, run 'git diff --cached' to get the staged changes. Then use SerenaMCP to understand the context of the changed files and their dependencies. Focus on: bugs, security issues, architecture violations, performance problems. List all issues found or say 'No issues found' if clean.\"\n\n2. TaskOutputでCodexの完了を待機(timeout: 180000ms)\n\n3. 結果を要約して返す(日本語で)")
実行後: 全結果を待機してサマリー統合
並行実行プロンプト
軽量レビュー(Explore):
git diff --cached で変更を確認し、以下をチェック:
- 命名規則違反
- 未使用変数・import
- 明らかなバグ(null参照等)
返却: | ファイル | 行 | 種別 | 指摘 |
アーキテクチャ検査(Explore):
docs/Spec/architecture-rules.md を読み、変更ファイルで以下を検出:
- Domain/Application層のUnityEngine参照
- 下位層から上位層への依存
- Infrastructure→Domain直接参照
返却: | ファイル | 行 | 違反種別 | コード |
詳細レビュー(General-purpose + Codex):
サブエージェントに以下のプロンプトを渡すこと(Codex実行手順を明示):
以下の手順でCodexを使ったコードレビューを実行してください:
1. Bashで以下のCodexコマンドをバックグラウンドで実行:
codex exec "First, run 'git diff --cached' to get the staged changes. Then use SerenaMCP to understand the context of the changed files and their dependencies.
Focus on: bugs, security issues, architecture violations, performance problems.
List all issues found or say 'No issues found' if clean."
2. TaskOutputでCodexの完了を待機(timeout: 180000ms)
3. 結果を要約して返す(日本語で)
重要: general-purposeサブエージェントは自動的にCodexを呼ばない。上記のようにcodex execコマンドを明示的にBashで実行する指示が必須。
クイックレビュー(2並行実行)
推奨: 小規模変更、素早い確認時
// 2つのサブエージェントを並行起動(Codex不使用で高速)
Task(subagent_type="Explore", description="軽量レビュー", prompt="...")
Task(subagent_type="Explore", description="アーキテクチャ検査", prompt="...")
詳細レビューのみ
推奨: セキュリティ/パフォーマンス重視、大規模変更時
上記「詳細レビュー(General-purpose + Codex)」セクションのプロンプトを使用すること。
追加テンプレート(意図付きレビュー、ブランチ間レビュー等)は codex-templates.md を参照。
結果統合フォーマット
## レビュー結果サマリー
### 軽量レビュー
| ファイル | 行 | 種別 | 指摘内容 |
|---------|---|------|---------|
(結果)
### アーキテクチャ検査
| ファイル | 行 | 違反種別 | 問題のコード |
|---------|---|---------|------------|
(結果)
### 詳細レビュー(Codex)
(Codexからの指摘)
### 総合サマリー
- 軽量: N件
- アーキテクチャ: N件
- 詳細: N件
- **修正必須**: N件
References
- アーキテクチャルール: docs/Spec/architecture-rules.md
- 品質ガイドライン: docs/Development/code-quality-guidelines.md
- アーキテクチャ検査詳細: architecture-check.md
- Codexテンプレート: codex-templates.md
- オプション: options.md
Score
Total Score
55/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
