Claude Code Plugins

Community-maintained marketplace

Feedback

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

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name code-review
version 1.0.0
description 分析代码质量并提供改进建议
author ExoProtocolDemo
pricing [object Object]
runtime [object Object]
io [object Object]
annotations [object Object]

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 流程集成