Communityコーディング&開発github.com

コードレビューの依頼

タスク完了時、主要機能実装後、またはマージ前に作業が要件を満たしているか検証するためにコードレビューを依頼します。

コードレビューの依頼 とは?

このスキルは、開発中に問題が連鎖する前に捕捉するために、コードレビュアーのサブエージェントを起動します。レビュアーには、セッション履歴全体ではなく、評価に必要な精密に構築されたコンテキストのみが渡されます。サブエージェント駆動開発での各タスク後、主要機能の完了後、メインブランチへのマージ前など、レビューのタイミングが明確に定義されています。レビュアーサブエージェントは汎用サブエージェントとして起動し、コードレビュー.mdテンプレートを基に、変更内容の説明と要件、ベースSHA、ヘッドSHAを埋め込んで実行します。レビューの結果、重大な問題は即時修正、重要な問題は次に進む前に修正、軽微な問題は後回しにするなど、フィードバックへの対応指針も提供します。このスキルは、Claude CodeやCusorなどのサブエージェントを活用するAIエージェントツールで使用することを想定しています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/obra/superpowers/tree/main/skills/requesting-code-review

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

コードレビューの依頼 は何をしますか?

コードレビュアーのサブエージェントを起動し、問題が連鎖する前に捕捉します。レビュアーには、セッション履歴全体ではなく、評価に必要な精密に構築されたコンテキストが渡されます。

核となる原則: 早期に、頻繁にレビューする。

レビューを依頼するタイミング

必須:

  • サブエージェント駆動開発での各タスク後
  • 主要機能の完了後
  • メインブランチへのマージ前

任意だが価値がある場合:

  • 詰まったとき(新鮮な視点)
  • リファクタリング前(ベースライン確認)
  • 複雑なバグ修正後

依頼方法

1. Git SHAを取得:

BASE_SHA=$(git rev-parse HEAD~1)  # または: git merge-base origin/main HEAD
HEAD_SHA=$(git rev-parse HEAD)

2. コードレビュアーサブエージェントを起動:

general-purpose サブエージェントを起動し、code-reviewer.md のテンプレートを埋めます。

プレースホルダー:

  • {DESCRIPTION} - 構築した内容の簡単な要約
  • {PLAN_OR_REQUIREMENTS} - 何をすべきか
  • {BASE_SHA} - 開始コミット
  • {HEAD_SHA} - 終了コミット

3. フィードバックに対応:

  • Critical(重大)な問題は即座に修正
  • Important(重要)な問題は次の作業前に修正
  • Minor(軽微)な問題は後で対応するために記録
  • レビュアーが誤っている場合は理由とともに反論

例

[タスク2: 検証関数の追加が完了]

あなた: 次に進む前にコードレビューを依頼しましょう。

BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | cut -d' ' -f1)
HEAD_SHA=$(git rev-parse HEAD)

[コードレビュアーサブエージェントを起動]
  DESCRIPTION: verifyIndex() と repairIndex() を4つの問題タイプとともに追加
  PLAN_OR_REQUIREMENTS: docs/superpowers/plans/deployment-plan.md のタスク2
  BASE_SHA: a7981ec
  HEAD_SHA: 3df7661

[サブエージェントからの戻り]:
  強み: クリーンなアーキテクチャ、実際のテスト
  問題:
    Important: 進捗インジケーターがない
    Minor: レポート間隔にマジックナンバー (100) を使用
  評価: 続行可能

あなた: [進捗インジケーターを修正]
[タスク3に進む]

よくある言い訳

言い訳現実
「レビュアーを起動せずに自分でdiffを確認するよ」あなたはコーディネーターです。diffをインラインで確認すると、作業を進めるために必要なコンテキストウィンドウを消費します。レビュアーサブエージェントを起動してください。diffと評価はそのコンテキスト内に留まり、結果だけがあなたに返ってきます。
「レビュアーが変更を理解するにはセッション履歴全体が必要だ」精密に構築されたコンテキストだけを渡し、セッション履歴全体は渡さないでください。そうすることで、レビュアーはあなたの思考プロセスではなく、作業成果物に集中できます。

レッドフラグ

してはいけないこと:

  • 「簡単だから」という理由でレビューをスキップする
  • Critical(重大)な問題を無視する
  • Important(重要)な問題を修正せずに進める
  • 正当な技術的フィードバックに反論する

レビュアーが間違っている場合:

  • 技術的な理由を添えて反論する
  • 動作を証明するコードやテストを示す
  • 明確化を求める

テンプレートはこちら: code-reviewer.md

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

diagnosing-superpowers

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

dispatching-parallel-agents

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

executing-plans

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

receiving-code-review

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

subagent-driven-development

Use when executing implementation plans with independent tasks in the current session

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

using-git-worktrees

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback

using-superpowers

Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions

verification-before-completion

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

writing-plans

Use when you have a spec or requirements for a multi-step task, before touching code

writing-skills

Use when creating new skills, editing existing skills, or verifying skills work before deployment

関連スキル