一键导入
code-review
Perform thorough code review with security, quality, and test coverage analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform thorough code review with security, quality, and test coverage analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build and publish Docker services to container registry (GHCR)
Run scientific and engineering computations using containerized services
Build and publish a new scientific computing service to GHCR. Use when the user wants to add a new package/service like ngspice, fenics, etc.
| name | code-review |
| description | Perform thorough code review with security, quality, and test coverage analysis |
| triggers | ["review.*(code|pr|pull)","check.*(code|quality)","audit","security.*review","code.*analysis"] |
Perform a comprehensive code review covering security, quality, and test coverage.
If reviewing a PR/diff: Focus on changed files
# Get list of changed files
search(command="glob", pattern="**/*.py") # or relevant extensions
If reviewing a directory: Identify key files
Create a review todo list:
{"todos": [
{"id": "scope", "content": "Define review scope", "status": "in_progress"},
{"id": "security", "content": "Security review", "task_type": "review", "depends_on": ["scope"]},
{"id": "quality", "content": "Code quality review", "depends_on": ["security"]},
{"id": "tests", "content": "Test coverage review", "depends_on": ["quality"]},
{"id": "report", "content": "Write review report", "depends_on": ["tests"], "produces": "file:_outputs/code_review.md"}
]}
Injection Vulnerabilities:
Authentication & Authorization:
Data Exposure:
Search patterns:
# Find potential SQL injection
search(command="grep", pattern="execute.*\\+|format.*SELECT|f\"SELECT")
# Find potential command injection
search(command="grep", pattern="subprocess|os.system|shell=True")
# Find hardcoded secrets
search(command="grep", pattern="password.*=.*[\"']|api_key.*=.*[\"']|secret.*=.*[\"']")
For thorough security review, use a sub-agent:
task(agent_name="reviewer", task="Security review of <files>. Check for: injection vulnerabilities, auth issues, data exposure, insecure dependencies. Report findings with file:line references.")
Code Clarity:
DRY Violations:
Error Handling:
Edge Cases:
Performance:
Check test existence:
search(command="glob", pattern="**/test_*.py|**/*_test.py|**/tests/*.py")
Assess coverage:
Test quality indicators:
assertTrue)Create _outputs/code_review.md with this structure:
# Code Review: [Scope]
**Reviewed:** [date]
**Files:** [count]
## Critical Issues
These MUST be fixed before merge:
- [ ] **[CRITICAL]** [file:line] - [Issue description]
- Impact: [What could go wrong]
- Fix: [Suggested fix]
## Warnings
Should be addressed:
- [ ] **[WARNING]** [file:line] - [Issue description]
- Why: [Reason this matters]
## Suggestions
Nice to have improvements:
- **[SUGGESTION]** [file:line] - [Improvement idea]
## Test Coverage
- [ ] Critical paths covered: [Yes/No]
- [ ] Edge cases tested: [Yes/No]
- [ ] Missing tests: [List]
## Positive Notes
What's done well:
- [Good practice 1]
- [Good practice 2]
## Summary
[Overall assessment and recommendation: Approve / Request Changes / Needs Discussion]