Review

From allierays/agentic-loop · View interactive version

Review is an AI agent skill from the GitHub repository allierays/agentic-loop. Review code for issues, improvements, and best practices.

How to use this skill

Skill file

Code Review

Review code for issues, improvements, and best practices.

Instructions

When asked to review code, perform a thorough analysis looking for:

1. Security Issues (Critical) - OWASP Top 10

// VULNERABLE - SQL injection
const query = `SELECT * FROM users WHERE name = '${userInput}'`;

// SAFE - parameterized query
const query = "SELECT * FROM users WHERE name = ?";
db.execute(query, [userInput]);
// VULNERABLE - XSS
element.innerHTML = userInput;

// SAFE
element.textContent = userInput;
// or with sanitization
element.innerHTML = DOMPurify.sanitize(userInput);

2. Error Handling (High)

3. Type Safety (High for TypeScript)

4. Code Quality (Medium)

5. Performance (Medium)

6. Maintainability (Low)

Output Format

Structure your review like this:

## Code Review: [filename or description]

### Summary
[1-2 sentence overview of the code quality]

### Critical Issues
These must be fixed before merging:

1. **[Issue Title]** (Line X)
   - Problem: [What's wrong]
   - Risk: [What could happen]
   - Fix: [How to fix it]
   ```
   [Code suggestion if applicable]
   ```

### Improvements
These should be addressed:

1. **[Issue Title]** (Line X)
   - Current: [What it does now]
   - Better: [What it should do]
   - Why: [Benefit of changing]

### Minor Suggestions
Nice to have, low priority:

1. **[Suggestion]** (Line X)
   - [Brief explanation]

### What's Good
[Acknowledge good patterns and practices in the code]

### Verdict
[ ] Ready to merge
[ ] Needs minor changes
[ ] Needs significant changes
[ ] Needs rewrite

Severity Guide

| Severity | Block Merge? | Examples |

|----------|--------------|----------|

| Critical | Yes | Security vulnerabilities, data loss risks |

| High | Yes | Missing error handling, type safety issues |

| Medium | Review | Performance issues, code quality |

| Low | No | Style preferences, minor improvements |

Review Modes

Quick Review

Focus only on critical and high-severity issues:

"Quick review of this code"

Full Review

Check everything:

"Full review of src/api/users.ts"

Security Review (OWASP Top 10)

Deep dive on security - injection, XSS, auth, access control, secrets:

"Security review of the authentication flow"

"Check for SQL injection vulnerabilities"

"Full security audit of the API endpoints"

Performance Review

Focus on performance:

"Performance review of the dashboard page"

Dependency Audit

Check for vulnerable dependencies:

"Check our dependencies for known vulnerabilities"

Be Constructive

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.