afterlisted
Install: claude install-skill diguike/book-claude-skill
# Code Review
Review changed files and report issues by severity.
## Workflow
1. Run `git diff --name-only HEAD~1` to collect changed files
2. For each file, read the content and diff
3. Apply rules in order (stop-on-error for security):
- `rules/security.md` — MUST pass, any error blocks deployment
- `rules/performance.md` — warnings and errors
- `rules/style.md` — warnings only
4. Generate structured report (see output format below)
5. Log metrics: run `scripts/append-log.ts` with the results
## Output Format
```markdown
# Review: [branch-name]
## Summary
- Files: X | Issues: Y (E errors, W warnings)
## Security (rules/security.md)
| File | Line | Issue |
|------|------|-------|
## Performance (rules/performance.md)
| File | Line | Issue |
|------|------|-------|
## Style (rules/style.md)
| File | Line | Issue |
|------|------|-------|
```
## Configuration
Skip patterns: `*.test.ts`, `*.spec.ts`, `*.d.ts`, `*.min.js`
Max file size: 10000 lines (skip larger files)
## Constraints
- Do NOT auto-fix code — only report issues
- Do NOT send notifications — that is the CI pipeline's job
- Do NOT generate trend reports inline — use `scripts/trend-report.ts` separately
- Keep the report under 200 lines; link to files instead of quoting large blocks
## Rules
Rules are loaded from `rules/` directory:
- `rules/security.md` — injection, XSS, secrets, auth bypass
- `rules/performance.md` — N+1, bundle size, memory leaks, framework-specific
- `rules/style.md` — nam