Agent skill
review
コードの品質をレビューする。 コミット前の最終チェック・PR レビュー・既存コードの品質監査に使用する。 仕様準拠・危険フラグ・CLAUDE.md 規約の 3 観点で検査する。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/review-daisuke-tanabe-daisuke-tanabe
SKILL.md
コードレビュー
Use when
- コミット前の最終チェック
- PR レビュー・既存コードの品質監査
- 特定ファイルや直近の変更のレビュー
Don't use when
- 実装を伴うタスク(→ /tdd or /implement)
進捗管理
スキル開始時に全ステップを TaskCreate で登録し、各ステップの開始・完了時に TaskUpdate で状態を更新すること。
タスク一覧:
- Step 1: 対象コード読み取り(activeForm: "対象コードを読み取り中")
- Step 2: 仕様準拠チェック(activeForm: "仕様準拠をチェック中")
- Step 3: 危険フラグ検出(activeForm: "危険フラグを検出中")
- Step 4: 規約準拠チェック(activeForm: "規約準拠をチェック中")
- Step 5: 検証(activeForm: "検証コマンドを実行中")
指定されたコードをレビューし、問題点を報告する。
前提
- プロジェクト規約:
CLAUDE.mdに従う - Lint:
pnpm --filter web lint - 型チェック:
pnpm --filter web typecheck - テスト:
pnpm --filter web test:run
対象
$ARGUMENTS
Step 1: 対象コードの読み取り
- ファイルパスが指定された場合: そのファイルを読む
- 「直近の変更」等の場合:
git diffやgit diff --cachedで差分を確認する - 関連するテストファイルも確認する
Step 2: 仕様準拠チェック
- 要件を満たしている
- エッジケースが考慮されている
- テストが十分にカバーしている(テストがある場合)
※ 仕様が不明な場合は「仕様未確認」として報告し、確認を推奨する
Step 3: 危険フラグ検出
以下が含まれていないか確認する:
- ハードコードされた秘密情報
- デバッグ用
console.log - コメントアウトされたコード
- 放置された TODO / FIXME
any型の乱用- 危険な関数(
eval,dangerouslySetInnerHTML等)
Step 4: CLAUDE.md 規約準拠チェック
- レイヤー設計(依存の方向)を守っている
- 命名規約に従っている(DB: snake_case / コード: camelCase)
- コンポーネント配置ルールに従っている
- 不要な変更が含まれていない
Step 5: 検証
該当する検証コマンドを実行する:
pnpm --filter web lintpnpm --filter web typecheckpnpm --filter web test:run
重要度の判定基準
| 重要度 | 基準 | 例 |
|---|---|---|
| high | セキュリティ・データ損失・本番障害のリスク | 秘密情報のハードコード、未検証の入力 |
| medium | バグの可能性・保守性の低下 | any 型、テスト不足、命名規約違反 |
| low | スタイル・推奨事項 | console.log 残留、TODO 放置 |
結果報告
## レビュー結果
### 対象
- {ファイル一覧 or 差分の概要}
### 問題一覧
| # | 重要度 | ファイル | 行 | 内容 |
|---|--------|----------|----|------|
| 1 | high/medium/low | {path} | {line} | {説明} |
### 検証結果
- lint: PASS / FAIL
- typecheck: PASS / FAIL
- test: PASS / FAIL
### 総評
{全体的な品質評価と改善提案}
問題がない場合は「問題なし」と明記する。
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?