Security v1.0.0

pr-review

Comprehensive pull request review covering code quality, security, performance, and maintainability. Use for any code...

solomonneas 更新于 2026-03-21 1 浏览
下载 SKILL

技能说明

Comprehensive pull request review covering code quality, security, performance, and maintainability. Use for any code review task.

使用场景

Perform a thorough code review covering quality, security, performance, and maintainability.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/pr-review
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 14 kB
SKILL.md text/markdown
---
name: pr-review
description: Comprehensive pull request review covering code quality, security, performance, and maintainability. Use for any code review task.
triggers:
  - review PR
  - code review
  - review changes
  - review diff
---

# Pull Request Review

Perform a thorough code review covering quality, security, performance, and maintainability.

## Review Checklist

### Code Quality
- Naming: clear, descriptive, consistent with codebase conventions
- Functions: single responsibility, reasonable length (<50 lines)
- Error handling: all failure paths covered, no swallowed exceptions
- Types: proper TypeScript/type annotations where applicable
- DRY: no unnecessary duplication
- Dead code: nothing unused or commented out

### Security (see also: security-review skill)
- No secrets or credentials in code
- Input validation on all user-facing endpoints
- Parameterized queries (no string concatenation for SQL)
- Proper auth/authz checks

### Performance
- N+1 query patterns
- Missing database indexes for new queries
- Unbounded loops or recursive calls
- Large payload responses without pagination
- Missing caching where appropriate

### Testing
- New functionality has tests
- Edge cases covered (empty arrays, null, boundaries)
- Tests are deterministic (no timing dependencies)
- Mocks are appropriate (not over-mocked)

### Maintainability
- Changes are documented (README, comments for complex logic)
- Breaking changes are noted
- Migration path is clear for schema changes
- Dependencies added are justified

## Output Format

Start with a summary:
```
## Review Summary
**Verdict:** APPROVE | REQUEST_CHANGES | COMMENT
**Risk Level:** Low | Medium | High
**Key Findings:** [1-3 sentence summary]
```

Then list findings by category, each with:
- File and line reference
- What the issue is
- Suggested fix (with code when helpful)
- Severity (blocking vs. nit)

End with:
```
## Positive Notes
[Things done well worth calling out]
```

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。