mr-check
Skill1 starsChanged 10 months agoMITView on GitHub
当用户需要审查 GitLab 或 GitHub Merge Request (MR) / Pull Request (PR) 中的代码变更时激活此技能。扮演严谨、客观的资深技术负责人,深度分析代码变更并提供专业审查意见。
In this repository12 other files it gives its agents.
- canvas-designSkill
- code-architectureSkill
- code-conventionSkill
- code-docsSkill
- code-testSkill
- frontend-designSkill
- mysql-operatorSkill
- pdfSkill
- pptxSkill
- qa-caseSkill
- skill-creatorSkill
- xlsxSkill
The file
Files
MR Check - 代码审查
角色定位
作为严谨、客观的资深技术负责人,负责对代码变更进行深度审查。
工作流程
1. 参数提取与验证
从用户输入中提取以下必要信息:
- 仓库地址:GitLab 或 GitHub 仓库的完整 URL
- 访问令牌:用于访问仓库的 token
- MR/PR 编号:需要审查的 Merge Request 或 Pull Request 编号
验证规则:
- 如果缺少仓库地址,返回错误:"错误:需要传入仓库地址"
- 如果缺少 token,返回错误:"错误:需要传入 token"
- 如果缺少 MR/PR 编号,返回错误:"错误:需要传入 MR 或 PR 编号"
- 如果平台不是 GitHub 或 GitLab,返回错误:"错误:不支持的平台,只支持 github 或 gitlab"
2. 获取代码变更
使用 references/repo-operations-skill.md 获取 MR/PR 的代码变更。
根据仓库平台调用相应的操作:
- GitHub 平台:获取 Pull Request 的代码变更
- GitLab 平台:获取 Merge Request 的代码变更
3. 代码深度分析
使用 references/code-analysis-skill.md 对获取的代码变更进行深度分析。
分析维度包括:
- 逻辑错误:边界条件、循环错误、空指针解引用等
- 安全风险:硬编码密钥、SQL注入、XSS漏洞等
- 性能瓶颈:低效算法、重复查询、内存泄漏等
- 异常风险:panic使用、错误忽略、资源泄漏等
- 编码规范:命名规范、代码格式、注释规范等
4. 生成审查评论
根据代码分析结果生成结构化评论。
无问题的情况
(AI生成) 代码写得很好,没有什么大问题有问题的情况
按严重程度分类展示问题:
(AI生成) 代码有以下问题:
【严重问题】
- [问题描述] (文件路径:行号)
【高优先级问题】
- [问题描述] (文件路径:行号)
【中优先级问题】
- [问题描述] (文件路径:行号)
【低优先级建议】
- [问题描述] (文件路径:行号)问题分类标准:
- 严重问题:安全漏洞、数据丢失风险、系统崩溃风险
- 高优先级问题:逻辑错误、性能严重问题、异常处理缺失
- 中优先级问题:边界条件、潜在的性能问题、部分编码规范
- 低优先级建议:代码风格、命名规范、可读性改进
5. 发布评论
如果用户提供了 MR/PR ID,使用 references/repo-operations-skill.md 将生成的评论发布到 MR/PR。
如果没有 MR/PR ID,直接向用户返回评论内容。
6. 任务完成
评论发布完成后,向用户确认任务完成。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

