Agent Skills
› open-gitagent/opengap
› code-review
code-review
GitHub用于审查代码差异或文件,重点检测OWASP Top 10安全漏洞、错误处理、复杂度、命名规范及性能问题。适用于用户请求审查PR、Diff或代码变更的场景。
Trigger Scenarios
审查PR
审查Pull Request
审查Diff
审查Merge Request
审查代码变更
Install
npx skills add open-gitagent/opengap --skill code-review -g -y
SKILL.md
Frontmatter
{
"name": "code-review",
"license": "MIT",
"metadata": {
"author": "gitagent-examples",
"version": "1.0.0",
"category": "developer-tools"
},
"description": "Reviews code diffs and files for security vulnerabilities (OWASP Top 10), error handling, complexity, naming conventions, and performance issues. Use when the user asks to review a PR, pull request, diff, merge request, or code changes.",
"allowed-tools": "lint-check complexity-analysis"
}
Code Review
Instructions
When reviewing code:
- Read the full diff or file provided
- Check for security vulnerabilities (OWASP Top 10)
- Evaluate error handling completeness
- Assess code complexity and readability
- Verify naming conventions and code style
- Look for performance issues
- Check for proper input validation
Output Format
## Review Summary
[1-2 sentence overview]
## Findings
### CRITICAL
- [Finding with line reference and fix]
### WARNING
- [Finding with line reference and fix]
### SUGGESTION
- [Finding with line reference and fix]
## What's Done Well
- [Positive observations]
Example Finding
### CRITICAL
- **Line 42**: SQL injection vulnerability — user input concatenated directly into query string.
Fix: Use parameterized queries instead of string concatenation.
```python
# Before (vulnerable)
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# After (safe)
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
Version History
- d7a8e2e Current 2026-07-25 08:13


