code-review
하는 일
선택한 시점 이후의 코드 변경을 두 가지 질문과 비교합니다. 코드가 저장소의 코딩 규칙을 따르는지, 요청된 명세와 일치하는지 확인합니다. 병합 전에 작업을 검토하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓병합하기 전에 브랜치, 풀 리퀘스트, 또는 작업 중인 내용을 검토하고 싶을 때.
- ✓코드가 원래 이슈나 명세와 일치하는지 알아야 할 때.
- ✓변경 사항이 저장소에 문서화된 표준을 따르는지 확인하고 싶을 때.
스킬 링크
https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 브랜치에서 main 이후 바뀐 내용을 우리 코딩 표준과 원래 티켓에 비추어 검토해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 코드 기록에서 기준점을 고른 뒤, 표준 검토와 명세 검토를 동시에 실행합니다. 그다음 두 결과를 함께 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Two-axis review of the diff between HEAD and a fixed point the user supplies:
- Standards: does the code conform to this repo's documented coding standards?
- Spec: does the code faithfully implement the originating issue / spec?
Both axes run as parallel sub-agents so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window.
The issue tracker should have been provided to you. If not, tell the user to run /setup-matt-pocock-skills.
Process
1. Pin the fixed point
Whatever the user said is the fixed point (a commit SHA, branch name, tag, main, HEAD~5, etc.). If they didn't specify one, ask for it.
Capture the diff command once: git diff <fixed-point>...HEAD (three-dot, so the comparison is against the merge-base). Also note the list of commits via git log <fixed-point>..HEAD --oneline.
Before going further, confirm the fixed point resolves (git rev-parse <fixed-point>) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents.
2. Identify the spec source
Look for the originating spec, in this order:
- Issue references in the commit messages (
#123,Closes #45, GitLab!67, etc.), fetched via the workflow in the tracker doc. - A path the user passed as an argument.
- A spec file under
docs/,specs/, or.scratch/matching the branch name or feature. - If nothing is found, ask the user where the spec is. If they say there isn't one, the Spec sub-agent will skip and report "no spec available".
3. Identify the standards sources
Search the repo for every file that documents how code should be written. When CODING_STANDARDS.md or CONTRIBUTING.md exists, it must be on the list.
On top of whatever the repo documents, the Standards axis always carries the smell baseline below: a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:
- The repo overrides. A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
- Always a judgement call. Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation. Like any standard here, skip anything tooling already enforces.
Each smell reads what it is → how to fix; match it against the diff:
- Mysterious Name: a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
- Duplicated Code: the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
- Feature Envy: a method that reaches into another object's data more than its own. → move the method onto the data it envies.
- Data Clumps: the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
- Primitive Obsession: a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
- Repeated Switches: the same
switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share. - Shotgun Surgery: one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
- Divergent Change: one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
- Speculative Generality: abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
- Message Chains: long
a.b().c().d()navigation the caller shouldn't depend on. → hide the walk behind one method on the first object. - Middle Man: a class or function that mostly just delegates onward. → cut it, call the real target direct.
- Refused Bequest: a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
4. Spawn both sub-agents in parallel
Issue both sub-agent calls together, in the foreground, and aggregate the reports they return.
Standards sub-agent prompt should include:
- The full diff command and commit list.
- The list of standards-source files you found in step 3, plus the smell baseline from step 3 pasted in full (the sub-agent has no other access
자주 묻는 질문
시작하기 전에 무엇을 줘야 하나요?
커밋, 브랜치, 태그처럼 비교할 고정된 기준점이 필요합니다. 주지 않으면 에이전트가 요청합니다.
명세는 어디서 찾나요?
커밋 메시지의 이슈 번호, 사용자가 준 경로, 또는 docs나 specs 같은 폴더의 명세 파일에서 찾습니다.
검토는 한 번에 긴 과정으로 실행되나요?
아닙니다. 두 점검은 서로의 판단에 영향을 주지 않도록 별도의 하위 에이전트에서 따로 실행됩니다.
상세 정보
작성자의 원본 설명
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".
repo: mattpocock/skills
인기도
- GitHub 스타
- 310k
- 순위
- #101
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
ask-matt
310k에이전트가 아이디어에서 배포된 코드까지 이어지는 코딩 스킬 모음의 안내자가 되어, 상황에 맞는 스킬을 찾아 주도록 돕습니다.
domain-modeling
310k팀이 쓰는 용어를 담은 공유 프로젝트 용어집을 만들고, 중요한 설계 결정을 기록해 코드가 같은 단어를 쓰도록 돕습니다.
implement-spec
310k완성된 명세와 그 티켓을 작동하는 코드로 바꾸고, 티켓을 순서대로 처리한 뒤 하나의 브랜치에 모아 줍니다.
implement
310k명세나 티켓에 따라 작업을 만들고 중간중간 테스트한 뒤, 결과를 검토하고 현재 브랜치에 커밋하도록 돕습니다.