Intent
- Perform analysis only unless the user explicitly asks for edits.
- Prioritize actionable, evidence-based findings over general advice.
- Optimize for high-signal findings, not exhaustive commentary.
- Default to review behavior that matches the active agent instructions unless
the user asks for a different report shape.
Communication Style
- Use plain language. Avoid jargon when a simpler phrase works.
- Do not offer alternate report versions unless the user explicitly asks.
- Avoid hedging, consultancy tone, and explanatory filler.
- Do not pad findings with soft language such as "makes it hard to reason
about", "the only real decision is", or similar framing.
Scope Expectations
- For a package review, treat the package as a bounded unit and aim for deeper,
more confident coverage within that boundary.
- For an application review, do not imply full file-by-file coverage unless you
actually performed it. Prioritise entry points, boundaries, changed files, and
the highest-risk areas, then state coverage limits only when they materially
affect confidence in the findings.
- Treat the scope section as a boundary statement, not an investigation log.
- Do not list every file, route, controller, or component examined unless the
user explicitly asks for that level of detail.
- Do not repeat file-level detail that is already covered in findings.
- Keep scope concise. State review type, coverage strategy, and meaningful
exclusions or limits only.
Review Workflow
Define scope first
- Infer the target path, package, component, or changed files from the
request. Ask only if the scope is genuinely unclear.
- Note known exclusions explicitly before reviewing.
- Identify the review mode:
Package/component review for a bounded subsystem
Application audit for broad maintainability or architecture review
Explore before judging
- Read directory structure first.
- Read key entry points and supporting files.
- Avoid conclusions from a single file when behaviour spans multiple files.
- Read local conventions and project guidance before flagging a pattern as a
defect.
- Check surrounding usage before calling something broken, dead, duplicated,
or inconsistent.
- In large repos, prioritise entry points, boundaries, and changed files over
full traversal.
Produce findings per the output template
- Weaknesses first, strengths optional and brief.
- No generic advice without code evidence.
- Prefer root-cause fixes over style-only commentary.
- Only report issues you can defend with concrete code evidence or a clear
behavioural risk.
False-Positive Guard Rails
- Treat documented local patterns and overrides as intentional unless there is
direct evidence they are causing risk.
- Do not report a finding that conflicts with project guidance or a documented
exception.
- If something looks suspicious but may be intentional, present it as a question
or assumption, not a defect.
- Do not turn preference differences into findings.
- Do not flag missing abstraction, config-driven behavior, or refactors unless
there is a concrete maintenance, correctness, or reuse problem.
- Do not flag missing null guards or defensive checks on internal methods when
the invalid input is already blocked at the calling boundary. Trace the call
graph before raising the finding. Guards belong at the boundary (Livewire
actions, controllers, public API entry points); internal methods should trust
their callers.
Core Dimensions
- Architecture
- Readability and clarity
- Maintainability
- Correctness and edge cases
- Performance
- Security
- Treat performance as a review dimension only when it is relevant to the
request or there is concrete evidence of waste, scale risk, or unnecessary
work.
- Treat security as a review dimension only when it is relevant to the request
or there is concrete evidence of exposure, trust-boundary failure, or unsafe
data handling.
Convention Compliance
If a CLAUDE.md, AGENTS.md, or similar conventions file exists at the project
root, read it before reviewing.
- Follow local project guidance before general framework preferences.
- When a local convention differs from framework or package defaults, treat that
as intentional unless the code creates a real risk.
Exclusions
- Respect user-provided exclusions exactly.
- If exclusions conflict with a requested output section, remove the section and
note why.
Evidence Standard
- Prefer exact file and line references when available.
- If line references are not practical, use file plus class, method, or view
fragment.
- Describe the observed behaviour or failure mode, not just the code smell.
- Mention missing or weak tests when they materially increase risk.
- For cross-file issues, cite the smallest set of files needed to prove the
point.
Finding Discipline
- All findings must use the finding format defined below. Do not switch between
formats for different dimensions or severity levels.
- Do not report low-value or repetitive findings that do not materially change
risk, behaviour, or maintainability.
- Keep
Impact to one sentence maximum.
- Keep
Fix to one sentence maximum unless the issue is Critical and a longer
recommendation is necessary to avoid ambiguity.
- Only include a
Trade-off when there is a real downside, decision, or
implementation risk that materially affects the recommendation.
- Recommendations should say what to change. Do not drift into design coaching
unless the implementation choice is the actual issue.
- Put findings first. Summaries are secondary.
- Order findings by severity, then by confidence.
- Severity rubric:
Critical: active or near-certain impact to data integrity, auth
boundaries, or production availability.
High: credible exploit or major correctness risk with meaningful
business/user impact.
Medium: real defect with bounded impact or required preconditions.
Low: minor risk, hard-to-trigger edge case, or low-impact maintainability
concern.
Finding Format
Use this format for every finding:
### {Severity} — {One-sentence description}
- **Impact:** ...
- **Evidence:** ...
- **Fix:** ...
- **Trade-off:** ... ← only when a real downside or decision matters
Severity must be exactly one of: Critical, High, Medium, Low.
Output
Always save the review as a markdown file in the application root. Return a
concise summary in chat with the report path.
Filename: code-review-{agent}-YYMMDD.md. If that name exists, append -2,
-3, etc.
Return a concise summary in chat with the report path. Do not paste the full
report into chat unless the user explicitly asks.
Do not use inline review directives (e.g. ::code-comment) unless the user
explicitly requests them.
Structure, in order:
Scope Reviewed
- Review type and target
- Coverage strategy or review boundary
- Exclusions or meaningful limits
- 2–4 bullets maximum
Findings — ordered by severity, using the finding format above.
Top Architectural Risks — up to 5, broad reviews only.
Top Refactor Priorities — up to 5, broad reviews only.
Next Sprint Action Plan — broad reviews only; 3–7 items, highest value
first. For each item:
- Action: specific change to make
- Why now: immediate benefit or risk reduction
- Effort:
S, M, or L
- First step: exact starting task
Maintainability Risk: Low, Moderate, or High with reasoning.
Cross-Boundary Coupling Risk: Low, Moderate, or High with
reasoning.
No-Finding Reviews
- If no findings are discovered, say so explicitly.
- Still mention meaningful residual risks, unreviewed areas, or testing gaps
in prose — do not use the finding format for these.
- Do not pad the response with generic best practices.
1---2name: code-review3description: Use this skill whenever the user asks for a code review, package review, or architectural audit. Delivers severity-ranked findings with evidence and fixes, not general advice. Always saves the review as a markdown file and returns a concise summary in chat.4---56## Intent78- Perform analysis only unless the user explicitly asks for edits.9- Prioritize actionable, evidence-based findings over general advice.10- Optimize for high-signal findings, not exhaustive commentary.11- Default to review behavior that matches the active agent instructions unless12 the user asks for a different report shape.1314## Communication Style1516- Use plain language. Avoid jargon when a simpler phrase works.17- Do not offer alternate report versions unless the user explicitly asks.18- Avoid hedging, consultancy tone, and explanatory filler.19- Do not pad findings with soft language such as "makes it hard to reason20 about", "the only real decision is", or similar framing.2122## Scope Expectations2324- For a package review, treat the package as a bounded unit and aim for deeper,25 more confident coverage within that boundary.26- For an application review, do not imply full file-by-file coverage unless you27 actually performed it. Prioritise entry points, boundaries, changed files, and28 the highest-risk areas, then state coverage limits only when they materially29 affect confidence in the findings.30- Treat the scope section as a boundary statement, not an investigation log.31- Do not list every file, route, controller, or component examined unless the32 user explicitly asks for that level of detail.33- Do not repeat file-level detail that is already covered in findings.34- Keep scope concise. State review type, coverage strategy, and meaningful35 exclusions or limits only.3637## Review Workflow38391. **Define scope first**40 - Infer the target path, package, component, or changed files from the41 request. Ask only if the scope is genuinely unclear.42 - Note known exclusions explicitly before reviewing.43 - Identify the review mode:44 - `Package/component review` for a bounded subsystem45 - `Application audit` for broad maintainability or architecture review46472. **Explore before judging**48 - Read directory structure first.49 - Read key entry points and supporting files.50 - Avoid conclusions from a single file when behaviour spans multiple files.51 - Read local conventions and project guidance before flagging a pattern as a52 defect.53 - Check surrounding usage before calling something broken, dead, duplicated,54 or inconsistent.55 - In large repos, prioritise entry points, boundaries, and changed files over56 full traversal.57583. **Produce findings per the output template**59 - Weaknesses first, strengths optional and brief.60 - No generic advice without code evidence.61 - Prefer root-cause fixes over style-only commentary.62 - Only report issues you can defend with concrete code evidence or a clear63 behavioural risk.6465## False-Positive Guard Rails6667- Treat documented local patterns and overrides as intentional unless there is68 direct evidence they are causing risk.69- Do not report a finding that conflicts with project guidance or a documented70 exception.71- If something looks suspicious but may be intentional, present it as a question72 or assumption, not a defect.73- Do not turn preference differences into findings.74- Do not flag missing abstraction, config-driven behavior, or refactors unless75 there is a concrete maintenance, correctness, or reuse problem.76- Do not flag missing null guards or defensive checks on internal methods when77 the invalid input is already blocked at the calling boundary. Trace the call78 graph before raising the finding. Guards belong at the boundary (Livewire79 actions, controllers, public API entry points); internal methods should trust80 their callers.8182## Core Dimensions83841. Architecture852. Readability and clarity863. Maintainability874. Correctness and edge cases885. Performance896. Security9091- Treat performance as a review dimension only when it is relevant to the92 request or there is concrete evidence of waste, scale risk, or unnecessary93 work.94- Treat security as a review dimension only when it is relevant to the request95 or there is concrete evidence of exposure, trust-boundary failure, or unsafe96 data handling.9798## Convention Compliance99100If a `CLAUDE.md`, `AGENTS.md`, or similar conventions file exists at the project101root, read it before reviewing.102103- Follow local project guidance before general framework preferences.104- When a local convention differs from framework or package defaults, treat that105 as intentional unless the code creates a real risk.106107## Exclusions108109- Respect user-provided exclusions exactly.110- If exclusions conflict with a requested output section, remove the section and111 note why.112113## Evidence Standard114115- Prefer exact file and line references when available.116- If line references are not practical, use file plus class, method, or view117 fragment.118- Describe the observed behaviour or failure mode, not just the code smell.119- Mention missing or weak tests when they materially increase risk.120- For cross-file issues, cite the smallest set of files needed to prove the121 point.122123## Finding Discipline124125- All findings must use the finding format defined below. Do not switch between126 formats for different dimensions or severity levels.127- Do not report low-value or repetitive findings that do not materially change128 risk, behaviour, or maintainability.129- Keep `Impact` to one sentence maximum.130- Keep `Fix` to one sentence maximum unless the issue is `Critical` and a longer131 recommendation is necessary to avoid ambiguity.132- Only include a `Trade-off` when there is a real downside, decision, or133 implementation risk that materially affects the recommendation.134- Recommendations should say what to change. Do not drift into design coaching135 unless the implementation choice is the actual issue.136- Put findings first. Summaries are secondary.137- Order findings by severity, then by confidence.138- Severity rubric:139 - `Critical`: active or near-certain impact to data integrity, auth140 boundaries, or production availability.141 - `High`: credible exploit or major correctness risk with meaningful142 business/user impact.143 - `Medium`: real defect with bounded impact or required preconditions.144 - `Low`: minor risk, hard-to-trigger edge case, or low-impact maintainability145 concern.146147## Finding Format148149Use this format for every finding:150151```152### {Severity} — {One-sentence description}153- **Impact:** ...154- **Evidence:** ...155- **Fix:** ...156- **Trade-off:** ... ← only when a real downside or decision matters157```158159Severity must be exactly one of: `Critical`, `High`, `Medium`, `Low`.160161## Output162163Always save the review as a markdown file in the application root. Return a164concise summary in chat with the report path.165166Filename: `code-review-{agent}-YYMMDD.md`. If that name exists, append `-2`,167`-3`, etc.168169Return a concise summary in chat with the report path. Do not paste the full170report into chat unless the user explicitly asks.171172Do not use inline review directives (e.g. `::code-comment`) unless the user173explicitly requests them.174175Structure, in order:1761771. **Scope Reviewed**178 - Review type and target179 - Coverage strategy or review boundary180 - Exclusions or meaningful limits181 - 2–4 bullets maximum1821832. **Findings** — ordered by severity, using the finding format above.1841853. **Top Architectural Risks** — up to 5, broad reviews only.1861874. **Top Refactor Priorities** — up to 5, broad reviews only.1881895. **Next Sprint Action Plan** — broad reviews only; 3–7 items, highest value190 first. For each item:191 - **Action:** specific change to make192 - **Why now:** immediate benefit or risk reduction193 - **Effort:** `S`, `M`, or `L`194 - **First step:** exact starting task1951966. **Maintainability Risk:** `Low`, `Moderate`, or `High` with reasoning.1971987. **Cross-Boundary Coupling Risk:** `Low`, `Moderate`, or `High` with199 reasoning.200201## No-Finding Reviews202203- If no findings are discovered, say so explicitly.204- Still mention meaningful residual risks, unreviewed areas, or testing gaps205 in prose — do not use the finding format for these.206- Do not pad the response with generic best practices.