بنقرة واحدة
code-review
Systematic code review patterns covering security, performance, maintainability, correctness, and testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Systematic code review patterns covering security, performance, maintainability, correctness, and testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | code-review |
| description | Systematic code review patterns covering security, performance, maintainability, correctness, and testing |
| trigger | /hbe:review |
| keywords | ["code review","代码审查","quality check","质量检查","PR review"] |
| model | reasoning |
| category | testing |
| version | 1 |
Thorough, structured approach to reviewing code. Work through each dimension systematically rather than scanning randomly.
npx clawhub@latest install code-review
| Dimension | Focus | Priority |
|---|---|---|
| Security | Vulnerabilities, auth, data exposure | Critical |
| Performance | Speed, memory, scalability bottlenecks | High |
| Correctness | Logic errors, edge cases, data integrity | High |
| Maintainability | Readability, structure, future-proofing | Medium |
| Testing | Coverage, quality, reliability of tests | Medium |
| Accessibility | WCAG compliance, keyboard nav, screen readers | Medium |
| Documentation | Comments, API docs, changelog entries | Low |
Review every change for these vulnerabilities:
dangerouslySetInnerHTML or equivalent is justified and safeWork through the code in three passes. Do not try to catch everything in one read.
| Pass | Focus | Time | What to Look For |
|---|---|---|---|
| First | High-level structure | 2-5 min | Architecture fit, file organization, API design, overall approach |
| Second | Line-by-line detail | Bulk | Logic errors, security issues, performance problems, edge cases |
| Third | Edge cases & hardening | 5 min | Failure modes, concurrency, boundary values, missing tests |
Classify every comment by severity so the author knows what blocks merge.
| Level | Label | Meaning | Blocks Merge? |
|---|---|---|---|
| Critical | [CRITICAL] | Security vulnerability, data loss, or crash in production | Yes |
| Major | [MAJOR] | Bug, logic error, or significant performance regression | Yes |
| Minor | [MINOR] | Improvement that would reduce future maintenance cost | No |
| Nitpick | [NIT] | Style preference, naming suggestion, or trivial cleanup | No |
Always prefix your review comment with the severity label. This removes ambiguity about what matters.
Bad:
This is wrong. Fix it.
Good:
[MAJOR]This query interpolates user input directly into the SQL string (line 42), which is vulnerable to SQL injection. Consider using a parameterized query:SELECT * FROM users WHERE id = $1
Bad:
Why didn't you add tests?
Good:
[MINOR]The newcalculateDiscount()function has a few branching paths — could we add tests for the zero-quantity and negative-price edge cases to prevent regressions?
Bad:
I would have done this differently.
Good:
[NIT]This works well. An alternative approach could be extracting the retry logic into a sharedwithRetry()wrapper — but that's optional and could be a follow-up.
Avoid these common traps that waste time and damage team trust:
| Anti-Pattern | Description |
|---|---|
| Rubber-Stamping | Approving without reading. Creates false confidence and lets bugs through. |
| Bikeshedding | Spending 30 minutes debating a variable name while ignoring a race condition. |
| Blocking on Style | Refusing to approve over formatting that a linter should enforce automatically. |
| Gatekeeping | Requiring your personal preferred approach when the submitted one is correct. |
| Drive-by Reviews | Leaving one vague comment and disappearing. Commit to following through. |
| Scope Creep Reviews | Requesting unrelated refactors that should be separate PRs. |
| Stale Reviews | Letting PRs sit for days. Review within 24 hours or hand off to someone else. |
| Emotional Language | "This is terrible" or "obviously wrong." Critique the code, not the person. |
MiniHES 后端开发规范。当用户进行 FastAPI 后端开发、API 设计、数据库操作、 DLMS 协议实现、数据采集任务开发时自动激活。 涵盖分层架构、编码原则、安全要求、数据库规范。
MiniHES 代码审查。当用户请求审查代码、review PR、检查变更时激活。 支持本地变更审查和指定文件审查,输出结构化审查报告。 引用 backend-checklist.md 和 frontend-checklist.md 作为审查依据。
修复代码格式和 lint 问题。当用户在提交前需要修复代码风格、 排查 lint 错误、或说 "fix"、"格式化"、"lint" 时激活。
MiniHES 前端开发规范。当用户进行 Vue 3 前端开发、组件设计、 页面布局、样式调整时自动激活。 涵盖技术栈、组件设计原则、设计规范、Ant Design Vue 用法。
Distills iteration lessons, categorizes them, and injects them into the most relevant Skill.md files with deduplication.
创建 Pull Request。当用户说 "创建 PR"、"提 PR"、"提交合并请求" 时激活。 确保遵循 conventional commit、模板规范、安全护栏。