本文へスキップ
Skillpedia
一般的なプログラミング8.2k · #12527

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/vudovn/ag-kit/blob/main/.agents/skills/code-review-checklist/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル