code-review

w2112515's avatarfrom w2112515

分析代码质量并提供改进建议

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 20, 2025

When & Why to Use This Skill

This Claude skill automates the code review process by performing deep analysis of source code to identify security vulnerabilities, performance bottlenecks, and stylistic inconsistencies. It provides developers with line-specific actionable suggestions and an overall quality score, supporting multiple major programming languages including Python, JavaScript, Rust, and Go to ensure high-standard, maintainable codebases.

Use Cases

  • Automated Pull Request (PR) reviews: Integrate into the development workflow to catch bugs and security flaws before code is merged.
  • Security Vulnerability Scanning: Proactively identify critical risks such as SQL injection, insecure data handling, and logic errors.
  • Code Quality Benchmarking: Evaluate legacy code or new submissions against industry best practices and performance standards.
  • Developer Mentorship and Training: Provide junior developers with instant, detailed feedback and educational suggestions to improve their coding skills.
namecode-review
version"1.0.0"
description代码质量评分 (0-100)
authorExoProtocolDemo
modelper_call
price_lamports25000
docker_imageexo-runtime-python-3.11
docker_image_hashsha256:jkl901mno234...
entrypointscripts/main.py
timeout_seconds45
typeinteger
maxLength50000
enum["info", "warning", "error", "critical"]
default"info"
additionalPropertiesfalse
maxProperties20
readOnlyHinttrue
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse

Code Review Skill

功能描述

自动化代码审查工具,检测代码中的安全漏洞、性能问题和风格问题,并提供改进建议。

适用场景:

  • PR 预审查
  • 安全漏洞扫描
  • 代码质量门禁
  • 学习最佳实践

使用示例

输入:

{
  "code": "def get_user(id):\n    query = f\"SELECT * FROM users WHERE id = {id}\"\n    return db.execute(query)",
  "language": "python",
  "review_focus": ["security", "best-practices"],
  "severity_threshold": "warning"
}

输出:

{
  "issues": [
    {
      "line": 2,
      "severity": "critical",
      "category": "security",
      "message": "SQL Injection vulnerability detected",
      "suggestion": "Use parameterized queries: db.execute('SELECT * FROM users WHERE id = ?', [id])"
    },
    {
      "line": 1,
      "severity": "warning",
      "category": "best-practices",
      "message": "Missing type hints for function parameters",
      "suggestion": "Add type hints: def get_user(id: int) -> dict:"
    }
  ],
  "summary": {
    "total_issues": 2,
    "critical_count": 1,
    "error_count": 0,
    "warning_count": 1,
    "info_count": 0
  },
  "overall_score": 45
}

注意事项

  • 代码内容最大 50KB
  • 支持 6 种主流编程语言
  • 安全问题优先级最高
  • 建议与 CI/CD 流程集成