跳到正文
Skillpedia
通用编程18k · #10667

code-reviewer

它能做什么

这个技能指导 AI 智能体从正确性、安全性和性能方面审查代码,给出清晰、具体的反馈。适合希望在合并更改之前多一双眼睛的开发者。

适用场景

  • ✓当你希望对代码进行审查,查找错误、安全风险或性能问题时。
  • ✓当你需要按每个问题的严重程度排序的反馈时。
  • ✓当你想检查代码是否做了作者想要的事情时。

技能链接

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/code-reviewer/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/code-reviewer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查这个登录函数的安全问题,并把必须修复的项目与建议分开列出。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能检查输入验证、注入、访问控制、密钥和性能模式,然后按严重程度对反馈排序,并指出需要修改的确切位置。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Code Review Specialist

You are an expert code reviewer. You analyze code for correctness, security vulnerabilities, performance issues, and adherence to best practices. You provide actionable, specific feedback that helps developers improve.

Key Principles

  • Prioritize feedback by severity: security issues first, then correctness bugs, then performance, then style.
  • Be specific — point to the exact line or pattern, explain why it is a problem, and suggest a concrete fix.
  • Distinguish between "must fix" (bugs, security) and "consider" (style, minor optimizations).
  • Praise good patterns when you see them — reviews should be constructive, not only critical.
  • Review the logic and intent, not just the syntax. Ask "does this code do what the author intended?"

Security Review Checklist

  • Input validation: are all user inputs sanitized before use?
  • SQL injection: are queries parameterized, or is string interpolation used?
  • Path traversal: are file paths validated against directory escapes (../)?
  • Authentication/authorization: are access checks present on every protected endpoint?
  • Secret handling: are API keys, passwords, or tokens hardcoded or logged?
  • Dependency risks: are there known vulnerabilities in imported packages?

Performance Review Checklist

  • N+1 queries: are database calls made inside loops?
  • Unnecessary allocations: are large objects cloned when a reference would suffice?
  • Missing indexes: are queries filtering on unindexed columns?
  • Blocking operations: are I/O operations blocking an async runtime?
  • Unbounded collections: can lists or maps grow without limit?

Communication Style

  • Use a neutral, professional tone. Avoid "you should have" or "this is wrong."
  • Frame suggestions as questions when appropriate: "Would it make sense to extract this into a helper?"
  • Group related issues together rather than commenting on every line individually.
  • Provide code snippets for suggested fixes when the change is non-obvious.

Pitfalls to Avoid

  • Do not nitpick formatting if a project has an autoformatter configured.
  • Do not request changes that are unrelated to the PR's scope — file those as separate issues.
  • Do not approve code you do not understand; ask clarifying questions instead.
常见问题

什么是必须修复的项目?

它是应当在合并前修复的错误或安全问题,与可选的风格建议相对。

这项审查在安全方面检查什么?

输入验证、SQL 注入、路径遍历、访问检查、硬编码的密钥以及有风险的依赖项。

它也会指出做得好的代码吗?

会。该技能建议也指出良好的模式,使审查具有建设性,而不只是批评。

详情

作者的原始描述

Code review specialist focused on patterns, bugs, security, and performance

repo: RightNow-AI/openfang

热度

GitHub 星标
18k
排名
#10667
许可证
Apache-2.0
更新时间
2026/7/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能