| name | code-review |
| description | Dual-mode review skill โ review implementation plans before coding (plan mode) or review code changes after implementation (code mode) with architecture, risk, and test analysis |
| allowed-tools | ["Read","Glob","Grep","Agent","Bash(ls:*)","Bash(git:*)","Bash(git diff:*)","Bash(git log:*)","Bash(git show:*)"] |
| arguments | ["target"] |
| argument-hint | [plan file path, 'code', branch name, or 'diff' for current changes] |
| user-invocable | true |
| when_to_use | Use when the user wants to review an implementation plan or code changes.
Plan mode: 'review plan', 'engineering review', 'architecture review', 'lock in plan', '์์ง๋์ด๋ง ๋ฆฌ๋ทฐ', '๊ณํ ๋ฆฌ๋ทฐ'
Code mode: 'review code', 'code review', 'review changes', 'review PR', 'review diff', '์ฝ๋ ๋ฆฌ๋ทฐ', '๋ณ๊ฒฝ ๋ฆฌ๋ทฐ'
|
Code Review
Overview
๋ ๊ฐ์ง ๋ชจ๋๋ฅผ ์ ๊ณตํ๋ ๋ฆฌ๋ทฐ ์คํฌ:
- Plan mode: ์ฝ๋ฉ ์ ๊ตฌํ ๊ณํ ๋ฆฌ๋ทฐ
- Code mode: ๊ตฌํ ํ ์ฝ๋ ๋ณ๊ฒฝ์ฌํญ ๋ฆฌ๋ทฐ
Inputs
$target: ๋ชจ๋ ๊ฒฐ์ ๊ธฐ์ค
.md ํ์ผ ๊ฒฝ๋ก, implement_*, plan ํค์๋ โ Plan mode
code, diff, ๋ธ๋์น๋ช
, PR ๋ฒํธ โ Code mode
- ๋ชจํธํ๋ฉด ์ฌ์ฉ์์๊ฒ ํ์ธ
Plan Mode
Process
- ๋์ ๊ณํ์์ ๊ด๋ จ ํ๋ก์ ํธ ๋ฌธ์๋ฅผ ์ฝ๋๋ค.
- ๋ชฉํ์ ๋ฒ์๋ฅผ ํ๋ฌธ์ผ๋ก ์ฌ์ง์ ํ๋ค.
references/plan-review-checklist.md๋ฅผ ๊ธฐ์ค์ผ๋ก ๊ฒํ ํ๋ค:
- ์ํคํ
์ฒ์ ๋ฐ์ดํฐ ํ๋ฆ
- ์์ ๊ถ ๊ฒฝ๊ณ, ๊ณ์ฝ, ์์กด์ฑ
- ์ฃ์ง์ผ์ด์ค, ์คํจ ๋ชจ๋, ๋ณด์, ์ฑ๋ฅ, ๋กค๋ฐฑ
- ํ
์คํธ ์ ๋ต๊ณผ smoke ์ปค๋ฒ๋ฆฌ์ง
- ์ฐ์ ์์๊ฐ ๋งค๊ฒจ์ง ๊ถ๊ณ ์ฌํญ์ ์์ฑํ๋ค.
- ์์ฒญ ์ ๊ณํ์์ ์์ฉ๋ ๊ถ๊ณ ์ฌํญ์ ๋ฐ์ํ๋ค.
Plan Mode Output
- Verdict:
ready / needs revision / blocked
- Top risks
- Architecture & contract notes
- Test coverage notes
- Required plan edits
- Recommended next action
Review Standards (Plan)
์ ํธ:
- ์๋ฌต์ ์ปคํ๋ง๋ณด๋ค ๋ช
์์ ๊ณ์ฝ
- ์๋ฆฌํ ์ถ์ํ๋ณด๋ค ์ง๋ฃจํ ๊ธฐ์
- ๋น
๋ฑ
๋ฆฌ๋ผ์ดํธ๋ณด๋ค ์ ์ง์ ๋ณ๊ฒฝ
- ์๋ ํ์ธ๋ณด๋ค ๊ฒฐ์ ์ ํ
์คํธ
๊ฒฝ๊ณ :
- ์์ ์๊ฐ ๋ถ๋ถ๋ช
ํ ๊ณต์ ํ์ผ
- ํ์ ๊ฒฝ๋ก ์๋ ์คํ
- happy path๋ง ์ปค๋ฒํ๋ ํ
์คํธ
- ์จ๊ฒจ์ง ๋ง์ด๊ทธ๋ ์ด์
/๋กค์์ ๋ฆฌ์คํฌ
- ๊ด๋ จ ์๋ ๊ธฐ๋ฅ์ด ์์ธ ๊ณํ
- ์ ๋ฆฌ๋ก ์์ฅํ ๋ฒ์ ํ์ฅ
Code Mode
Process
- ๋ณ๊ฒฝ์ฌํญ์ ์์งํ๋ค:
git diff (staged + unstaged)
git diff main...HEAD (๋ธ๋์น ์ ์ฒด)
git show <commit> (ํน์ ์ปค๋ฐ)
references/code-review-checklist.md๋ฅผ ๊ธฐ์ค์ผ๋ก ๊ฒํ ํ๋ค:
- ์ ํ์ฑ (๋ก์ง ์๋ฌ, off-by-one, null ์ฒ๋ฆฌ, ๋ ์ด์ค ์ปจ๋์
)
- ๋ณด์ (์
๋ ฅ ๊ฒ์ฆ, ์ํฌ๋ฆฟ ๋
ธ์ถ, ์ธ์ ์
, ์์ ํ์ง ์์ eval)
- ์ฑ๋ฅ (๋ณต์ก๋, ๋ฉ๋ชจ๋ฆฌ, I/O ํจํด, ์บ์ฑ)
- ํ
์คํธ (์ปค๋ฒ๋ฆฌ์ง, ์ฃ์ง์ผ์ด์ค, ํ๊ท, ๋ชจํน ์ ๋ต)
- ์คํ์ผ/์ปจ๋ฒค์
(๋ค์ด๋ฐ, ํฌ๋งท, import ์์, ๋ฐ๋์ฝ๋)
- ์ฌ๊ฐ๋๋ณ๋ก ๋ฐ๊ฒฌ์ฌํญ์ ๋ถ๋ฅํ๋ค.
Code Mode Output
- Summary table: ํ์ผ๋ณ ๋ณ๊ฒฝ ์์ฝ
- Findings: ์ฌ๊ฐ๋๋ณ ์์ธ ๋ฐ๊ฒฌ์ฌํญ
- Required fixes: ๋ฐ๋์ ์์ ํด์ผ ํ๋ ํญ๋ชฉ
- Suggestions: ๊ถ์ฅ ๊ฐ์ ์ฌํญ
Severity Levels
| Level | ์๋ฏธ | ์กฐ์น |
|---|
critical | ๋ฒ๊ทธ, ๋ณด์ ์ทจ์ฝ์ , ๋ฐ์ดํฐ ์์ค ์ํ | ๋ฐ๋์ ์์ |
warning | ์ ์ฌ์ ๋ฌธ์ , ์ฑ๋ฅ ์ด์ | ์์ ๊ถ์ฅ |
suggestion | ๊ฐ์ ๊ฐ๋ฅํ ๋ถ๋ถ | ๊ณ ๋ ค |
nit | ์คํ์ผ, ํฌ๋งท | ์ ํ์ |