一键导入
quality-gates
This skill should be used when evaluating implementation quality before submission, checking correctness, security, and simplicity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill should be used when evaluating implementation quality before submission, checking correctness, security, and simplicity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Canonical algorithm for consuming DECISIONS_CONTEXT index — scan index, identify relevant entries, Read full bodies on demand, cite verbatim IDs inline.
This skill should be used when performing a code review to apply the standard 6-step review process.
This skill should be used when the user asks to "add accessibility", "check ARIA", "handle keyboard navigation", "add focus management", or creates UI components, forms, or interactive elements. Provides WCAG 2.2 AA patterns for keyboard navigation, ARIA roles and states, focus management, color contrast, and screen reader support.
Consumption algorithm for FEATURE_KNOWLEDGE variable — pre-computed feature context
This skill should be used when reviewing code for SOLID violations, tight coupling, or layering issues.
This skill should be used when the user asks to "validate input", "parse request data", "handle form data", "add Zod schema", "sanitize user input", or creates API endpoints and system boundaries. Provides parse-don't-validate patterns with schema validation for type-safe boundary enforcement and hostile input defense.
| name | quality-gates |
| description | This skill should be used when evaluating implementation quality before submission, checking correctness, security, and simplicity. |
| user-invocable | false |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash |
Systematic self-review for the Scrutinizer agent. Evaluate implementation against 9 pillars. Fix issues, don't just report them.
Based on Google Engineering Practices.
FIX BEFORE RETURNING
Self-review is not a report generator. It's a quality gate. If you find a P0 or P1 issue, you fix it. You only return when all critical issues are resolved. Pride in craftsmanship.
| Priority | Action | Pillars |
|---|---|---|
| P0 | MUST fix | Design, Functionality, Security |
| P1 | SHOULD fix | Complexity, Error Handling, Tests |
| P2 | FIX if time | Naming, Consistency, Documentation |
Does the implementation fit the architecture? Follows existing patterns, respects layer boundaries, dependencies injected.
If FEATURE_KNOWLEDGE is provided, verify implementation respects the feature area's documented architecture and anti-patterns. Flag deviations as P0-Design issues when the documented pattern is clearly intentional.
Does the code work? Happy path, edge cases (null, empty, boundary), no race conditions.
Any vulnerabilities? No injection, input validated, no hardcoded secrets, auth checked.
Understandable in 5 minutes? Functions < 50 lines, nesting < 4 levels, no magic numbers.
Errors handled explicitly? No swallowed exceptions, helpful messages, resources cleaned up.
New code tested? Covers happy path, errors, edges. Tests behavior, not implementation.
Names clear and descriptive? No cryptic abbreviations, consistent style.
Matches existing patterns? Same style, same conventions, no unnecessary divergence.
Will others understand? Complex logic commented, public APIs documented, no outdated comments.
// BAD: Direct DB in controller (violates layers)
class UserController {
async getUser(req, res) {
const user = await db.query('SELECT * FROM users WHERE id = ?', [req.params.id]);
}
}
// BAD: SQL injection
const query = `SELECT * FROM users WHERE email = '${email}'`;
// BAD: Missing auth
app.delete('/api/users/:id', async (req, res) => {
await deleteUser(req.params.id); // No auth check!
});
git diff --name-only HEAD~1
git diff HEAD~1
Check Design, Functionality, Security. If issues found and fixable, fix immediately. If unfixable, STOP and report blocker.
Check Complexity, Error Handling, Tests. Fix issues found.
Check Naming, Consistency, Documentation. Fix if time permits.
Document status of each pillar, fixes applied, and overall readiness.
## Self-Review Report
### P0 Pillars
- Design: PASS/FIXED
- Functionality: PASS/FIXED
- Security: PASS/FIXED
### P1 Pillars
- Complexity: PASS/FIXED
- Error Handling: PASS/FIXED
- Tests: PASS/FIXED
### P2 Pillars
- Naming: PASS/FIXED/SKIP
- Consistency: PASS/FIXED/SKIP
- Documentation: PASS/FIXED/SKIP
### Summary
Issues Found: {n}, Fixed: {n}
Status: READY / BLOCKED
For detailed checklists, examples, and red flags for each pillar:
references/patterns.md (9-pillar evaluation patterns and issue classification)references/violations.md (pillar-organized anti-patterns and P0/P1 red flags)For complete report templates and examples:
references/report-template.mdUsed by:
The self-review ensures implementations meet quality standards before external review, catching issues early.