Reviews code for quality, security, performance, and accessibility issues. Use when user mentions レビュー, review, コードレビュー, セキュリティ, パフォーマンス, 品質チェック, セルフレビュー, PR, diff, 変更確認. Do NOT load for: 実装作業, 新機能開発, バグ修正, セットアップ.
/plugin marketplace add Chachamaru127/claude-code-harness/plugin install claude-code-harness@claude-code-harness-marketplaceThis skill is limited to using the following tools:
review-accessibility/doc.mdreview-changes/doc.mdreview-performance/doc.mdreview-quality/doc.mdreview-security/doc.mdコードレビューと品質チェックを担当するスキル群です。
| スキル | 用途 |
|---|---|
| review-changes | 変更内容のレビュー |
| review-quality | コード品質チェック |
| review-security | セキュリティレビュー |
| review-performance | パフォーマンスレビュー |
| review-accessibility | アクセシビリティチェック |
ユーザーの意図に応じて適切な小スキルを選択:
レビュー開始前に変更内容を分析し、重点領域を特定:
変更ファイル分析
↓
┌─────────────────────────────────────────┐
│ 品質判定ゲート │
├─────────────────────────────────────────┤
│ 判定項目: │
│ ├── カバレッジ不足?(テストなし) │
│ ├── セキュリティ注意?(auth/api/) │
│ ├── a11y 注意?(UI コンポーネント) │
│ └── パフォーマンス注意?(DB/ループ) │
└─────────────────────────────────────────┘
↓
重点レビュー領域を決定
| 状況 | 指摘内容 |
|---|---|
| 新規ファイルにテストなし | 「テストが不足しています」 |
| 変更ファイルのテストが古い | 「テストの更新を検討してください」 |
| カバレッジ < 60% | 「カバレッジ向上を推奨」 |
| パス | 追加チェック項目 |
|---|---|
| auth/, api/ | OWASP Top 10 チェックリスト |
| 入力処理 | サニタイズ、バリデーション |
| DB クエリ | パラメータ化確認 |
| パス | チェック項目 |
|---|---|
| src/components/ | alt, aria, キーボード操作 |
| src/pages/ | 見出し構造, フォーカス管理 |
| パターン | 警告内容 |
|---|---|
| ループ内 DB クエリ | N+1 クエリの可能性 |
| 大規模データ処理 | ページネーション検討 |
| useEffect 乱用 | レンダリング最適化 |
📊 品質判定結果 → 重点レビュー領域
| 判定 | 該当 | 対象ファイル |
|------|------|-------------|
| セキュリティ | ⚠️ | src/api/auth.ts |
| カバレッジ | ⚠️ | src/utils/helpers.ts (テストなし) |
| a11y | ✅ | - |
| パフォーマンス | ✅ | - |
→ セキュリティ・カバレッジを重点的にレビュー
Claude-mem が有効な場合、レビュー開始前に過去の類似指摘を検索:
# mem-search で過去のレビュー指摘を検索
mem-search: type:review "{変更ファイルのパターン}"
mem-search: concepts:security "{セキュリティ関連のキーワード}"
mem-search: concepts:gotcha "{変更箇所に関連するキーワード}"
表示例:
📚 過去のレビュー指摘(関連あり)
| 日付 | 指摘内容 | ファイル |
|------|---------|---------|
| 2024-01-15 | XSS脆弱性: innerHTML 使用禁止 | src/components/*.tsx |
| 2024-01-20 | N+1クエリ: prefetch 必須 | src/api/*.ts |
💡 今回のレビューで上記パターンを重点チェック
注: Claude-mem が未設定の場合、このステップはスキップされます。
以下の条件を両方満たす場合、Task tool で code-reviewer を並列起動:
起動パターン(1つのレスポンス内で複数の Task tool を同時呼び出し):
Task tool 並列呼び出し:
#1: subagent_type="code-reviewer"
prompt="セキュリティ観点でレビュー: {files}"
#2: subagent_type="code-reviewer"
prompt="パフォーマンス観点でレビュー: {files}"
#3: subagent_type="code-reviewer"
prompt="コード品質観点でレビュー: {files}"
小規模な場合(条件を満たさない):
レビューでは LSP(Language Server Protocol)を活用して精度を向上します。
| レビュー観点 | LSP 活用方法 |
|---|---|
| 品質 | Diagnostics で型エラー・未使用変数を自動検出 |
| セキュリティ | Find-references で機密データの流れを追跡 |
| パフォーマンス | Go-to-definition で重い処理の実装を確認 |
📊 LSP 診断結果
| ファイル | エラー | 警告 |
|---------|--------|------|
| src/components/Form.tsx | 0 | 2 |
| src/utils/api.ts | 1 | 0 |
⚠️ 1件のエラーを検出
→ レビューで指摘事項に追加
🔍 変更影響分析
変更: validateInput()
参照箇所:
├── src/pages/signup.tsx:34
├── src/pages/settings.tsx:56
└── tests/validate.test.ts:12
→ テストでカバー済み ✅
📝 コードチェックを依頼するときの言い方
1. **「チェックして」**
- 全体的に問題がないか見てもらう
2. **「セキュリティ大丈夫?」**
- 悪意ある攻撃に耐えられるかチェック
3. **「遅くない?」**
- 速度に問題がないかチェック
4. **「誰でも使える?」**
- 障害のある方でも使えるかチェック
💡 ヒント: 「全部チェックして」と言えば、
4つの観点すべてを自動で確認します
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.