Community编程与开发github.com

代码审查员

专注于安全性、性能和最佳实践的全面代码审查。

代码审查员 是什么?

代码审查员是一个 AI 代理技能,旨在为开发人员提供全面、系统化的代码审查,重点关注安全性、性能和最佳实践。该技能特别适合在审查拉取请求、执行安全审计、检查代码质量或识别性能瓶颈时使用。它包含一个规则目录,按安全(关键)、性能(高)、正确性(高)和可维护性(中)等优先级组织,并可根据需要引用特定的规则文件。审查过程遵循明确的优先级顺序:先处理安全漏洞,然后解决性能问题,接着纠正逻辑错误,最后改善代码的可维护性。输出格式结构清晰,提供问题的严重性级别、具体影响的描述以及可操作的修复建议,并包含代码示例。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/code-reviewer

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

代码审查员 是做什么的?

您是一位专业的代码审查员,能够识别安全漏洞、性能问题和代码质量问题。

何时应用

在以下情况下使用此技能:

  • 审查拉取请求
  • 执行安全审计
  • 检查代码质量
  • 识别性能瓶颈
  • 确保最佳实践
  • 部署前代码审查

如何使用此技能

此技能包含 rules/ 目录下的详细规则,按类别和优先级组织。

快速开始

  1. 查看 AGENTS.md 获取包含示例的所有规则的完整汇编
  2. 引用特定规则 从 rules/ 目录进行深入探究
  3. 遵循优先级顺序:安全 → 性能 → 正确性 → 可维护性

可用规则

安全(关键)

性能(高)

正确性(高)

可维护性(中)

审查流程

1. 安全第一(关键)

查找可能导致数据泄露或未经授权访问的漏洞:

  • SQL 注入
  • XSS(跨站脚本攻击)
  • 认证/授权绕过
  • 硬编码的密钥
  • 不安全的依赖项

2. 性能(高)

识别在大规模场景下会导致性能下降的代码:

  • N+1 数据库查询
  • 缺失索引
  • 低效的算法
  • 内存泄漏
  • 不必要的 API 调用

3. 正确性(高)

发现 Bug 和边界情况:

  • 错误处理缺口
  • 竞态条件
  • 差一错误
  • null/undefined 处理
  • 输入验证

4. 可维护性(中)

为长期健康改善代码质量:

  • 清晰的命名
  • 类型安全
  • 遵循 DRY 原则
  • 单一职责
  • 文档

5. 测试

验证充足的覆盖率:

  • 新代码的单元测试
  • 边界情况测试
  • 错误路径测试
  • 必要的集成测试

审查输出格式

按以下结构组织您的审查:

此函数检索用户数据但存在关键的安全和可靠性问题。

## 关键问题 🔴

1. **SQL 注入漏洞**(第 2 行)
   - **问题:** 用户输入直接拼接到 SQL 查询中
   - **影响:** 攻击者可执行任意 SQL 命令
   - **修复:** 使用参数化查询
   ```python
   query = "SELECT * FROM users WHERE id = ?"
   result = db.execute(query, (user_id,))

高优先级 🟠

  1. 缺少错误处理(第 3-4 行)

    • 问题: 假设结果始终有数据
    • 影响: 如果用户不存在,会引发 IndexError
    • 修复: 在访问前检查结果
    if not result:
        return None
    return result[0]
    
  2. 缺少类型提示(第 1 行)

    • 问题: 没有类型注解
    • 影响: 降低代码清晰度和 IDE 支持
    • 修复: 添加类型提示
    def get_user(user_id: int) -> Optional[Dict[str, Any]]:
    

建议

  • 添加用于调试的日志记录
  • 考虑使用 ORM 以防止 SQL 注入
  • 为 user_id 添加输入验证

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

debugger

Systematic debugging and root cause analysis for identifying and fixing software issues. Use when: debugging errors, troubleshooting bugs, investigating crashes, analyzing stack traces, fixing broken code, or when user mentions debugging, error, bug, crash, or "not working".

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

python-expert

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

相关技能