Code Review Skill
Summary
Use this skill to review a code change independently of the hosting platform.
The result is a concise, evidence-backed assessment for a human or another
workflow to consume. This skill does not know how to fetch a pull request or
publish comments.
When To Use
- Reviewing a patch, commit range, change set, or proposed implementation
- Checking regressions before a merge, release, or deployment
- Producing findings for a platform-specific review adapter
Do Not Use
- Implementing the fix while reviewing
- Approving, blocking, or otherwise replacing a human merge decision
- Treating an unavailable file, test, or instruction as evidence that no issue exists
Inputs
Use the context supplied by the caller. It may include:
change_set: changed files, hunks, and the before/after revisions
baseline: relevant surrounding code, configuration, interfaces, and history
project_instructions: repository or path-specific review rules
prior_feedback: earlier findings and their current status
verification_budget: commands or checks that may be run
Do not assume a particular directory or file name. If a caller supplies a
manifest, resolve inputs from its artifact entries and record missing or
unavailable entries in the coverage summary.
Workflow
1. Establish scope and coverage
- Identify the exact change set and its baseline.
- Read applicable project instructions before judging behavior.
- List the files and hunks actually reviewed.
- Separate facts observed in the supplied context from assumptions.
- If core context is missing, continue only with an explicit limited-scope
result; never infer a clean review from missing evidence.
2. Generate candidates
Review changed files and materially changed hunks in this order:
- Correctness and data integrity
- Security, authorization, trust boundaries, and secret handling
- Lifecycle, failure handling, retries, cancellation, and cleanup
- Concurrency, ordering, idempotency, and duplicate side effects
- Compatibility, migrations, and public contract changes
- Resource usage and performance
- Tests, observability, and maintainability when they affect behavior
Follow important control flow into surrounding code when needed to establish
impact, but avoid speculative project-wide criticism.
3. Verify candidates
For every candidate finding:
- Re-read the relevant code and trace the behavior to a concrete outcome.
- Run a focused test, type check, lint, query, or other available verification
when it can distinguish a real issue from a false positive.
- Confirm that the issue is introduced or materially worsened by the change.
- Confirm that the finding can be located precisely in the changed code.
- Lower confidence or omit the finding when evidence remains inconclusive.
Do not publish a high-severity finding based only on a pattern match, naming
preference, or an unverified hypothesis.
4. Classify and deduplicate
Keep only actionable findings supported by the change or directly relevant
surrounding code. For each finding, assign:
severity: critical, high, medium, or low
confidence: confirmed, likely, or uncertain
category: the primary risk category
status: open, needs-context, or not-reproducible
Do not report a finding as critical or high unless its evidence and impact
justify that severity. Merge duplicate findings and distinguish a new impact
from previously reported feedback.
5. Deliver the result
Return one user-facing brief containing:
- Conclusion first: findings, clean review, or limited review
- Findings ordered by severity, each with location, impact, evidence, and
an actionable recommendation
- Coverage: revisions, files/hunks examined, instructions available, and
verification performed
- Limitations and unresolved questions
If the caller explicitly provides an artifact directory and requests exports,
write review.md and review-result.json there. These are optional exports,
not required runtime files and not prerequisites for a valid review.
Finding Contract
Represent each finding with this platform-neutral shape:
{
"id": "stable-within-this-review",
"severity": "high",
"confidence": "confirmed",
"category": "correctness",
"status": "open",
"location": {
"path": "src/example.rs",
"start_line": 42,
"end_line": 45
},
"title": "Short problem title",
"impact": "Describe the user-visible or operational consequence.",
"evidence": [
"Describe the relevant code path, input, state transition, or verification."
],
"recommendation": "Give a concrete direction for fixing or validating it.",
"introduced_by_change": true
}
Use repository-relative paths and changed-line locations when available.
location may be omitted for a valid non-inline finding, but then explain why
the issue cannot be mapped precisely and keep it in the brief rather than
silently mapping it to an unrelated line.
Degradation Rules
- Missing change-set or baseline context means
limited review, not clean.
- Missing project instructions must be reported as an instruction-coverage
limitation; do not claim that no such instructions exist.
- If verification cannot run, record the attempted command and reason.
- If a finding cannot be reproduced or precisely evidenced, mark it
needs-context or omit it from actionable findings.
1---2name: code-review3description: Review a set of code changes using evidence-backed findings, explicit confidence, and a clear coverage summary.4---56# Code Review Skill78## Summary910Use this skill to review a code change independently of the hosting platform.11The result is a concise, evidence-backed assessment for a human or another12workflow to consume. This skill does not know how to fetch a pull request or13publish comments.1415## When To Use1617- Reviewing a patch, commit range, change set, or proposed implementation18- Checking regressions before a merge, release, or deployment19- Producing findings for a platform-specific review adapter2021## Do Not Use2223- Implementing the fix while reviewing24- Approving, blocking, or otherwise replacing a human merge decision25- Treating an unavailable file, test, or instruction as evidence that no issue exists2627## Inputs2829Use the context supplied by the caller. It may include:3031- `change_set`: changed files, hunks, and the before/after revisions32- `baseline`: relevant surrounding code, configuration, interfaces, and history33- `project_instructions`: repository or path-specific review rules34- `prior_feedback`: earlier findings and their current status35- `verification_budget`: commands or checks that may be run3637Do not assume a particular directory or file name. If a caller supplies a38manifest, resolve inputs from its artifact entries and record missing or39unavailable entries in the coverage summary.4041## Workflow4243### 1. Establish scope and coverage4445- Identify the exact change set and its baseline.46- Read applicable project instructions before judging behavior.47- List the files and hunks actually reviewed.48- Separate facts observed in the supplied context from assumptions.49- If core context is missing, continue only with an explicit limited-scope50 result; never infer a clean review from missing evidence.5152### 2. Generate candidates5354Review changed files and materially changed hunks in this order:55561. Correctness and data integrity572. Security, authorization, trust boundaries, and secret handling583. Lifecycle, failure handling, retries, cancellation, and cleanup594. Concurrency, ordering, idempotency, and duplicate side effects605. Compatibility, migrations, and public contract changes616. Resource usage and performance627. Tests, observability, and maintainability when they affect behavior6364Follow important control flow into surrounding code when needed to establish65impact, but avoid speculative project-wide criticism.6667### 3. Verify candidates6869For every candidate finding:7071- Re-read the relevant code and trace the behavior to a concrete outcome.72- Run a focused test, type check, lint, query, or other available verification73 when it can distinguish a real issue from a false positive.74- Confirm that the issue is introduced or materially worsened by the change.75- Confirm that the finding can be located precisely in the changed code.76- Lower confidence or omit the finding when evidence remains inconclusive.7778Do not publish a high-severity finding based only on a pattern match, naming79preference, or an unverified hypothesis.8081### 4. Classify and deduplicate8283Keep only actionable findings supported by the change or directly relevant84surrounding code. For each finding, assign:8586- `severity`: `critical`, `high`, `medium`, or `low`87- `confidence`: `confirmed`, `likely`, or `uncertain`88- `category`: the primary risk category89- `status`: `open`, `needs-context`, or `not-reproducible`9091Do not report a finding as `critical` or `high` unless its evidence and impact92justify that severity. Merge duplicate findings and distinguish a new impact93from previously reported feedback.9495### 5. Deliver the result9697Return one user-facing brief containing:98991. Conclusion first: findings, clean review, or limited review1002. Findings ordered by severity, each with location, impact, evidence, and101 an actionable recommendation1023. Coverage: revisions, files/hunks examined, instructions available, and103 verification performed1044. Limitations and unresolved questions105106If the caller explicitly provides an artifact directory and requests exports,107write `review.md` and `review-result.json` there. These are optional exports,108not required runtime files and not prerequisites for a valid review.109110## Finding Contract111112Represent each finding with this platform-neutral shape:113114```json115{116 "id": "stable-within-this-review",117 "severity": "high",118 "confidence": "confirmed",119 "category": "correctness",120 "status": "open",121 "location": {122 "path": "src/example.rs",123 "start_line": 42,124 "end_line": 45125 },126 "title": "Short problem title",127 "impact": "Describe the user-visible or operational consequence.",128 "evidence": [129 "Describe the relevant code path, input, state transition, or verification."130 ],131 "recommendation": "Give a concrete direction for fixing or validating it.",132 "introduced_by_change": true133}134```135136Use repository-relative paths and changed-line locations when available.137`location` may be omitted for a valid non-inline finding, but then explain why138the issue cannot be mapped precisely and keep it in the brief rather than139silently mapping it to an unrelated line.140141## Degradation Rules142143- Missing change-set or baseline context means `limited review`, not `clean`.144- Missing project instructions must be reported as an instruction-coverage145 limitation; do not claim that no such instructions exist.146- If verification cannot run, record the attempted command and reason.147- If a finding cannot be reproduced or precisely evidenced, mark it148 `needs-context` or omit it from actionable findings.