{"manifest":{"name":"Code Reviewer","version":"1.0.0","description":"Multi-perspective code review: correctness, security (OWASP), performance, and maintainability. Outputs severity-ranked findings with fix suggestions.","tags":["code-review","security","quality","devtools"],"standard":"agentskills.io","standard_version":"1.0","content_checksum":"9befd01b2dc6394fb11be8b71a7a95081910a126cdb71cfaedcd5f513051d20d","bundle_checksum":null,"metadata":{},"files":[]},"files":{"SKILL.md":"# Code Reviewer\n\n> **Purpose:** Perform a multi-perspective code review on staged git changes or a specific file, identifying bugs, security issues, performance problems, and style violations.\n\n---\n\n## Invocation\n\n```\n/review [file_or_path]\n```\n\nIf no path is given, review all staged changes (`git diff --cached`).\n\n---\n\n## Review Perspectives\n\n### 1. Correctness\n- Off-by-one errors, null/undefined access, race conditions\n- Missing error handling on async operations\n- Incorrect boolean logic or edge cases\n- Type mismatches or unsafe casts\n\n### 2. Security (OWASP Top 10)\n- SQL injection via string concatenation\n- XSS through unescaped user input in HTML\n- Missing authentication/authorization checks\n- Hardcoded secrets, API keys, or tokens\n- Insecure deserialization or eval usage\n- Path traversal in file operations\n\n### 3. Performance\n- N+1 query patterns in loops\n- Missing database indexes for frequent queries\n- Unbounded data fetches (no LIMIT/pagination)\n- Synchronous blocking in async contexts\n- Memory leaks (event listeners, timers, subscriptions not cleaned up)\n\n### 4. Maintainability\n- Functions longer than 50 lines\n- Deeply nested conditionals (> 3 levels)\n- Magic numbers without named constants\n- Dead code or unreachable branches\n- Missing or misleading variable names\n\n---\n\n## Output Format\n\nFor each finding, report:\n\n```\n[SEVERITY] Category — file:line\nDescription of the issue.\nSuggested fix: ...\n```\n\nSeverity levels:\n- **CRITICAL** — Security vulnerability or data loss risk. Must fix before merge.\n- **HIGH** — Bug that will cause incorrect behavior. Should fix before merge.\n- **MEDIUM** — Performance or maintainability concern. Fix soon.\n- **LOW** — Style or minor improvement. Optional.\n\n---\n\n## Summary\n\nEnd with a summary table:\n\n| Severity | Count |\n|----------|-------|\n| Critical | 0     |\n| High     | 2     |\n| Medium   | 3     |\n| Low      | 1     |\n\n**Verdict:** APPROVE / REQUEST CHANGES / BLOCK\n\n---\n\n## Rules\n- Never approve code with CRITICAL findings\n- Flag any TODO/FIXME added without a linked issue\n- Verify test coverage exists for new public functions\n- Check that error messages don't leak internal details\n\n## Playground\n\n<!DOCTYPE html><html><head><meta charset='utf-8'><style>*{box-sizing:border-box;margin:0;padding:0}body{background:#0d1117;color:#e6edf3;font-family:monospace;font-size:12px;height:100vh;display:flex;flex-direction:column;overflow:hidden}.header{background:#161b22;border-bottom:1px solid #30363d;padding:8px 14px;font-size:11px;color:#8b949e;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.title{color:#58a6ff;font-weight:bold;font-size:13px}.panels{display:flex;flex:1;overflow:hidden}.panel{flex:1;overflow:auto;padding:12px;border-right:1px solid #30363d}.panel:last-child{border-right:none}.label{font-size:10px;color:#8b949e;text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}pre{white-space:pre-wrap;word-break:break-word;line-height:1.5}</style></head><body><div class='header'><span class='title'>Code Reviewer</span><span>Example · SkillSlap</span></div><div class='panels'><div class='panel'><div class='label'>Input: Python function</div><pre><span style='color:#8b949e'>def calculate_discount(price, discount):</span>\n<span style='color:#8b949e'>    if discount &gt; 1:</span>\n<span style='color:#f85149'>        return price * discount  # bug</span>\n<span style='color:#8b949e'>    return price - (price * discount)</span>\n\n<span style='color:#8b949e'>result = calculate_discount(100, 20)</span>\n<span style='color:#8b949e'>print(result)  # prints -1900</span></pre></div><div class='panel'><div class='label'>Output: Review</div><pre><span style='color:#f85149'>🔴 Bug (line 3)</span>\n<span style='color:#8b949e'>Discount &gt;1 branch multiplies instead</span>\n<span style='color:#8b949e'>of applying it. discount=20 → -1900.</span>\n\n<span style='color:#e3b341'>🟡 Naming (line 1)</span>\n<span style='color:#8b949e'>`discount` ambiguous — fraction (0.2)</span>\n<span style='color:#8b949e'>or percentage (20)?</span>\n\n<span style='color:#e3b341'>🟡 Missing guard</span>\n<span style='color:#8b949e'>No validation: negative price or</span>\n<span style='color:#8b949e'>discount &gt;100% not handled.</span>\n\n<span style='color:#3fb950'>✅ Fix</span>\n<span style='color:#3fb950'>def calculate_discount(price, pct):</span>\n<span style='color:#3fb950'>    if not 0 &lt;= pct &lt;= 100:</span>\n<span style='color:#3fb950'>        raise ValueError(pct)</span>\n<span style='color:#3fb950'>    return price * (1 - pct / 100)</span></pre></div></div></body></html>"}}