code-review

作成者: anthropic

構造化されたコードレビュー:PRの差分やファイル変更に対して、セキュリティ、パフォーマンス、正確性、保守性を評価します。SQLインジェクション、XSS、CSRF、認証の欠陥、認証情報の露出などのセキュリティリスクを監査します。N+1クエリ、メモリリーク、アルゴリズムの複雑性、リソースリークなどのパフォーマンス問題を特定します。エッジケース、競合状態、エラーハンドリング、型安全性のギャップに関する正確性をチェックします。差分とファイルパスでスタンドアロン動作し、ソース管理と統合します。

npx skills add https://github.com/anthropics/knowledge-work-plugins --skill code-review

/code-review

If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.

Review code changes with a structured lens on security, performance, correctness, and maintainability.

Usage

/code-review <PR URL or file path>

Review the provided code changes: @$1

If no specific file or URL is provided, ask what to review.

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                      CODE REVIEW                                   │
├─────────────────────────────────────────────────────────────────┤
│  STANDALONE (always works)                                       │
│  ✓ Paste a diff, PR URL, or point to files                      │
│  ✓ Security audit (OWASP top 10, injection, auth)               │
│  ✓ Performance review (N+1, memory leaks, complexity)           │
│  ✓ Correctness (edge cases, error handling, race conditions)    │
│  ✓ Style (naming, structure, readability)                        │
│  ✓ Actionable suggestions with code examples                    │
├─────────────────────────────────────────────────────────────────┤
│  SUPERCHARGED (when you connect your tools)                      │
│  + Source control: Pull PR diff automatically                    │
│  + Project tracker: Link findings to tickets                     │
│  + Knowledge base: Check against team coding standards           │
└─────────────────────────────────────────────────────────────────┘

Review Dimensions

Security

  • SQL injection, XSS, CSRF
  • Authentication and authorization flaws
  • Secrets or credentials in code
  • Insecure deserialization
  • Path traversal
  • SSRF

Performance

  • N+1 queries
  • Unnecessary memory allocations
  • Algorithmic complexity (O(n²) in hot paths)
  • Missing database indexes
  • Unbounded queries or loops
  • Resource leaks

Correctness

  • Edge cases (empty input, null, overflow)
  • Race conditions and concurrency issues
  • Error handling and propagation
  • Off-by-one errors
  • Type safety

Maintainability

  • Naming clarity
  • Single responsibility
  • Duplication
  • Test coverage
  • Documentation for non-obvious logic

Output

## Code Review: [PR title or file]

### Summary
[1-2 sentence overview of the changes and overall quality]

### Critical Issues
| # | File | Line | Issue | Severity |
|---|------|------|-------|----------|
| 1 | [file] | [line] | [description] | 🔴 Critical |

### Suggestions
| # | File | Line | Suggestion | Category |
|---|------|------|------------|----------|
| 1 | [file] | [line] | [description] | Performance |

### What Looks Good
- [Positive observations]

### Verdict
[Approve / Request Changes / Needs Discussion]

If Connectors Available

If ~~source control is connected:

  • Pull the PR diff automatically from the URL
  • Check CI status and test results

If ~~project tracker is connected:

  • Link findings to related tickets
  • Verify the PR addresses the stated requirements

If ~~knowledge base is connected:

  • Check changes against team coding standards and style guides

Tips

  1. Provide context — "This is a hot path" or "This handles PII" helps me focus.
  2. Specify concerns — "Focus on security" narrows the review.
  3. Include tests — I'll check test coverage and quality too.

anthropicのその他のスキル

comps-analysis
anthropic
常にこのデータソースの階層に従ってください:
official
analyzing-financial-statements
anthropic
このスキルは、財務諸表データから投資分析のための主要な財務比率や指標を計算します。
official
applying-brand-guidelines
anthropic
このスキルは、生成されるすべてのドキュメントに一貫したコーポレートブランディングとスタイリング(色、フォント、レイアウト、メッセージングを含む)を適用します。
official
cookbook-audit
anthropic
ルーブリックに基づいてAnthropic Cookbookのノートブックを監査します。ノートブックのレビューや監査が依頼されたときに使用してください。
official
creating-financial-models
anthropic
このスキルは、DCF分析、感応度テスト、モンテカルロシミュレーション、および投資のためのシナリオプランニングを備えた高度な財務モデリングスイートを提供します…
official
action-creator
anthropic
ユーザー固有のワンクリックアクションテンプレートを作成し、チャットインターフェースでクリックするとメール操作を実行します。ユーザーが再利用可能なアクションを必要とする場合に使用します…
official
docx
anthropic
包括変更履歴、コメント、書式保持、テキスト抽出をサポートした、包括的なドキュメント作成、編集、分析。Claudeが…
official
executive-briefing
anthropic
研究結果を経営陣向けのブリーフィングに変換します。ユーザーが「エグゼクティブ」「ブリーフィング」「Cスイート」「ボード」などに言及すると自動的に起動します。
official