技能版本 1.0.0
code-review
代码审查清单、PR审查模式和反馈模板。当用户要求“审查这段代码”、“代码审查清单”、“PR审查模板”、“审查最佳实践”、“撰写审查反馈”或任何代码审查任务时使用。
价格
免费
- 安装:免费
在组织开通时一次性收取;再次读取清单或下载不重复收费。
以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。
如何使用
为组织安装
开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。
创建凭证
客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:
Authorization: Bearer $ZGI_MARKET_KEY读取清单与安装包
清单列出版本、文件和校验值;安装包是一个 zip 文件。
读取清单 curl "https://market-api.zgi.im/v1/market/skills/1mangesh1-code-review-9eba59c9/manifest" \ -H "Authorization: Bearer $ZGI_MARKET_KEY"下载安装包 curl "https://market-api.zgi.im/v1/market/skills/1mangesh1-code-review-9eba59c9/package" \ -H "Authorization: Bearer $ZGI_MARKET_KEY" \ -o 1mangesh1-code-review-9eba59c9.zip读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。
技能说明
- 名称
- code-review
- 说明
- Code review checklists, PR review patterns, feedback techniques, and review automation. Use when user asks to "review this code", "code review checklist", "PR review template", "review best practices", "write review feedback", "review this PR", "how to give feedback on code", "PR too large", "split this PR", "review turnaround time", "automated code review", "CODEOWNERS", "pair review", "when to request changes", "code review tool", "review security", "design review", "performance review", "test coverage review", or any code review and feedback tasks.
会运行代码PythonShell
技能包内含脚本文件,加载技能的运行时可能会执行它们,安装前请先阅读。
SKILL.md 节选
# Code Review Checklists, patterns, feedback techniques, and automation for effective code reviews. --- ## Review Checklist by Category ### Logic and Correctness - [ ] Does the code do what the PR description says it does? - [ ] Are edge cases handled (empty inputs, boundary values, concurrent access)? - [ ] Are error conditions handled gracefully with appropriate error types? - [ ] Are there off-by-one errors in loops, slices, or pagination? - [ ] Are null/undefined/nil cases handled? - [ ] Does the control flow match the intended behavior (early returns, fallthrough)? ### Security - [ ] No hardcoded secrets, keys, tokens, or passwords - [ ] Input validation on all user-supplied data (query params, body, headers) - [ ] No SQL injection, XSS, or command injection vectors - [ ] Authentication and authorization checks on every endpoint - [ ] Sensitive data not logged, not in error messages, not exposed in responses - [ ] CSRF protection on state-changing requests - [ ] Rate limiting on sensitive endpoints (auth, password reset) ### Performance - [ ] No N+1 database queries (queries inside loops) - [ ] No memory leaks (event listeners, timers, subscriptions not cleaned up) - [ ] Large datasets paginated, not loaded entirely into memory - [ ] Expensive computations cached where appropriate - [ ] No blocking operations on the main thread or event loop - [ ] Database queries use indexes (check EXPLAIN plans for new queries) ### Readability and Maintainability - [ ] Code is understandable without needing the author to explain it - [ ] Functions have a single responsibility and a clear name - [ ] No duplicated logic (DRY where it reduces coupling, not blindly) - [ ] Naming conventions are consistent with the codebase - [ ] No dead code, commented-out code, or unused imports - [ ] Complex logic has comments explaining why, not what ### Testing - [ ] Tests cover the primary success path - [ ] Edge cases and error paths tested - [ ] Tests are deterministic (no flaky tests introduced) - [ ] Test names describe the behavior, not the implementation - [ ] Mocks are minimal and realistic --- ## How to Give Constructive Feedback The praise sandwich is patronizing and everyone sees through it. Be direct and kind. Critique the code, not the person. ### Principles - Be specific. "This will throw if `user` is null on line 42" beats "handle errors better." - Explain the why. Don't just say what to change -- explain the risk or benefit. - Offer alternatives. If you flag a problem, suggest a solution or direction. - Acknowledge tradeoffs. If a shortcut is reasonable given constraints, say so. - Ask genuine questions. "What's the reasoning for X?" is valid when you don't understand. ### Prefixed Comments ``` [nit] Minor style issue, take or leave [suggestion] Optional improvement idea [question] Seeking understanding, not necessarily a change [issue] Must be addressed before merge [praise] Something done well worth calling out [thought] Sharing context or perspective, no action needed ``` ### Direct Feedback Examples ``` Instead of: "This is wrong" Write: "This will fail when `items` is empty because `items[0]` returns undefined." Instead of: "Why did you do it this way?" Write: "Was there a performance reason for the manual loop? Array.filter would be more readable." Instead of: "This is bad code" Write: "This function handles validation, transformation, and persistence. Splitting would make each testable independently." ``` --- ## PR Size Guidelines ``` Small (< 200 lines changed) -> Review in 15-30 min. Ideal size. Medium (200-400 lines) -> Review in 30-60 min. Acceptable. Large (400-800 lines) -> Consider splitting. Very large (> 800 lines) -> Should almost always be split. ``` ### When to Split - Refactoring mixed with feature changes. Ship the refactor first. - Infrastructure changes mixed with business logic. - Database migrations with application code. Migrate first, then use. - Multiple independent features or fixes bundled together. ### When Large PRs Are Acceptable
SKILL.md 不止这些内容,安装后可阅读全文。
技能包内容
共 12 个文件,合计 47.0 KiB
- SKILL.md14.1 KiB
- examples/CODE-REVIEW-EXAMPLES.md3.1 KiB
- examples/pr-review-example.json933 B
- references/CODE-PATTERNS.md2.9 KiB
- references/CODE-REVIEW-GUIDE.md4.2 KiB
- references/anti-patterns.md1.5 KiB
- references/checklists.md2.8 KiB
- references/review-guide.md2.3 KiB
- scripts/code-review-analyzer.py9.5 KiB
- scripts/pr-template-enforcer.sh2.3 KiB
- scripts/review-checklist.sh1.3 KiB
- scripts/review-comments.py2.1 KiB
来源与审核
- 审核状态
- 尚未审核,内容来自上游来源
- 许可证
- 未说明
审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。