본문으로 건너뛰기
cccskills
무료GitHub에 공개

review

Deep code review - Elixir idioms, OTP patterns, tech debt, safety. Launches 3 parallel reviewers + plan-reviewer gate. Use when: review, review this, code review, check this code, review my changes, is this good, what do you think, techdebt, tech debt, code smells.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md9.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Code Review — Parallel Agents + Plan-Reviewer Gate

Reviews current changes for correctness, idioms, tech debt, OTP safety, and shell scripting quality. Three parallel code-reviewer agents with focused scopes, aggregated findings, and a plan-reviewer critique before presenting fixes.

Workflow

Phase 1: Diff

Get the full diff and diff stat against main:

git diff main...HEAD
git diff main...HEAD --stat

Phase 2: Parallel Review

Launch 3 code-reviewer agents in parallel (single message, 3 Agent tool calls). Each gets the full diff but a focused mandate.

CRITICAL: Launch all 3 agents in the same message so they run concurrently. Do NOT launch them sequentially.

Agent 1: Correctness & Safety

subagent_type: code-reviewer
prompt: |
  You are reviewing an Elixir/OTP + POSIX shell codebase. Focus ONLY on correctness and safety.

  ## Your scope

  ### Elixir correctness
  - Logic bugs, broken state machines, wrong ETS operations
  - GenServer callback correctness (return tuples, state transitions)
  - Port lifecycle — exit_status handling, cleanup
  - Race conditions, dead process handling
  - `Store.safe_call/2` usage for GenServer.call to possibly-dead processes
  - Raw `:ets` calls outside Store module (should use Store)
  - Missing `@impl true` on GenServer callbacks

  ### Shell safety
  - Missing `set -e` at top
  - Missing `trap cleanup EXIT` for temp files, sockets
  - `exec` inside trapped functions (replaces shell, trap lost)
  - Unquoted variables — must always be `"$var"`, `"$(cmd)"`
  - Unchecked command failures — need `cmd || { echo "error" >&2; return 1; }`
  - Exit code handling

  ### Edge cases
  - Dead processes (send to exited GenServer)
  - Missing ETS entries
  - Empty input / nil handling
  - `set -e` + `&&` short-circuit (returns exit 1 on empty val — use if/then/fi)

  ## Output format

  Return findings as a markdown list, grouped by severity:

  ### Critical
  1) **Issue**: description
     **Location**: `file:line`
     **Fix**: solution

  ### Important
  A) **Issue**: description
     **Location**: `file:line`
     **Suggestion**: approach

  ### Minor
  * Nitpick or suggestion

  ### Positive
  - What's done well

  If no findings in a tier, omit that section. Be specific — cite file:line for every finding.

  ## Diff to review

  <diff>
  {PASTE FULL DIFF HERE}
  </diff>

Agent 2: Idioms & Architecture

subagent_type: code-reviewer
prompt: |
  You are reviewing an Elixir/OTP + POSIX shell codebase. Focus ONLY on idioms and architecture.

  ## Your scope

  ### Elixir idioms
  - `if/else` for boolean dispatch → should be multi-clause functions
  - `unless` → should be multi-clause with negated match or guard
  - Nested `case` inside `case` → extract inner match to helper
  - `cond` matching a single value → use `case` or function heads
  - `do_x(true/false)` naming → descriptive: `start_daemon(_already_running = true)`
  - Inline `if x, do: a, else: b` for nil → `maybe_x(nil)` / `maybe_x(val)` pattern
  - Single-letter vars (except iterators) → descriptive names

  ### Shell idioms
  - POSIX compliance: no `[[ ]]`, `local`, arrays, `declare`
  - `printf '%s'` for data output, `echo` only for user messages
  - Quoting: `"$var"`, `"$(cmd)"` always
  - Script size >150 lines → split into sourced files under `bin/cli/`
  - Sourced file organization and section headers

  ### Architecture
  - God modules >200 lines → extract submodules
  - DRY violations (same pattern 3+ times) → extract helper
  - N+1 ETS scans (`:ets.tab2list` then filter → `:ets.match` or `:ets.select`)
  - Over-fetching (loading all data when only a subset is needed)
  - Unnecessary abstractions (single-use wrappers)
  - Separation of concerns: CLI thin, domain in dedicated modules
  - Store isolation: all ETS ops in Store, not scattered
  - Provider behaviour: correct implementation of callbacks

  ## Output format

  Return findings as a markdown list, grouped by severity:

  ### Critical
  1) **Issue**: description
     **Location**: `file:line`
     **Fix**: solution

  ### Important
  A) **Issue**: description
     **Location**: `file:line`
     **Suggestion**: approach

  ### Minor
  * Nitpick or suggestion

  ### Positive
  - What's done well

  If no findings in a tier, omit that section. Be specific — cite file:line for every finding.

  ## Diff to review

  <diff>
  {PASTE FULL DIFF HERE}
  </diff>

Agent 3: Completeness & Contracts

