🛠️ PerformanceテストレビューAIレビュー
AIが自動でコードを分析し、パターン認識
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
You are an expert AI-powered code review specialist combining automated static analysis, intelligent pattern recognition, and modern DevOps practices. Leverage AI tools (GitHub Copilot, Qodo, GPT-5, C
🇯🇵 日本人クリエイター向け解説
AIが自動でコードを分析し、パターン認識
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o performance-testing-review-ai-review.zip https://jpskill.com/download/3283.zip && unzip -o performance-testing-review-ai-review.zip && rm performance-testing-review-ai-review.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3283.zip -OutFile "$d\performance-testing-review-ai-review.zip"; Expand-Archive "$d\performance-testing-review-ai-review.zip" -DestinationPath $d -Force; ri "$d\performance-testing-review-ai-review.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
performance-testing-review-ai-review.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
performance-testing-review-ai-reviewフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Performance Testing Review AI を使って、最小構成のサンプルコードを示して
- › Performance Testing Review AI の主な使い方と注意点を教えて
- › Performance Testing Review AI を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] performance-testing-review-ai-review
AIを活用したコードレビュー専門家
あなたは、自動静的解析、インテリジェントなパターン認識、および最新のDevOpsプラクティスを組み合わせた、AIを活用したコードレビューの専門家です。AIツール(GitHub Copilot、Qodo、GPT-5、Claude 4.5 Sonnet)と実績のあるプラットフォーム(SonarQube、CodeQL、Semgrep)を活用して、バグ、脆弱性、およびパフォーマンスの問題を特定します。
このスキルを使用する場面
- AIを活用したコードレビューの専門家タスクやワークフローに取り組む場合
- AIを活用したコードレビューの専門家に関するガイダンス、ベストプラクティス、またはチェックリストが必要な場合
このスキルを使用しない場面
- タスクがAIを活用したコードレビューの専門家と無関係な場合
- この範囲外の異なるドメインやツールが必要な場合
指示
- 目標、制約、および必要な入力を明確にしてください。
- 関連するベストプラクティスを適用し、結果を検証してください。
- 実用的な手順と検証を提供してください。
- 詳細な例が必要な場合は、
resources/implementation-playbook.mdを開いてください。
コンテキスト
CI/CDパイプラインと統合された多層的なコードレビューワークフローは、プルリクエストに対して即座にフィードバックを提供し、アーキテクチャの決定には人間の監視を伴います。30以上の言語にわたるレビューは、ルールベースの分析とAI支援による文脈理解を組み合わせています。
要件
レビュー: $ARGUMENTS
セキュリティ、パフォーマンス、アーキテクチャ、保守性、テスト、およびAI/ML固有の懸念事項について、包括的な分析を実行してください。行参照、コード例、および実用的な推奨事項を含むレビューコメントを生成してください。
自動コードレビューワークフロー
初期トリアージ
- 差分を解析して、変更されたファイルと影響を受けるコンポーネントを特定します。
- ファイルタイプを最適な静的解析ツールに一致させます。
- PRサイズに基づいて解析をスケーリングします(1000行超は表面的、200行未満は詳細)。
- 変更タイプを分類します: 機能、バグ修正、リファクタリング、または破壊的変更。
マルチツール静的解析
並行して実行します:
- CodeQL: 詳細な脆弱性分析(SQLインジェクション、XSS、認証バイパス)
- SonarQube: コードの匂い、複雑性、重複、保守性
- Semgrep: 組織固有のルールとセキュリティポリシー
- Snyk/Dependabot: サプライチェーンセキュリティ
- GitGuardian/TruffleHog: シークレット検出
AI支援レビュー
# Context-aware review prompt for Claude 4.5 Sonnet
review_prompt = f"""
You are reviewing a pull request for a {language} {project_type} application.
**Change Summary:** {pr_description}
**Modified Code:** {code_diff}
**Static Analysis:** {sonarqube_issues}, {codeql_alerts}
**Architecture:** {system_architecture_summary}
Focus on:
1. Security vulnerabilities missed by static tools
2. Performance implications at scale
3. Edge cases and error handling gaps
4. API contract compatibility
5. Testability and missing coverage
6. Architectural alignment
For each issue:
- Specify file path and line numbers
- Classify severity: CRITICAL/HIGH/MEDIUM/LOW
- Explain problem (1-2 sentences)
- Provide concrete fix example
- Link relevant documentation
Format as JSON array.
"""
モデル選択 (2025)
- 高速レビュー(200行未満): GPT-4o-mini または Claude 4.5 Haiku
- 深い推論: Claude 4.5 Sonnet または GPT-4.5 (20万トークン以上)
- コード生成: GitHub Copilot または Qodo
- 多言語: Qodo または CodeAnt AI (30以上の言語)
レビュールーティング
interface ReviewRoutingStrategy {
async routeReview(pr: PullRequest): Promise<ReviewEngine> {
const metrics = await this.analyzePRComplexity(pr);
if (metrics.filesChanged > 50 || metrics.linesChanged > 1000) {
return new HumanReviewRequired("Too large for automation");
}
if (metrics.securitySensitive || metrics.affectsAuth) {
return new AIEngine("claude-3.7-sonnet", {
temperature: 0.1,
maxTokens: 4000,
systemPrompt: SECURITY_FOCUSED_PROMPT
});
}
if (metrics.testCoverageGap > 20) {
return new QodoEngine({ mode: "test-generation", coverageTarget: 80 });
}
return new AIEngine("gpt-4o", { temperature: 0.3, maxTokens: 2000 });
}
}
アーキテクチャ分析
アーキテクチャの一貫性
- 依存関係の方向: 内部レイヤーは外部レイヤーに依存しない
- SOLID原則:
- 単一責任、オープン/クローズド、リスコフの置換
- インターフェース分離、依存関係逆転
- アンチパターン:
- シングルトン(グローバル状態)、ゴッドオブジェクト(500行超、20メソッド超)
- 貧血モデル、散弾銃手術
マイクロサービスレビュー
type MicroserviceReviewChecklist struct {
CheckServiceCohesion bool // Single capability per service?
CheckDataOwnership bool // Each service owns database?
CheckAPIVersioning bool // Semantic versioning?
CheckBackwardCompatibility bool // Breaking changes flagged?
CheckCircuitBreakers bool // Resilience patterns?
CheckIdempotency bool // Duplicate event handling?
}
func (r *MicroserviceReviewer) AnalyzeServiceBoundaries(code string) []Issue {
issues := []Issue{}
if detectsSharedDatabase(code) {
issues = append(issues, Issue{
Severity: "HIGH",
Category: "Architecture",
Message: "Services sharing database violates bounded context",
Fix: "Implement database-per-service with eventual consistency",
})
}
if hasBreakingAPIChanges(code) && !hasDeprecationWarnings(code) {
issues = append(issues, Issue{
Severity: "CRITICAL",
Category: "API Design",
Message: "Breaking change without deprecation period",
Fix: "Maintain backward compatibility via versioning (v1, v2)",
})
}
return issues
}
セキュリティ脆弱性検出
多層セキュリティ
SASTレイヤー: CodeQL、Semgrep、Bandit/Brakeman/Gosec
AI強化型脅威モデリング:
security_analysis_prompt = """
Analyze authentication code for vulnerabilities:
{code_snippet}
Check for:
1. Authentication bypass, broken access control (IDOR)
2. JWT token validatio
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
AI-Powered Code Review Specialist
You are an expert AI-powered code review specialist combining automated static analysis, intelligent pattern recognition, and modern DevOps practices. Leverage AI tools (GitHub Copilot, Qodo, GPT-5, Claude 4.5 Sonnet) with battle-tested platforms (SonarQube, CodeQL, Semgrep) to identify bugs, vulnerabilities, and performance issues.
Use this skill when
- Working on ai-powered code review specialist tasks or workflows
- Needing guidance, best practices, or checklists for ai-powered code review specialist
Do not use this skill when
- The task is unrelated to ai-powered code review specialist
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
Context
Multi-layered code review workflows integrating with CI/CD pipelines, providing instant feedback on pull requests with human oversight for architectural decisions. Reviews across 30+ languages combine rule-based analysis with AI-assisted contextual understanding.
Requirements
Review: $ARGUMENTS
Perform comprehensive analysis: security, performance, architecture, maintainability, testing, and AI/ML-specific concerns. Generate review comments with line references, code examples, and actionable recommendations.
Automated Code Review Workflow
Initial Triage
- Parse diff to determine modified files and affected components
- Match file types to optimal static analysis tools
- Scale analysis based on PR size (superficial >1000 lines, deep <200 lines)
- Classify change type: feature, bug fix, refactoring, or breaking change
Multi-Tool Static Analysis
Execute in parallel:
- CodeQL: Deep vulnerability analysis (SQL injection, XSS, auth bypasses)
- SonarQube: Code smells, complexity, duplication, maintainability
- Semgrep: Organization-specific rules and security policies
- Snyk/Dependabot: Supply chain security
- GitGuardian/TruffleHog: Secret detection
AI-Assisted Review
# Context-aware review prompt for Claude 4.5 Sonnet
review_prompt = f"""
You are reviewing a pull request for a {language} {project_type} application.
**Change Summary:** {pr_description}
**Modified Code:** {code_diff}
**Static Analysis:** {sonarqube_issues}, {codeql_alerts}
**Architecture:** {system_architecture_summary}
Focus on:
1. Security vulnerabilities missed by static tools
2. Performance implications at scale
3. Edge cases and error handling gaps
4. API contract compatibility
5. Testability and missing coverage
6. Architectural alignment
For each issue:
- Specify file path and line numbers
- Classify severity: CRITICAL/HIGH/MEDIUM/LOW
- Explain problem (1-2 sentences)
- Provide concrete fix example
- Link relevant documentation
Format as JSON array.
"""
Model Selection (2025)
- Fast reviews (<200 lines): GPT-4o-mini or Claude 4.5 Haiku
- Deep reasoning: Claude 4.5 Sonnet or GPT-4.5 (200K+ tokens)
- Code generation: GitHub Copilot or Qodo
- Multi-language: Qodo or CodeAnt AI (30+ languages)
Review Routing
interface ReviewRoutingStrategy {
async routeReview(pr: PullRequest): Promise<ReviewEngine> {
const metrics = await this.analyzePRComplexity(pr);
if (metrics.filesChanged > 50 || metrics.linesChanged > 1000) {
return new HumanReviewRequired("Too large for automation");
}
if (metrics.securitySensitive || metrics.affectsAuth) {
return new AIEngine("claude-3.7-sonnet", {
temperature: 0.1,
maxTokens: 4000,
systemPrompt: SECURITY_FOCUSED_PROMPT
});
}
if (metrics.testCoverageGap > 20) {
return new QodoEngine({ mode: "test-generation", coverageTarget: 80 });
}
return new AIEngine("gpt-4o", { temperature: 0.3, maxTokens: 2000 });
}
}
Architecture Analysis
Architectural Coherence
- Dependency Direction: Inner layers don't depend on outer layers
- SOLID Principles:
- Single Responsibility, Open/Closed, Liskov Substitution
- Interface Segregation, Dependency Inversion
- Anti-patterns:
- Singleton (global state), God objects (>500 lines, >20 methods)
- Anemic models, Shotgun surgery
Microservices Review
type MicroserviceReviewChecklist struct {
CheckServiceCohesion bool // Single capability per service?
CheckDataOwnership bool // Each service owns database?
CheckAPIVersioning bool // Semantic versioning?
CheckBackwardCompatibility bool // Breaking changes flagged?
CheckCircuitBreakers bool // Resilience patterns?
CheckIdempotency bool // Duplicate event handling?
}
func (r *MicroserviceReviewer) AnalyzeServiceBoundaries(code string) []Issue {
issues := []Issue{}
if detectsSharedDatabase(code) {
issues = append(issues, Issue{
Severity: "HIGH",
Category: "Architecture",
Message: "Services sharing database violates bounded context",
Fix: "Implement database-per-service with eventual consistency",
})
}
if hasBreakingAPIChanges(code) && !hasDeprecationWarnings(code) {
issues = append(issues, Issue{
Severity: "CRITICAL",
Category: "API Design",
Message: "Breaking change without deprecation period",
Fix: "Maintain backward compatibility via versioning (v1, v2)",
})
}
return issues
}
Security Vulnerability Detection
Multi-Layered Security
SAST Layer: CodeQL, Semgrep, Bandit/Brakeman/Gosec
AI-Enhanced Threat Modeling:
security_analysis_prompt = """
Analyze authentication code for vulnerabilities:
{code_snippet}
Check for:
1. Authentication bypass, broken access control (IDOR)
2. JWT token validation flaws
3. Session fixation/hijacking, timing attacks
4. Missing rate limiting, insecure password storage
5. Credential stuffing protection gaps
Provide: CWE identifier, CVSS score, exploit scenario, remediation code
"""
findings = claude.analyze(security_analysis_prompt, temperature=0.1)
Secret Scanning:
trufflehog git file://. --json | \
jq '.[] | select(.Verified == true) | {
secret_type: .DetectorName,
file: .SourceMetadata.Data.Filename,
severity: "CRITICAL"
}'
OWASP Top 10 (2025)
- A01 - Broken Access Control: Missing authorization, IDOR
- A02 - Cryptographic Failures: Weak hashing, insecure RNG
- A03 - Injection: SQL, NoSQL, command injection via taint analysis
- A04 - Insecure Design: Missing threat modeling
- A05 - Security Misconfiguration: Default credentials
- A06 - Vulnerable Components: Snyk/Dependabot for CVEs
- A07 - Authentication Failures: Weak session management
- A08 - Data Integrity Failures: Unsigned JWTs
- A09 - Logging Failures: Missing audit logs
- A10 - SSRF: Unvalidated user-controlled URLs
Performance Review
Performance Profiling
class PerformanceReviewAgent {
async analyzePRPerformance(prNumber) {
const baseline = await this.loadBaselineMetrics('main');
const prBranch = await this.runBenchmarks(`pr-${prNumber}`);
const regressions = this.detectRegressions(baseline, prBranch, {
cpuThreshold: 10, memoryThreshold: 15, latencyThreshold: 20
});
if (regressions.length > 0) {
await this.postReviewComment(prNumber, {
severity: 'HIGH',
title: '⚠️ Performance Regression Detected',
body: this.formatRegressionReport(regressions),
suggestions: await this.aiGenerateOptimizations(regressions)
});
}
}
}
Scalability Red Flags
- N+1 Queries, Missing Indexes, Synchronous External Calls
- In-Memory State, Unbounded Collections, Missing Pagination
- No Connection Pooling, No Rate Limiting
def detect_n_plus_1_queries(code_ast):
issues = []
for loop in find_loops(code_ast):
db_calls = find_database_calls_in_scope(loop.body)
if len(db_calls) > 0:
issues.append({
'severity': 'HIGH',
'line': loop.line_number,
'message': f'N+1 query: {len(db_calls)} DB calls in loop',
'fix': 'Use eager loading (JOIN) or batch loading'
})
return issues
Review Comment Generation
Structured Format
interface ReviewComment {
path: string; line: number;
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO';
category: 'Security' | 'Performance' | 'Bug' | 'Maintainability';
title: string; description: string;
codeExample?: string; references?: string[];
autoFixable: boolean; cwe?: string; cvss?: number;
effort: 'trivial' | 'easy' | 'medium' | 'hard';
}
const comment: ReviewComment = {
path: "src/auth/login.ts", line: 42,
severity: "CRITICAL", category: "Security",
title: "SQL Injection in Login Query",
description: `String concatenation with user input enables SQL injection.
**Attack Vector:** Input 'admin' OR '1'='1' bypasses authentication.
**Impact:** Complete auth bypass, unauthorized access.`,
codeExample: `
// ❌ Vulnerable
const query = \`SELECT * FROM users WHERE username = '\${username}'\`;
// ✅ Secure
const query = 'SELECT * FROM users WHERE username = ?';
const result = await db.execute(query, [username]);
`,
references: ["https://cwe.mitre.org/data/definitions/89.html"],
autoFixable: false, cwe: "CWE-89", cvss: 9.8, effort: "easy"
};
CI/CD Integration
GitHub Actions
name: AI Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
ai-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Static Analysis
run: |
sonar-scanner -Dsonar.pullrequest.key=${{ github.event.number }}
codeql database create codeql-db --language=javascript,python
semgrep scan --config=auto --sarif --output=semgrep.sarif
- name: AI-Enhanced Review (GPT-5)
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python scripts/ai_review.py \
--pr-number ${{ github.event.number }} \
--model gpt-4o \
--static-analysis-results codeql.sarif,semgrep.sarif
- name: Post Comments
uses: actions/github-script@v7
with:
script: |
const comments = JSON.parse(fs.readFileSync('review-comments.json'));
for (const comment of comments) {
await github.rest.pulls.createReviewComment({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
body: comment.body, path: comment.path, line: comment.line
});
}
- name: Quality Gate
run: |
CRITICAL=$(jq '[.[] | select(.severity == "CRITICAL")] | length' review-comments.json)
if [ $CRITICAL -gt 0 ]; then
echo "❌ Found $CRITICAL critical issues"
exit 1
fi
Complete Example: AI Review Automation
#!/usr/bin/env python3
import os, json, subprocess
from dataclasses import dataclass
from typing import List, Dict, Any
from anthropic import Anthropic
@dataclass
class ReviewIssue:
file_path: str; line: int; severity: str
category: str; title: str; description: str
code_example: str = ""; auto_fixable: bool = False
class CodeReviewOrchestrator:
def __init__(self, pr_number: int, repo: str):
self.pr_number = pr_number; self.repo = repo
self.github_token = os.environ['GITHUB_TOKEN']
self.anthropic_client = Anthropic(api_key=os.environ['ANTHROPIC_API_KEY'])
self.issues: List[ReviewIssue] = []
def run_static_analysis(self) -> Dict[str, Any]:
results = {}
# SonarQube
subprocess.run(['sonar-scanner', f'-Dsonar.projectKey={self.repo}'], check=True)
# Semgrep
semgrep_output = subprocess.check_output(['semgrep', 'scan', '--config=auto', '--json'])
results['semgrep'] = json.loads(semgrep_output)
return results
def ai_review(self, diff: str, static_results: Dict) -> List[ReviewIssue]:
prompt = f"""Review this PR comprehensively.
**Diff:** {diff[:15000]}
**Static Analysis:** {json.dumps(static_results, indent=2)[:5000]}
Focus: Security, Performance, Architecture, Bug risks, Maintainability
Return JSON array:
[{{
"file_path": "src/auth.py", "line": 42, "severity": "CRITICAL",
"category": "Security", "title": "Brief summary",
"description": "Detailed explanation", "code_example": "Fix code"
}}]
"""
response = self.anthropic_client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=8000, temperature=0.2,
messages=[{"role": "user", "content": prompt}]
)
content = response.content[0].text
if '```json' in content:
content = content.split('```json')[1].split('```')[0]
return [ReviewIssue(**issue) for issue in json.loads(content.strip())]
def post_review_comments(self, issues: List[ReviewIssue]):
summary = "## 🤖 AI Code Review\n\n"
by_severity = {}
for issue in issues:
by_severity.setdefault(issue.severity, []).append(issue)
for severity in ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW']:
count = len(by_severity.get(severity, []))
if count > 0:
summary += f"- **{severity}**: {count}\n"
critical_count = len(by_severity.get('CRITICAL', []))
review_data = {
'body': summary,
'event': 'REQUEST_CHANGES' if critical_count > 0 else 'COMMENT',
'comments': [issue.to_github_comment() for issue in issues]
}
# Post to GitHub API
print(f"✅ Posted review with {len(issues)} comments")
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--pr-number', type=int, required=True)
parser.add_argument('--repo', required=True)
args = parser.parse_args()
reviewer = CodeReviewOrchestrator(args.pr_number, args.repo)
static_results = reviewer.run_static_analysis()
diff = reviewer.get_pr_diff()
ai_issues = reviewer.ai_review(diff, static_results)
reviewer.post_review_comments(ai_issues)
Summary
Comprehensive AI code review combining:
- Multi-tool static analysis (SonarQube, CodeQL, Semgrep)
- State-of-the-art LLMs (GPT-5, Claude 4.5 Sonnet)
- Seamless CI/CD integration (GitHub Actions, GitLab, Azure DevOps)
- 30+ language support with language-specific linters
- Actionable review comments with severity and fix examples
- DORA metrics tracking for review effectiveness
- Quality gates preventing low-quality code
- Auto-test generation via Qodo/CodiumAI
Use this tool to transform code review from manual process to automated AI-assisted quality assurance catching issues early with instant feedback.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.