code-review-checklist
できること
このスキルは、AIがコードの変更をレビューするための実用的なチェックリストを提供します。正しさ、セキュリティ、速度、コードの品質、テスト、ドキュメントを扱います。丁寧なレビューを望む開発者向けです。
使う場面
- ✓マージの前に、プルリクエストやコードの変更をレビューするようAIに頼むとき。
- ✓インジェクションや公開された機密情報など、セキュリティの問題をコードで確認したいとき。
- ✓AIが書いたコードをレビューし、プロンプトインジェクションや安全でない出力を探したいとき。
スキルのリンク
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/code-review-checklist/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“マージする前に、この変更のコードをセキュリティの問題とバグがないか、レビューしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、各分野について、AIに一連の質問を順に検討させます。AIはコードをその質問に照らして確認し、合格しなかったものを報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Code Review Checklist
Quick Review Checklist
Correctness
- Code does what it's supposed to do
- Edge cases handled
- Error handling in place
- No obvious bugs
Security
- Input validated and sanitized
- No SQL/NoSQL injection vulnerabilities
- No XSS or CSRF vulnerabilities
- No hardcoded secrets or sensitive credentials
- AI-Specific: Protection against Prompt Injection (if applicable)
- AI-Specific: Outputs are sanitized before being used in critical sinks
Performance
- No N+1 queries
- No unnecessary loops
- Appropriate caching
- Bundle size impact considered
Code Quality
- Clear naming
- DRY - no duplicate code
- SOLID principles followed
- Appropriate abstraction level
Testing
- Unit tests for new code
- Edge cases tested
- Tests readable and maintainable
Documentation
- Complex logic commented
- Public APIs documented
- README updated if needed
AI & LLM Review Patterns
Logic & Hallucinations
- Chain of Thought: Does the logic follow a verifiable path?
- Edge Cases: Did the AI account for empty states, timeouts, and partial failures?
- External State: Is the code making safe assumptions about file systems or networks?
Prompt Engineering Review
// ❌ Vague prompt in code
const response = await ai.generate(userInput);
// ✅ Structured & Safe prompt
const response = await ai.generate({
system: "You are a specialized parser...",
input: sanitize(userInput),
schema: ResponseSchema
});
Anti-Patterns to Flag
// ❌ Magic numbers
if (status === 3) { ... }
// ✅ Named constants
if (status === Status.ACTIVE) { ... }
// ❌ Deep nesting
if (a) { if (b) { if (c) { ... } } }
// ✅ Early returns
if (!a) return;
if (!b) return;
if (!c) return;
// do work
// ❌ Long functions (100+ lines)
// ✅ Small, focused functions
// ❌ any type
const data: any = ...
// ✅ Proper types
const data: UserData = ...
Review Comments Guide
// Blocking issues use 🔴
🔴 BLOCKING: SQL injection vulnerability here
// Important suggestions use 🟡
🟡 SUGGESTION: Consider using useMemo for performance
// Minor nits use 🟢
🟢 NIT: Prefer const over let for immutable variable
// Questions use ❓
❓ QUESTION: What happens if user is null here?
よくある質問
チェックリストはどの分野を扱いますか?
正しさ、セキュリティ、性能、コードの品質、テスト、ドキュメントです。
AIを使った機能の確認も含まれますか?
はい。プロンプトインジェクションと、AIの出力を使う前の無害化に関する項目が含まれます。
テストも確認しますか?
はい。新しいコードに単体テストがあるか、エッジケースがテストされているかを確認します。
詳細
作者による元の説明
Code review guidelines covering code quality, security, and best practices.
repo: vudovn/ag-kit
人気
- GitHubのスター
- 8.2k
- ランキング
- #12527
- ライセンス
- MIT
- 更新日
- 2026/10/18
コメント
- …
このリポジトリの他のスキル
batch-operations
8.2k関数の名前変更や古いimportの置き換えなど、同じ変更を多くのファイルに一度に行うよう、エージェントを支援します。
brainstorming
8.2k何か新しいものや複雑なものを作る前に、エージェントが確認の質問をして、まず目標を理解するよう教えます。
code-review-graph
8.2k大きなプロジェクトでは、構造のマップを使ってコードをレビューし、変更の影響を受けるファイルだけを読むよう、エージェントを支援します。
context-compression
8.2k終わった作業を要約し、重要な決定を残すことで、長いチャットのセッションを短くし、集中を保つようエージェントに教えます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。