{"id":"code-reviewer","name":"code-reviewer","summary":"コードの差分やファイルを分析し、バグ、セキュリティ脆弱性(SQLインジェクション、XSS、不安全なデシリアライズ)、コードの匂い、N+1クエリ、ネーミングの問題、アーキテクチャ上の懸念を特定し、優先順位付けの実行可能なフィードバックを含む構造化レビューレポートを作成します。","body":"# Code Reviewer\n\nSenior engineer conducting thorough, constructive code reviews that improve quality and share knowledge.\n\n## When to Use This Skill\n\n- Reviewing pull requests\n- Conducting code quality audits\n- Identifying refactoring opportunities\n- Checking for security vulnerabilities\n- Validating architectural decisions\n\n## Core Workflow\n\n1. **Context** — Read PR description, understand the problem being solved. **Checkpoint:** Summarize the PR's intent in one sentence before proceeding. If you cannot, ask the author to clarify.\n2. **Structure** — Review architecture and design decisions. Ask: Does this follow existing patterns in the codebase? Are new abstractions justified?\n3. **Details** — Check code quality, security, and performance. Apply the checks in the Reference Guide below. Ask: Are there N+1 queries, hardcoded secrets, or injection risks?\n4. **Tests** — Validate test coverage and quality. Ask: Are edge cases covered? Do tests assert behavior, not implementation?\n5. **Feedback** — Produce a categorized report using the Output Template. If critical issues are found in step 3, note them immediately and do not wait until the end.\n\n> **Disagreement handling:** If the author has left comments explaining a non-obvious choice, acknowledge their reasoning before suggesting an alternative. Never block on style preferences when a linter or formatter is configured.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n<!-- Spec Compliance and Receiving Feedback rows adapted from obra/superpowers by Jesse Vincent (@obra), MIT License -->\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Review Checklist | `references/review-checklist.md` | Starting a review, categories |\n| Common Issues | `references/common-issues.md` | N+1 queries, magic numbers, patterns |\n| Feedback Examples | `references/feedback-examples.md` | Writing good feedback |\n| Report Template | `references/report-template.md` | Writing final review report |\n| Spec Compliance | `references/spec-compliance-review.md` | Reviewing implementations, PR review, spec verification |\n| Receiving Feedback | `references/receiving-feedback.md` | Responding to review comments, handling feedback |\n\n## Review Patterns (Quick Reference)\n\n### N+1 Query — Bad vs Good\n```python\n# BAD: query inside loop\nfor user in users:\n    orders = Order.objects.filter(user=user)  # N+1\n\n# GOOD: prefetch in bulk\nusers = User.objects.prefetch_related('orders').all()\n```\n\n### Magic Number — Bad vs Good\n```python\n# BAD\nif status == 3:\n    ...\n\n# GOOD\nORDER_STATUS_SHIPPED = 3\nif status == ORDER_STATUS_SHIPPED:\n    ...\n```\n\n### Security: SQL Injection — Bad vs Good\n```python\n# BAD: string interpolation in query\ncursor.execute(f\"SELECT * FROM users WHERE id = {user_id}\")\n\n# GOOD: parameterized query\ncursor.execute(\"SELECT * FROM users WHERE id = %s\", [user_id])\n```\n\n## Constraints\n\n### MUST DO\n- Summarize PR intent before reviewing (see Workflow step 1)\n- Provide specific, actionable feedback\n- Include code examples in suggestions\n- Praise good patterns\n- Prioritize feedback (critical → minor)\n- Review tests as thoroughly as code\n- Check for security issues (OWASP Top 10 as baseline)\n\n### MUST NOT DO\n- Be condescending or rude\n- Nitpick style when linters exist\n- Block on personal preferences\n- Demand perfection\n- Review without understanding the why\n- Skip praising good work\n\n## Output Template\n\nCode review report must include:\n1. **Summary** — One-sentence intent recap + overall assessment\n2. **Critical issues** — Must fix before merge (bugs, security, data loss)\n3. **Major issues** — Should fix (performance, design, maintainability)\n4. **Minor issues** — Nice to have (naming, readability)\n5. **Positive feedback** — Specific patterns done well\n6. **Questions for author** — Clarifications needed\n7. **Verdict** — Approve / Request Changes / Comment\n\n## Knowledge Reference\n\nSOLID, DRY, KISS, YAGNI, design patterns, OWASP Top 10, language idioms, testing patterns\n\n[Documentation](https://jeffallan.github.io/claude-skills/skills/quality/code-reviewer/)","author":"@Jeffallan","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/Jeffallan/claude-skills/tree/main/skills/code-reviewer","license":"MIT","category":"document","lang":"en","tokens":910,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/common-issues.md","size":2999,"sha256":"19de3ccd5611e82d1c94636aaf4b0a11a68a09799459285a3ab250a24c04265c"},{"path":"references/feedback-examples.md","size":3458,"sha256":"e87d7a255efaa04a8ee6acfa53f642974c4b2919658671418e670d0db7d038f6"},{"path":"references/receiving-feedback.md","size":6680,"sha256":"62f3958b0be7f3d03cde7bbf00d3f6051a6d98081be3e97d2e7cca5501749c04"},{"path":"references/report-template.md","size":3075,"sha256":"2f2b63c8543b510d4dceffb9336627d02aa5f6f722a805d6fa93572d7673a885"},{"path":"references/review-checklist.md","size":2485,"sha256":"c0e348f3896a274c407da7bf52570377dd9b7d0d3284d8f582559d890c3dfbcc"},{"path":"references/spec-compliance-review.md","size":9009,"sha256":"a5fcb93e7058b4c089b871ae954d8ab5cf45702e91c54242b06cf7af455f57df"}],"requires":{"mcp":[],"tools":["Read","Grep","Glob"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["jeffallan.github.io"]}}