Process
Always run the three passes in order. Findings flow into one combined verdict.
1. Read the rules
Before any pass, internalise the language-rule skill that matches the diff (python-conventions, go-conventions, solidity-conventions, …) and engineering-philosophy. The rule skills are the source of truth — don't invent additional standards.
2. See the change
git diff <base>...HEAD
git log <base>..HEAD --oneline
For a GitHub PR:
gh pr view <N>
gh pr diff <N>
3. Pass 1 — Code quality
Check, in order:
- Philosophy violations — over-engineering (KISS, YAGNI), duplication (DRY), magic behaviour (No Magic), copy-paste-modified blocks.
- SOLID violations — Single Responsibility first; flag classes/files that grew a second responsibility.
- Naming, readability, complexity — function lengths, parameter lists, deeply nested conditionals, clever one-liners that hide intent.
- Test coverage — was the change tested? If TDD discipline applied, was the failing test committed first?
- Tooling compliance — ruff/mypy strict for Python, golangci-lint for Go, solhint:all for Solidity, forge fmt --check for Solidity formatting.
- Configuration safety — production timeouts, connection pools, missing retries, missing rate limits.
4. Pass 2 — Security audit
Check, in order, against OWASP Top 10:
- Injection — SQL, command, LDAP, template, header injection via unsanitised input.
- Broken authentication — weak token handling, missing MFA, fragile session management.
- Broken access control — missing authz checks, privilege escalation, IDOR (insecure direct object reference).
- Sensitive data exposure — secrets in logs, error messages, or response bodies; missing TLS; weak ciphers.
- Misconfiguration — overly permissive CORS, missing security headers, debug endpoints exposed.
- Vulnerable components —
pip-audit / npm audit / govulncheck / dep CVEs.
- XSS — unencoded output rendered as HTML/JS; missing CSP.
- Insecure deserialisation —
pickle.loads on untrusted input, similar in JS/Java.
- Insufficient logging and monitoring — security-relevant events not logged, no alerting.
- Cryptographic issues — weak algorithms, hardcoded keys, missing key rotation, predictable IVs.
- Smart-contract specific (if Solidity) — reentrancy, integer over/underflow, unchecked external calls, access control on
onlyOwner-style modifiers, front-running, MEV exposure, signature replay.
See reference/owasp-checklist.md for the canonical mapping with attack-vector notes.
5. Pass 3 — Architecture consistency
- Architecture map — does the diff respect the
docs/architecture.md (or equivalent) responsibility split? See reference/architecture-map-pattern.md.
- Layer violations — dependencies pointing the wrong way (e.g., domain importing infrastructure).
- Boundary erosion — public methods sneaking into private packages; circular dependencies.
- Missing abstractions — same logic implemented twice with minor variations.
- Custom code where a library exists — flag reinvented validators, parsers, ORMs, retry logic, etc.
- Pattern compliance — clean architecture / DDD bounded contexts, only when the project documents a pattern.
Output
## Quality Gate Summary
| Review | Verdict | Critical | Major | Minor |
|--------------|----------------|----------|-------|-------|
| Code | pass/warn/fail | N | N | N |
| Security | pass/warn/fail | N | N | N |
| Architecture | pass/warn/fail | N | N | N |
**Overall**: PASS / NEEDS WORK / FAIL
### Action items
1. <Critical/Major items, ordered>
For each individual finding:
- Rule — which rule was violated (with the language-rule skill or engineering-philosophy reference) or "best practice" if no codified rule.
- Severity — Critical / Major / Minor.
- Location —
file:line.
- Issue — what's wrong and (for security) the attack vector.
- Fix — concrete suggestion, with a short code example when it clarifies the change.
Behavioural traits
- Constructive, educational tone. Teach; don't just flag.
- Specific, actionable feedback. "This is too complex" without a fix is useless.
- Severity matches reality. Critical for "this could ship a bug or a CVE today"; Major for "this will hurt within six months"; Minor for style and polish.
- Practical over theoretical security risks. If an attack requires three impossible preconditions, mark Minor.
- Defence in depth. Multiple weak controls beat one perfect control.
- Read-only. This skill never edits the diff itself; it reports.
Cross-references
running-tdd-cycles — preceding workflow; review confirms TDD discipline.
committing-changes — commit-message + branch hygiene checks fold into the code-quality pass.
python-conventions / go-conventions / solidity-conventions — the language rule the diff is being checked against.
engineering-philosophy — KISS, YAGNI, DRY, SOLID weights for code-quality and architecture passes.
Reference
- reference/code-reviewer-agent.md — original Claude-Code code-reviewer agent verbatim (model: opus).
- reference/security-auditor-agent.md — original Claude-Code security-auditor agent verbatim (model: opus).
- reference/architect-review-agent.md — original Claude-Code architect-review agent verbatim (model: opus).
- reference/owasp-checklist.md — canonical OWASP Top 10 mapping with attack vectors and fix patterns.
- reference/architecture-map-pattern.md — the optional
docs/architecture.md convention this skill expects.
1---2name: reviewing-changes3description: Process4---56## Process78Always run the three passes in order. Findings flow into one combined verdict.910### 1. Read the rules1112Before any pass, internalise the language-rule skill that matches the diff (python-conventions, go-conventions, solidity-conventions, …) and engineering-philosophy. The rule skills are the source of truth — don't invent additional standards.1314### 2. See the change1516```17git diff <base>...HEAD18git log <base>..HEAD --oneline19```2021For a GitHub PR:2223```24gh pr view <N>25gh pr diff <N>26```2728### 3. Pass 1 — Code quality2930Check, in order:3132- **Philosophy violations** — over-engineering (KISS, YAGNI), duplication (DRY), magic behaviour (No Magic), copy-paste-modified blocks.33- **SOLID violations** — Single Responsibility first; flag classes/files that grew a second responsibility.34- **Naming, readability, complexity** — function lengths, parameter lists, deeply nested conditionals, clever one-liners that hide intent.35- **Test coverage** — was the change tested? If TDD discipline applied, was the failing test committed first?36- **Tooling compliance** — ruff/mypy strict for Python, golangci-lint for Go, solhint:all for Solidity, forge fmt --check for Solidity formatting.37- **Configuration safety** — production timeouts, connection pools, missing retries, missing rate limits.3839### 4. Pass 2 — Security audit4041Check, in order, against OWASP Top 10:4243- **Injection** — SQL, command, LDAP, template, header injection via unsanitised input.44- **Broken authentication** — weak token handling, missing MFA, fragile session management.45- **Broken access control** — missing authz checks, privilege escalation, IDOR (insecure direct object reference).46- **Sensitive data exposure** — secrets in logs, error messages, or response bodies; missing TLS; weak ciphers.47- **Misconfiguration** — overly permissive CORS, missing security headers, debug endpoints exposed.48- **Vulnerable components** — `pip-audit` / `npm audit` / `govulncheck` / dep CVEs.49- **XSS** — unencoded output rendered as HTML/JS; missing CSP.50- **Insecure deserialisation** — `pickle.loads` on untrusted input, similar in JS/Java.51- **Insufficient logging and monitoring** — security-relevant events not logged, no alerting.52- **Cryptographic issues** — weak algorithms, hardcoded keys, missing key rotation, predictable IVs.53- **Smart-contract specific (if Solidity)** — reentrancy, integer over/underflow, unchecked external calls, access control on `onlyOwner`-style modifiers, front-running, MEV exposure, signature replay.5455See `reference/owasp-checklist.md` for the canonical mapping with attack-vector notes.5657### 5. Pass 3 — Architecture consistency5859- **Architecture map** — does the diff respect the `docs/architecture.md` (or equivalent) responsibility split? See `reference/architecture-map-pattern.md`.60- **Layer violations** — dependencies pointing the wrong way (e.g., domain importing infrastructure).61- **Boundary erosion** — public methods sneaking into private packages; circular dependencies.62- **Missing abstractions** — same logic implemented twice with minor variations.63- **Custom code where a library exists** — flag reinvented validators, parsers, ORMs, retry logic, etc.64- **Pattern compliance** — clean architecture / DDD bounded contexts, only when the project documents a pattern.6566## Output6768```69## Quality Gate Summary7071| Review | Verdict | Critical | Major | Minor |72|--------------|----------------|----------|-------|-------|73| Code | pass/warn/fail | N | N | N |74| Security | pass/warn/fail | N | N | N |75| Architecture | pass/warn/fail | N | N | N |7677**Overall**: PASS / NEEDS WORK / FAIL7879### Action items801. <Critical/Major items, ordered>81```8283For each individual finding:8485- **Rule** — which rule was violated (with the language-rule skill or engineering-philosophy reference) or "best practice" if no codified rule.86- **Severity** — Critical / Major / Minor.87- **Location** — `file:line`.88- **Issue** — what's wrong and (for security) the attack vector.89- **Fix** — concrete suggestion, with a short code example when it clarifies the change.9091## Behavioural traits9293- Constructive, educational tone. Teach; don't just flag.94- Specific, actionable feedback. "This is too complex" without a fix is useless.95- Severity matches reality. Critical for "this could ship a bug or a CVE today"; Major for "this will hurt within six months"; Minor for style and polish.96- Practical over theoretical security risks. If an attack requires three impossible preconditions, mark Minor.97- Defence in depth. Multiple weak controls beat one perfect control.98- Read-only. This skill never edits the diff itself; it reports.99100## Cross-references101102- `running-tdd-cycles` — preceding workflow; review confirms TDD discipline.103- `committing-changes` — commit-message + branch hygiene checks fold into the code-quality pass.104- `python-conventions` / `go-conventions` / `solidity-conventions` — the language rule the diff is being checked against.105- `engineering-philosophy` — KISS, YAGNI, DRY, SOLID weights for code-quality and architecture passes.106107## Reference108109- [reference/code-reviewer-agent.md](reference/code-reviewer-agent.md) — original Claude-Code code-reviewer agent verbatim (model: opus).110- [reference/security-auditor-agent.md](reference/security-auditor-agent.md) — original Claude-Code security-auditor agent verbatim (model: opus).111- [reference/architect-review-agent.md](reference/architect-review-agent.md) — original Claude-Code architect-review agent verbatim (model: opus).112- [reference/owasp-checklist.md](reference/owasp-checklist.md) — canonical OWASP Top 10 mapping with attack vectors and fix patterns.113- [reference/architecture-map-pattern.md](reference/architecture-map-pattern.md) — the optional `docs/architecture.md` convention this skill expects.