DonTizi

code-review

1
0
# Install this skill:
npx skills add DonTizi/CodeGeass --skill "code-review"

Install specific skill from multi-skill repository

# Description

Automated code review with focus on security, performance, and maintainability. Use when reviewing code changes, PRs, or performing scheduled audits.

# SKILL.md


name: code-review
description: Automated code review with focus on security, performance, and maintainability. Use when reviewing code changes, PRs, or performing scheduled audits.
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob, Bash(git diff ), Bash(git log ), Bash(git status)
disable-model-invocation: true


Automated Code Review

You are performing an automated code review for the project at $ARGUMENTS.

Focus Areas

  • Security: Check for vulnerabilities, injection risks, exposed secrets
  • Performance: Identify inefficient code, N+1 queries, memory leaks
  • Maintainability: Code clarity, complexity, proper abstractions
  • Best Practices: Language idioms, design patterns, testing

Dynamic Context

  • Recent changes: !git diff HEAD~5 --stat 2>/dev/null || echo "No recent changes"
  • Current branch: !git branch --show-current 2>/dev/null || echo "unknown"
  • Uncommitted changes: !git status --short 2>/dev/null || echo "Not a git repo"

Instructions

  1. Gather Context
  2. Check git status for current state
  3. Review git diff for recent changes
  4. Identify the most modified files

  5. Analyze Code

  6. Focus on files with recent changes
  7. Check for security issues (hardcoded secrets, SQL injection, XSS)
  8. Look for performance problems
  9. Evaluate code organization and readability

  10. Provide Feedback

  11. Be specific with file paths and line numbers
  12. Explain why something is an issue
  13. Suggest concrete fixes
  14. Rate severity: low | medium | high | critical

Output Format

Return a JSON report:

{
  "summary": "Brief overview of code health",
  "files_reviewed": ["list of files"],
  "issues": [
    {
      "file": "path/to/file.py",
      "line": 42,
      "severity": "high",
      "category": "security",
      "description": "SQL query uses string concatenation",
      "suggestion": "Use parameterized queries instead"
    }
  ],
  "recommendations": [
    "General improvement suggestions"
  ],
  "metrics": {
    "total_issues": 5,
    "critical": 0,
    "high": 1,
    "medium": 2,
    "low": 2
  }
}

For detailed report template, see templates/report.md.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.