一键导入
review-tests
Test quality review skill. Evaluates test validity, coverage thresholds, BDD scenario matching, edge cases, test structure, and error path testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Test quality review skill. Evaluates test validity, coverage thresholds, BDD scenario matching, edge cases, test structure, and error path testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Architecture adherence review skill. Evaluates component design, tech stack compliance, directory structure, SOLID principles, dependency direction, and scope discipline.
Dependency review skill. Checks for known CVEs, abandoned packages, unnecessary dependencies, license compatibility, version pinning, and supply chain integrity.
Documentation accuracy review skill. Compares .sdd/docs/ content against implementation for accuracy, completeness, and staleness.
Performance review skill. Detects N+1 queries, missing indexes, blocking in async contexts, unbounded data fetching, unnecessary computation, inefficient data structures, and missing caching opportunities.
Code quality review skill. Evaluates readability, complexity, naming, comments, error handling, style consistency, dead code, and duplication.
Security review skill. Audits implementation against all 14 OWASP Secure Coding Practices categories. Cross-references spec security requirements. Uses web research to verify unfamiliar patterns.
| name | review-tests |
| description | Test quality review skill. Evaluates test validity, coverage thresholds, BDD scenario matching, edge cases, test structure, and error path testing. |
| argument-hint | Invoked by Review Coordinator - do not call directly |
This skill is invoked by the Review Coordinator as a subagent. It evaluates all test files associated with a WP across 6 quality dimensions, checking that tests exercise real behavior and meet coverage thresholds.
Input contract (received via subagent prompt):
Constraint: Do NOT modify any test files, source code, WP file, or spec file. Only write to the specified output path (FR-028).
Before evaluating, identify all test files for this WP:
tests/, test/, __tests__/, or spec/ directoriesTest requirements fields to identify expected test types (unit, integration, BDD, E2E, none)assert True, assertTrue(True), or equivalent vacuous assertions?pass, ..., or a docstring)?assert, expect, should, or equivalent)?Detection patterns (adapt for the project's language):
assert True, self.assertTrue(True), def test_*(): pass, def test_*(): ...expect(true).toBe(true), it('...', () => {}), test('...', () => {})# pragma: no cover, /* istanbul ignore */, or equivalent exclusions?If coverage tooling is configured: read existing coverage reports (e.g., htmlcov/, coverage.xml, .coverage, lcov.info, coverage/lcov-report/) and report actual thresholds found in the reports. If no reports exist, check the coverage configuration (e.g., pytest-cov in pyproject.toml, .coveragerc, jest --coverage in package.json, .nycrc) and flag as WARN - "Coverage tooling is configured but no coverage reports found. Cannot verify thresholds." Do NOT execute test runners or coverage tools (NFR-004: static analysis only).
If coverage tooling is NOT configured: flag as WARN - "No coverage tooling configured. Cannot verify thresholds."
assert True, empty test bodies, no assertions, mocking entire subject under testUse N/A with justification when a checklist dimension does not apply to this WP. Example justifications:
Write findings to the specified output path using the format below. Finding IDs use the TEST- prefix.
---
skill: review-tests
wp: <WP-ID>
spec: <spec-path>
reviewed_at: <ISO-8601-timestamp>
status: completed
finding_counts:
pass: <count>
warn: <count>
fail: <count>
na: <count>
files_reviewed:
- <test-file-1>
- <test-file-2>
- <source-file-checked-for-coverage>
---
# review-tests Findings for <WP-ID>
## Summary
<Brief overview: number of test files reviewed, test count, overall test quality assessment.>
## Findings
### TEST-001 [FAIL]
- **Checklist item**: Test Validity - Vacuous test
- **Requirement**: FR-040 dimension 1
- **File**: tests/test_users.py#L25-L28
- **Description**: Test `test_user_creation` contains only `assert True`.
- **Expected**: Test should assert specific behavior of the user creation function.
- **Evidence**:
```python
def test_user_creation():
assert True
test_1 has a non-descriptive name.test_parse_config_returns_default_on_missing_key.def test_1():