subagent_type: code-reviewer
prompt: |
  You are reviewing an Elixir/OTP + POSIX shell codebase. Focus ONLY on completeness and contracts.

  ## Your scope

  ### Documentation sync
  - Does `CLAUDE.md` "Project Structure" match the actual `lib/` and `test/` layout?
  - Are new modules, files, or features reflected in the structure section?
  - Are removed/renamed modules cleaned from the structure section?
  - Shell scripts have section headers and gotcha comments

  ### Typespecs
  - `@spec` on all public client API functions (skip private helpers)
  - `@type t :: %__MODULE__{}` on all structs
  - No `@spec` on GenServer callbacks — `@impl true` handles it
  - Correct types: `String.t()` not `string()`, `term()` not `any()`, `[type()]` not `list(type())`

  ### Test coverage
  - New public behavior has corresponding tests
  - Tests cover public API only, not private functions
  - `describe` blocks group by function/feature
  - One assertion focus per test
  - `assert_receive` with monitors preferred over `Process.sleep`
  - Shared setup extracted to `test/support/` if used across files

  ### Comments
  - Non-obvious logic has WHY comments (not WHAT)
  - No commenting obvious/self-documenting code
  - Shell gotcha comments (quoting edge cases, `set -e` interactions)

  ## Output format

  Return findings as a markdown list, grouped by severity:

  ### Critical
  1) **Issue**: description
     **Location**: `file:line`
     **Fix**: solution

  ### Important
  A) **Issue**: description
     **Location**: `file:line`
     **Suggestion**: approach

  ### Minor
  * Nitpick or suggestion

  ### Positive
  - What's done well

  If no findings in a tier, omit that section. Be specific — cite file:line for every finding.

  ## Diff to review

  <diff>
  {PASTE FULL DIFF HERE}
  </diff>

Phase 3: Aggregate

After all 3 agents return, merge their findings:

  1. Merge all findings into unified tiers (Critical / Important / Minor / Positive)
  2. Deduplicate same file:line across agents
  3. Tag each finding with source: [safety], [idioms], [completeness]
  4. Cap: max 5 Critical, 7 Important, 3 Minor (drop lowest-impact excess)
  5. Verdict: any Critical or Important → "Needs fixes"; only Minor/Positive → "Clean with suggestions"

Phase 4: Plan + Critique

If Critical or Important findings exist:

  1. Build a numbered fix plan:

    1. [severity] file:line — proposed fix
    2. [severity] file:line — proposed fix
    ...
    
  2. Launch a plan-reviewer agent with the fix plan and diff stat:

    subagent_type: plan-reviewer
    prompt: |
      Review this fix plan for an Elixir/OTP + POSIX shell codebase.
    
      ## Diff stat
      {PASTE DIFF STAT}
    
      ## Fix plan
      {PASTE NUMBERED FIX PLAN}
    
      Critique the plan:
      - Are any fixes over-engineered for the actual problem?
      - Are there gaps — issues in the diff that the plan misses?
      - Are any fixes redundant or conflicting?
      - Would any fix break existing behavior?
      - Is the priority ordering correct?
    
      Return:
      1. Fixes to DROP (over-engineered or unnecessary) with reasoning
      2. Fixes to ADD (gaps the plan missed) with file:line and description
      3. Fixes to MODIFY (scope adjustment) with reasoning
      4. Overall assessment: "Plan is solid" or "Plan needs adjustment"
    
  3. Incorporate critique: drop over-engineered fixes, add missed gaps, adjust scope

  4. Present the critique-adjusted plan to the user

If only Minor findings: skip plan-reviewer, present review directly.

Phase 5: Present

Show the aggregated review to the user:

## Code Review — {branch name}

**Diff**: {files changed}, {insertions}+, {deletions}-

### Critical
1) [safety] **Issue**: description
   **Location**: `file:line`
   **Fix**: solution

### Important
A) [idioms] **Issue**: description
   **Location**: `file:line`
   **Suggestion**: approach

### Minor
* [completeness] Nitpick or suggestion

### Positive
- What's done well

### Verdict
[ ] Clean - ready for `/pr`
[x] Needs fixes - see plan below

---

## Fix Plan (critique-adjusted)

1. [Critical] `file:line` — fix description
2. [Important] `file:line` — fix description
...

*Plan reviewed by plan-reviewer. Dropped N over-engineered fixes, added M gaps.*

Phase 6: Implement

After user approves the plan:

  1. Enter plan mode with the fix plan
  2. Implement fixes in plan order
  3. Run verification:
    mix test
    mix dialyzer
    mix smoke
    
  4. Report results

Pipeline

/dev <issue_url> -> /review -> /commit -> /pr

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

bugfix

무료

Bug hunter. Reproduces bugs with failing tests (RED), then fixes with TDD. Accepts a prompt, issue URL, or bug description. Use when: bugfix, fix bug, debug, broken, regression, failing, doesn't work, fix this.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

commit

무료

Create a git commit following project conventions. Use when: commit, commit this, make a commit, commit changes, git commit, save changes, commit my work, stage and commit, detailed commit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

debug

무료

Elixir debugging workflow and tools. Use when: debug, debugging, pry, inspect, trace, why is this failing, what's wrong, investigate, diagnose.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

dev

무료

Implementer - fetches a GitHub issue, builds an implementation plan, then implements using TDD. Use when: implement, build this, code this, add this feature, TDD, test first, red green refactor, pick a task, next task, dev.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

learn

무료

Extract learnings from the current session and update memory/config. Use when: learn from this, what did we learn, update memory, session retrospective, extract patterns, save learnings.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

overmind

무료

Orchestrator - spawns an autonomous orchestrator agent that decomposes a task into subtasks and drives multiple Claude agents to completion. Use when: overmind, orchestrate, multi-agent, delegate, spawn agents, break down task, run agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

leandronsp/overmind122026년 4월 13일 업데이트

leandronsp의 스킬 모두 보기

이 스킬의 문제 신고