Effect-TS Code Review
Orchestrate a multi-agent review of code changes against Effect-TS best practices.
Workflow
Step 1: Discover Changed Files
Run git diff --name-only main...HEAD to find all changed files on the current branch. If that fails (e.g., on main), fall back to git diff --name-only HEAD~1 or git diff --name-only for unstaged changes.
List the changed files for the user.
Step 2: Categorize Files
Split files into categories:
- Backend Effect files:
.ts files NOT ending in .test.ts, NOT config files (.config.ts, tsconfig, etc.), NOT UI component library directories
- Test files:
.test.ts files
- UI files:
.tsx files
- Skip:
.md, .json, .yml, .css, config files, generated files
Step 3: Launch Sub-Agents in Parallel
Based on which categories have files, launch the appropriate agents using the Agent tool. Launch all applicable agents in a single message for maximum parallelism.
If backend Effect files exist, launch these 4 agents in parallel:
effect-primitives-reviewer — checks Effect primitives (Array, Match, Option, forEach, no try/catch, no async/await, Layer not Effect.provide)
branded-types-reviewer — checks branded type usage for all entity IDs
otel-reviewer — checks tracing setup (Effect.fn trace names, annotateCurrentSpan, structured logging)
error-reviewer — checks error definitions and handling (Schema.TaggedError, catchTag, rich context)
typescript-reviewer — checks TypeScript patterns (no as any, prefer satisfies over as, no manual type annotations on inferred types)
If test files exist, launch:
test-coverage-reviewer — checks @effect/vitest patterns and assesses coverage gaps
If UI files exist, launch:
ui-reviewer — checks component library usage, accessibility, layout, brand consistency
For each agent, provide the prompt:
Review the following files for [agent's specialty]. Read each file and produce a structured report with Critical/Warning/Info findings.
Files to review:
Also review the reference guide at references/[relevant-reference].md (relative to this skill) for the detailed checklist.
Step 4: Unified Report
After all agents complete, compile results into a single report:
# Effect Review Report
## Effect Primitives
[agent output]
## Branded Types
[agent output]
## OTEL / Observability
[agent output]
## Error Handling
[agent output]
## TypeScript Patterns
[agent output]
## Test Coverage
[agent output]
## UI Quality
[agent output]
---
## Summary
| Category | Critical | Warning | Info |
|----------|----------|---------|------|
| Primitives | X | Y | Z |
| Branded Types | X | Y | Z |
| OTEL | X | Y | Z |
| Errors | X | Y | Z |
| TypeScript | X | Y | Z |
| Tests | X | Y | Z |
| UI | X | Y | Z |
| **Total** | **X** | **Y** | **Z** |
**Verdict**: PASS / NEEDS WORK / FAIL
**Score: X/10**
- PASS: 0 critical findings
- NEEDS WORK: 1-3 critical findings
- FAIL: 4+ critical findings
Scoring (0-10)
After compiling all findings, assign an overall score from 0 to 10:
- 10: Perfect — no findings at all, exemplary Effect-TS code
- 9: Excellent — only minor info-level suggestions
- 8: Great — a few warnings, no criticals
- 7: Good — several warnings but no criticals
- 6: Acceptable — 1 critical or many warnings
- 5: Needs work — 2-3 criticals
- 4: Below standard — 4-5 criticals
- 3: Poor — 6+ criticals or fundamental pattern violations
- 2: Very poor — majority of code ignores Effect patterns
- 1: Minimal compliance — almost no Effect patterns followed
- 0: No compliance — entirely non-Effect code submitted as Effect code
Display the score prominently at the end of the report.
Reference Files
Detailed checklists with codebase-specific examples:
references/effect-primitives.md — Effect Array, Match, Option, forEach, Schema, Layer
references/branded-types.md — Branded type usage and known types list
references/otel-patterns.md — Tracing, span annotations, structured logging
references/error-patterns.md — Schema.TaggedError, catchTag, error context
references/typescript-patterns.md — No as any, prefer satisfies over as, no manual type annotations
references/test-patterns.md — @effect/vitest, it.layer, coverage assessment
references/effect-atom-patterns.md — Effect-Atom React patterns, queries, mutations, Result.builder
1---
2name: effect-review
3description: >-
4 This skill should be used when the user asks to "review code", "review my changes",
5 "check effect patterns", "run effect review", "effect review", "review for effect best practices",
6 or wants a comprehensive code review against Effect-TS conventions, branded types,
7 observability, error handling, test coverage, and UI quality.
8version: 1.0.0
9metadata:
10 source: https://skillmd.com/skills/makisuo/effect-review
11---
12
13# Effect-TS Code Review
14
15Orchestrate a multi-agent review of code changes against Effect-TS best practices.
16
17## Workflow
18
19### Step 1: Discover Changed Files
20
21Run `git diff --name-only main...HEAD` to find all changed files on the current branch. If that fails (e.g., on main), fall back to `git diff --name-only HEAD~1` or `git diff --name-only` for unstaged changes.
22
23List the changed files for the user.
24
25### Step 2: Categorize Files
26
27Split files into categories:
28
29- **Backend Effect files**: `.ts` files NOT ending in `.test.ts`, NOT config files (`.config.ts`, `tsconfig`, etc.), NOT UI component library directories
30- **Test files**: `.test.ts` files
31- **UI files**: `.tsx` files
32- **Skip**: `.md`, `.json`, `.yml`, `.css`, config files, generated files
33
34### Step 3: Launch Sub-Agents in Parallel
35
36Based on which categories have files, launch the appropriate agents using the Agent tool. Launch all applicable agents in a **single message** for maximum parallelism.
37
38**If backend Effect files exist**, launch these 4 agents in parallel:
39- `effect-primitives-reviewer` — checks Effect primitives (Array, Match, Option, forEach, no try/catch, no async/await, Layer not Effect.provide)
40- `branded-types-reviewer` — checks branded type usage for all entity IDs
41- `otel-reviewer` — checks tracing setup (Effect.fn trace names, annotateCurrentSpan, structured logging)
42- `error-reviewer` — checks error definitions and handling (Schema.TaggedError, catchTag, rich context)
43- `typescript-reviewer` — checks TypeScript patterns (no `as any`, prefer `satisfies` over `as`, no manual type annotations on inferred types)
44
45**If test files exist**, launch:
46- `test-coverage-reviewer` — checks @effect/vitest patterns and assesses coverage gaps
47
48**If UI files exist**, launch:
49- `ui-reviewer` — checks component library usage, accessibility, layout, brand consistency
50
51For each agent, provide the prompt:
52> Review the following files for [agent's specialty]. Read each file and produce a structured report with Critical/Warning/Info findings.
53>
54> Files to review:
55> - [list of file paths]
56>
57> Also review the reference guide at `references/[relevant-reference].md` (relative to this skill) for the detailed checklist.
58
59### Step 4: Unified Report
60
61After all agents complete, compile results into a single report:
62
63```
64# Effect Review Report
65
66## Effect Primitives
67[agent output]
68
69## Branded Types
70[agent output]
71
72## OTEL / Observability
73[agent output]
74
75## Error Handling
76[agent output]
77
78## TypeScript Patterns
79[agent output]
80
81## Test Coverage
82[agent output]
83
84## UI Quality
85[agent output]
86
87---
88
89## Summary
90
91| Category | Critical | Warning | Info |
92|----------|----------|---------|------|
93| Primitives | X | Y | Z |
94| Branded Types | X | Y | Z |
95| OTEL | X | Y | Z |
96| Errors | X | Y | Z |
97| TypeScript | X | Y | Z |
98| Tests | X | Y | Z |
99| UI | X | Y | Z |
100| **Total** | **X** | **Y** | **Z** |
101
102**Verdict**: PASS / NEEDS WORK / FAIL
103
104**Score: X/10**
105```
106
107- **PASS**: 0 critical findings
108- **NEEDS WORK**: 1-3 critical findings
109- **FAIL**: 4+ critical findings
110
111### Scoring (0-10)
112
113After compiling all findings, assign an overall score from 0 to 10:
114
115- **10**: Perfect — no findings at all, exemplary Effect-TS code
116- **9**: Excellent — only minor info-level suggestions
117- **8**: Great — a few warnings, no criticals
118- **7**: Good — several warnings but no criticals
119- **6**: Acceptable — 1 critical or many warnings
120- **5**: Needs work — 2-3 criticals
121- **4**: Below standard — 4-5 criticals
122- **3**: Poor — 6+ criticals or fundamental pattern violations
123- **2**: Very poor — majority of code ignores Effect patterns
124- **1**: Minimal compliance — almost no Effect patterns followed
125- **0**: No compliance — entirely non-Effect code submitted as Effect code
126
127Display the score prominently at the end of the report.
128
129## Reference Files
130
131Detailed checklists with codebase-specific examples:
132- `references/effect-primitives.md` — Effect Array, Match, Option, forEach, Schema, Layer
133- `references/branded-types.md` — Branded type usage and known types list
134- `references/otel-patterns.md` — Tracing, span annotations, structured logging
135- `references/error-patterns.md` — Schema.TaggedError, catchTag, error context
136- `references/typescript-patterns.md` — No `as any`, prefer `satisfies` over `as`, no manual type annotations
137- `references/test-patterns.md` — @effect/vitest, it.layer, coverage assessment
138- `references/effect-atom-patterns.md` — Effect-Atom React patterns, queries, mutations, Result.builder