Skip to content
Back to skills

Code Review

ASecurity

Performs an independent code review. Produces findings across correctness, security, scope fidelity, rule compliance, readability and test quality. Operates the CR-CODE gate.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentscode-reviewgitsecurity

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add bturksoy/claude-code-app-studio --skill code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bturksoy-code-review/badge)](https://www.skillsdirectory.com/skills/bturksoy-code-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review
description: Performs an independent code review. Produces findings across correctness, security, scope fidelity, rule compliance, readability and test quality. Operates the CR-CODE gate.
---

# /code-review [scope]

Owner: `code-reviewer`. Writes no code; reports findings.

Scope argument: a story path, a file list, an epic slug, or empty
(→ working-directory changes / `git diff`).

---

## 1. Collect the scope

- If it is a git repo: `git diff` (staged + unstaged) or `git diff <base>..HEAD`
- Otherwise: read the given file list
- Find the relevant story file (if any) — for acceptance criteria and scope boundary
- Select the relevant `.claude/rules/*.md` files based on the paths touched

If the diff exceeds 1500 lines, **split it** into two review rounds, or ask the user:
> "<N> lines changed. Should I review all of it, or the riskiest files?"

## 2. Invoke `code-reviewer`

```
<DIFF or FILE CONTENTS>

<STORY CONTEXT (if any):
  acceptance criteria, business rules, out-of-scope section>

<RELEVANT RULES: the content of .claude/rules/<file>>

Task: the CR-CODE gate.

Review order (earlier items matter more):
1. Correctness — are the ACs met, edge cases, error paths,
   concurrency, null/off-by-one
2. Security — authorization, resource ownership (IDOR), input validation,
   injection, secret leakage
3. Scope fidelity — was "Out of scope" work done, are there unrelated refactors
4. Rule compliance — the items in the supplied rules file
5. Readability/maintainability — naming, single responsibility, magic values, dead code
6. Test quality — is there a test per AC, does it really assert,
   are edge cases tested, any leftover skip/only

Finding format:
[BLOCKER|MAJOR|MINOR|NOTE] <file:line> — <one-sentence claim + reason + which AC/rule>

DO NOT WRITE: style preferences, "would be nicer", praise paragraphs,
the same issue repeated (write it once, say "in N places").
At most 15 findings; if there are more, give the 15 most critical.

Begin your reply with "CR-CODE: APPROVED|CONDITIONAL|REJECTED".
APPROVED = no BLOCKER and no MAJOR. CONDITIONAL = MAJOR present. REJECTED = BLOCKER present.
```

## 3. Present

```
## Code Review — <scope>
Verdict: CR-CODE <verdict>
Scope: <N> files, <M> lines

BLOCKER (<a>)
  <file:line> — <claim>
MAJOR (<b>)
  ...
MINOR (<c>)
  ...
NOTE (<d>)
  ...
```

## 4. Fix flow

`AskUserQuestion`:
- `Fix BLOCKER + MAJOR findings (Recommended)`
- `Fix only the BLOCKERs`
- `I'll fix them myself`

If a fix is chosen, send them to the relevant developer agent **in one round**:

```
Fix the following findings. Only these — make no other changes.
<finding list>
After fixing, run the relevant tests and report the result.
```

On a `REJECTED` verdict, invoke the gate **once more** after the fixes.
On `CONDITIONAL`, do not re-invoke.

## 5. Record

Append the CR-CODE line to `.state/gates.jsonl`.
Any unfixed `MAJOR` findings are added to `product/risks.md` as technical debt.

---

## Token note

- **1 agent call** + at most 1 fix round + (if REJECTED) 1 verification round.
- The rules files are embedded (fixed content → prompt-cache friendly).
- Splitting a large diff is cheaper than sending it all at once (no context overflow).
- If several stories need reviewing, combine them into **a single call**.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…