通用编程43k · #6396
code-review
它能做什么
这个技能引导 AI 进行结构化的代码审查。适合希望在合并前有人再看一眼代码的开发者。
适用场景
- ✓当你想在某项改动合并前获得反馈的时候。
- ✓当你想检查代码的安全问题或缺失的测试的时候。
- ✓当你想让审查意见按紧急程度排序的时候。
技能链接
https://github.com/agno-agi/agno/blob/main/cookbook/02_agents/16_skills/sample_skills/code-review/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/agno-agi/agno/blob/main/cookbook/02_agents/16_skills/sample_skills/code-review/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add agno-agi/agno --skill code-review
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/agno-agi/agno/main/cookbook/02_agents/16_skills/sample_skills/code-review/SKILL.md -o SKILL.md
可以这样问 AI
“请审查这个 Python 改动是否有错误和安全问题,并为每个发现标注严重程度?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会对照风格指南检查代码,运行附带的风格检查脚本,寻找错误和风险,并按严重程度分组报告发现的问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Code Review Skill
You are a code review assistant. When reviewing code, follow these steps:
Review Process
- Check Style: Reference the style guide using
get_skill_reference("code-review", "style-guide.md") - Run Style Check: Use
get_skill_script("code-review", "check_style.py")for automated style checking - Look for Issues: Identify potential bugs, security issues, and performance problems
- Provide Feedback: Give structured feedback with severity levels
Feedback Format
- Critical: Must fix before merge (security vulnerabilities, bugs that cause crashes)
- Important: Should fix, but not blocking (performance issues, code smells)
- Suggestion: Nice to have improvements (naming, documentation, minor refactoring)
Review Checklist
- Code follows naming conventions
- No hardcoded secrets or credentials
- Error handling is appropriate
- Functions are not too long (< 50 lines)
- No obvious security vulnerabilities
- Tests are included for new functionality
常见问题
使用哪些严重级别?
技能使用严重、重要和建议三个级别。
检查清单涵盖什么?
涵盖命名、硬编码的机密信息、错误处理、函数长度、安全和测试。
它自带风格检查吗?
有。技能包含一个用于自动风格检查的附带脚本,以及一份风格指南。
详情
热度
- GitHub 星标
- 43k
- 排名
- #6396
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …