five-axis-code-review
できること
このツールは、プログラミングのコードが正しく、安全で、読みやすく、高速で、十分にテストされているかを確認するものです。見つかった問題を具体的に指摘し、その直し方も提案します。
使う場面
- ✓コードのレビューを誰かにお願いしたいとき。
- ✓プロジェクトに小さな変更(diff)を提出するとき。
- ✓プルリクエストを確認してほしいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/five-axis-code-review/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このコードをレビューしてください。正しく、安全で、読みやすいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、コードを「正しさ」「セキュリティ」「読みやすさ」「パフォーマンス」「テスト」の5つの観点から分析します。見つかった問題ごとに具体的な修正案を示し、見た目の細かい好みの指摘よりも、役に立つ修正に重点を置きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Code Review Checklist
One review answers a single question: "Will this code become someone else's problem within three months?" Walk the five axes in order; each axis gets pass / fail / N-A, and every failure must come with a concrete fix.
When to Use
- Use when the user asks to review code, a diff, or a pull request.
- Use when a review should stay actionable and skip style nitpicks.
Workflow
- Check the scope first: look at the diff size. Over ~400 changed lines, ask for a split before reviewing — review quality on huge diffs always collapses.
- Check axis by axis (order = priority):
- Correctness: edge cases (null, empty, zero, negative, oversized), concurrency/timing assumptions, error handling (are exceptions swallowed?). The only axis that can block a merge.
- Security: is user input concatenated into SQL / shell commands / HTML; are secrets or tokens hard-coded; does logging leak sensitive data.
- Readability: do names say what things are; does each function do one thing; are magic numbers named. Flag only what you can't understand — not "I'd write it differently."
- Performance: repeated queries or recomputation inside loops; N+1 problems; avoidable large-object copies. No data-free performance speculation ("this might get slow" is not a comment).
- Test coverage: does new logic have tests; do edge cases have cases. All-green tests with the critical path uncovered still get sent back.
- Write the comments: fixed format —
[axis] file:line problem → suggested fix. Only actionable suggestions; "could be optimized" is not one. - Triage:
Must fix(correctness / security) vsShould fix(readability / performance / tests). "Should fix" doesn't block the merge, but say so explicitly.
Rules
- At most 10 comments per review. More than that means the code is too broken — send it back for a rewrite instead of grading 50 items.
- No style policing: indentation, quotes, semicolons — that's the linter's job, not a human's.
- Speak with the diff: every comment must cite a concrete line of code. A comment without a code reference is invalid.
Checklist (minimal executable version)
## Code review checklist
- [ ] Correctness: edge cases (null/0/negative/oversized) handled, exceptions not swallowed
- [ ] Correctness: concurrency/timing assumptions hold, no races
- [ ] Security: no SQL/shell/HTML injection points, no hard-coded secrets, no sensitive data in logs
- [ ] Readability: names are descriptive, functions have a single responsibility, no magic numbers
- [ ] Performance: no repeated queries/computation in loops, no N+1, no evidence-free performance worries
- [ ] Tests: new logic is covered, edge cases have cases
- [ ] Scope: diff ≤ ~400 lines, otherwise split first
Example review comments:
[Must fix][Correctness] order.py:87 empty order list triggers IndexError → guard for empty before taking [0]
[Should fix][Readability] order.py:92 magic number 86400 → name it SECONDS_PER_DAY
Limitations
- Covers five review axes, not every quality dimension. Domain-specific correctness (financial rounding, protocol conformance, accessibility conformance) still needs its own specialist review.
- The five axes are heuristics for a human reviewer. A clean pass on the checklist does not prove the change is correct, secure, or performant.
- Security review here is a reading checklist, not a scanner. Static analysis, dependency audit and secret scanning run as separate tools.
- The skill reviews diffs; it cannot establish that requirements were met, and an empty findings list only means no finding was evidenced in the reviewed scope.
Anti-patterns
- ❌ Drive-by LGTM: approving before reading the whole diff — the review is theater.
- ❌ Style police: 18 of 20 comments about quotes and line breaks while a null-pointer dereference slips through.
- ❌ Comments without code: "this logic looks off" — which logic? Which line? Unsaid means invalid.
- ❌ Performance speculation: "this loop might be slow at scale" — a performance comment without data is noise.
- ❌ Grading 50 items: when there are too many problems to list, the right move is "rewrite and resubmit", not playing teacher.
よくある質問
スタイルの「nitpicks(細かい指摘)」とは何ですか?
スペースの入れ方やセミコロンの有無など、コードの見た目に関する小さな指摘のことです。動作には影響しませんが、気になることがあります。
「マージをブロックする」とはどういう意味ですか?
指摘された問題が解決されるまで、その変更をメインのプロジェクトに追加できないという意味です。
このツールはすべての種類のエラーを見つけられますか?
いいえ、主に5つの観点に絞って確認します。非常に専門的なエラー(正確な金融計算など)や複雑なセキュリティの問題には、専門家による追加のレビューが必要になる場合があります。
詳細
作者による元の説明
Five-axis code review checklist (correctness, security, readability, performance, test coverage) producing actionable comments instead of style nitpicks. Use when the user asks to review code, a diff, or a pull request.
人気
- GitHubのスター
- 48k
- ランキング
- #4627
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。