review
Skill4 starsChanged 2 months agoMITView on GitHub
Hands-on review workflow focused on listing concrete bad practices and required refactors. Use this skill for code review sessions, checking changes against the relevant skill's registry.yaml, and generating actionable findings with severity levels.
We split this skill into the rules it gives an agent
22 rules. 0 are common, 13 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 159 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to produce practical review output centered on bad practices that require refactoring.
- Distinctive: line 12
Before reading any files, run once for the entire review:
- Very specific: line 41
When transitiveDownstream.truncated is true: the nodes sample is sufficient for contract-consistency checks (contract consumers come first).
- Very specific: line 43
If a file in the diff has nodes: [], it's either a non-source file (markdown, config, JSON) or an unclassified pattern — flag the latter as …
- Very specific: line 53
If rules conflict, report Architecture Ambiguity and recommend one direction.
- Distinctive: line 66
Read the graph review payload — classifications, deps, blast radius are already resolved.
- Very specific: line 75
every node.id whose skill mapped to a skill registry (proves the rules were checked)
- Very specific: line 76
every kind represented in the diff (proves no layer was skipped)
- Distinctive: line 81
Always return findings-first and severity-ordered.
- Very specific: line 108
When a finding is not covered by the relevant skill's registry.yaml:
- Distinctive: line 109
Add a new FP entry using the next sequential number.
- Distinctive: line 112
Add checklist item if needed.
- Very specific: line 115
If no new practice was needed, return None in that section.
- Distinctive: line 153
If a field represents a fixed set of values (status, type, category, role, etc.), it must use the corresponding domain enum — never a plain …
- Very specific: line 159
If the type system cannot infer the correct type, the root cause should be fixed (proper generics, narrowing, schema inference) rather than …
- Distinctive: line 164
When reviewing controllers or use cases, do not assume a matching schema doesn't exist based on naming alone.
- Very specific: line 166
Search locations: @shared/objects, @shared/schemas, @[context]/objects, @[context]/schemas.
- Distinctive: line 167
Only mark schema reuse checks as "pass" after confirming via search that no existing schema matches the structure.
- Distinctive: line 172
Prefer concrete refactor instructions over abstract flow commentary.
- Distinctive: line 173
Do not output concept catalogs unless explicitly requested.
- Distinctive: line 174
Do not provide syntax-only review when architectural bad practices exist.
- Distinctive: line 175
Every non-trivial finding must have file:line + required refactor.
“Common” is measured: kept by at least 6 in 10 of the 159 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review
Use this skill to produce practical review output centered on bad practices that require refactoring.
Mandatory Pre-Review Step: Graph Context
Before reading any files, run once for the entire review:
bun scripts/graph/cli/index.ts review --diff <base-ref> --json --depth=3 > /tmp/graph-review.json
# OR for unstaged changes:
bun scripts/graph/cli/index.ts review --json --depth=3 > /tmp/graph-review.json
# OR pass explicit files:
bun scripts/graph/cli/index.ts review --files <a.ts> <b.tsx> --json --depth=3 > /tmp/graph-review.jsonThis produces:
Top-level fields:
registries— map keyed by skill name (e.g.controller,entity). Each value containsdependsOn/dependedBy/patterns/badPractices, pre-parsed once per batch (no re-parsing YAML). Each file'sskillfield references into this map.
Per file, per node:
node— id, kind, context, location (deterministic — no guessing what kind of artifact this is)skill— the skill name (look upbatch.registries[skill]for rules)incoming/outgoing— direct upstream/downstream edges with kind labels (e.g.wraps-usecase,defines-schema,consumes-sdk-hook)incomingResolved/outgoingResolved— for each edge, a slimpeerprojection:{ id, kind, context, location }— enough to navigate to the filetransitiveDownstream—{ count, nodes, edges, truncated, byKind? }.countis always the real total. Whencount > 50(default),truncated: trueandnodesholds a contract-first sample (SDK hooks, zod schemas, controllers, usecases, forms, repository/service interfaces, events come first);byKindgives the full kind histogram so you keep the structural picture even on the elided long tail. Override the cap with--max-downstream=N.transitiveUpstream— full{ nodes, edges }(typically small in practice; not capped)
Do NOT re-classify dependencies manually by reading imports or guessing skill mapping. The graph already did this deterministically. Use the JSON output as the source of truth for:
- Which skill registry to consult (look up
graph-review.registries[node.skill]) - What this artifact is and which layer it belongs to (
node.kind,node.context) - Direct + transitive impact (
outgoing,transitiveDownstream.count/byKind) - Coverage section in the output (every node id you visited)
When transitiveDownstream.truncated is true: the nodes sample is sufficient for contract-consistency checks (contract consumers come first); use byKind to reason about the long tail without inspecting every leaf. If you need the full list for a specific suspect node, re-run with --max-downstream=500.
If a file in the diff has nodes: [], it's either a non-source file (markdown, config, JSON) or an unclassified pattern — flag the latter as Architecture Ambiguity so the graph extractor can be improved.
Source Order
- Graph review payload (
/tmp/graph-review.json) — node classifications, deps, blast radius - The relevant skill's
registry.yaml(already loaded once at the top level asbatch.registries[skillName]) docs/BACKEND.md+docs/FRONTEND.md+docs/COMPONENTS.md— architectural referencesCLAUDE.md— first-class citizens overview- Relevant implementation skills in
.claude/skills/*
If rules conflict, report Architecture Ambiguity and recommend one direction.
Scope
Review the changed code end-to-end for the feature scope:
- Route/page and component integration.
- Query/mutation usage and SDK/type/schema coupling.
- Controller/use case/repository/entity/event chain.
- Dependency direction and context boundaries.
Internal Review Method
Perform internally (do not bloat output unless needed):
- Read the graph review payload — classifications, deps, blast radius are already resolved.
- For each
files[i].nodes[j]: a. Read the changed file (and any peer flagged inincomingResolved/outgoingResolvedwhose code you must inspect to evaluate this finding — e.g. the use case wrapped by a controller). Each resolved entry haspeer: { id, kind, context, location }— readpeer.location.fileto find the source. b. Resolve the registry once viaregistry = batch.registries[node.skill]. Match implementation againstregistry.patterns(when: alwaysare mandatory). c. Match againstregistry.badPracticesand the cross-cuttingCritical Rulesbelow. - For findings that touch a contract (controller schema, exported SDK type, public hook), confirm
transitiveDownstreamshows the change is consistent — otherwise raiseCHANGES_REQUESTED. Whentruncated: true, the contract consumers are guaranteed to be in thenodessample (sorted contract-first); usebyKindto reason about the long tail of leaf consumers. - Determine smallest safe refactor for each finding.
The Coverage output section must list:
- every
node.idwhoseskillmapped to a skill registry (proves the rules were checked) - every
kindrepresented in the diff (proves no layer was skipped) - the maximum blast radius observed (
transitiveDownstream.count) — flags risky changes
Mandatory Output (Practical Mode)
Always return findings-first and severity-ordered.
Required Sections
Status: APPROVED | CHANGES_REQUESTEDBad Practices FoundRefactor Actions RequiredNew Bad Practices AddedArchitecture AmbiguitiesCoverage
Finding Item Format (Required)
Each item must contain:
- Severity:
Blocker | Major | Minor - Location:
path/file.ts:line - Violated practice:
bp-xxorSkill:<name>:<rule> - Why this is bad: behavior/architecture/evolvability risk
- Required refactor: explicit code-level action
Verdict Rules
CHANGES_REQUESTEDif any Blocker or Major exists.APPROVEDonly if no refactor-required bad practice exists.
New Bad Practice Rule
When a finding is not covered by the relevant skill's registry.yaml:
- Add a new FP entry using the next sequential number.
- Include wrong real code pattern from review context.
- Include a correct alternative and severity.
- Add checklist item if needed.
- Report it under
New Bad Practices Added.
If no new practice was needed, return None in that section.
The
mechanical: true+detect:entries in each skill'sregistry.yamlare the single source of truth for BOTHbun review//reviewAND the post-editclassify-edit.tshook (.claude/hooks/classify-edit.ts), which routes a changed file to its skill via.claude/registry.yamland replays those regexes. Adding a machine-checkable bad-practice = addmechanical: true+detect:to the relevant registry; no separate hook code.
Output Template
## Status: APPROVED | CHANGES_REQUESTED
## Bad Practices Found
- [ ] [Severity] `path/file.ts:line`
- Practice: bp-xx | Skill:<name>:<rule>
- Why bad: <risk>
- Required refactor: <smallest safe change>
## Refactor Actions Required
1. <action tied to finding 1>
2. <action tied to finding 2>
## New Bad Practices Added
- bp-xx - <title>
- or: None
## Architecture Ambiguities
- <conflict + recommended direction>
- or: None
## Coverage
- Files reviewed: [...]
- Layers traced: [route/ui/controller/usecase/repository/entity/event]
- Query paths traced: [...]
- Mutation paths traced: [...]Critical Rules
Enum Over String in Schemas
- In controller/use case input and output Zod schemas, always verify if a
z.string()field should be a domain enum (z.enum(MyEnum)) instead. - If a field represents a fixed set of values (status, type, category, role, etc.), it must use the corresponding domain enum — never a plain string.
- This applies to both request (input) and response (output) schemas.
- Severity: Blocker — plain strings where enums exist break type safety and allow invalid values.
Avoid Unnecessary Type Casting (as)
- Avoid
astype casting unless there is a clear, documented reason why it is necessary. - If the type system cannot infer the correct type, the root cause should be fixed (proper generics, narrowing, schema inference) rather than silenced with
as. - Acceptable uses: test fixtures, external library gaps, truly unavoidable narrowing with an explanatory comment.
- Severity: Major — unnecessary
ashides type errors and defeats TypeScript's safety guarantees.
Schema Reuse Verification (bp-10 in usecase, bp-17 in controller)
- When reviewing controllers or use cases, do not assume a matching schema doesn't exist based on naming alone.
- For every inline
z.object()orz.array(z.object())in an InputSchema/OutputSchema, search the codebase for value objects and shared schemas with the same field structure — not the same name. - Search locations:
@shared/objects,@shared/schemas,@[context]/objects,@[context]/schemas. - Only mark schema reuse checks as "pass" after confirming via search that no existing schema matches the structure.
- Severity: Major — false negatives on this check make the entire review unreliable.
Practical Rules
- Prefer concrete refactor instructions over abstract flow commentary.
- Do not output concept catalogs unless explicitly requested.
- Do not provide syntax-only review when architectural bad practices exist.
- Every non-trivial finding must have file:line + required refactor.
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- garrytan/gstack★ 139ksame name
- ansible/ansible★ 71ksame name
- docling-project/docling★ 70ksame name
- traefik/traefik★ 65ksame name
- ClickHouse/ClickHouse★ 51ksame name
- temporalio/temporal★ 24ksame name
- tisfeng/Easydict★ 15ksame name
- juicedata/juicefs★ 15ksame name
- elie222/inbox-zero★ 13ksame name
- gitkraken/vscode-gitlens★ 10ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use daily-arxiv, exp-eval and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
SethGammonSkillascii-diagram
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.
Also in 4 projects that use this
DAIR-AutoResearchSkillexp-pilot-eval
Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.
Also in 4 projects that use this
DAIR-AutoResearchSkillexp-pilot-run
Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.
Also in 4 projects that use this
- +5 more from Lambenthan
- +1 more from DAIR-AutoResearch
In this repository45 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agentSkill
- bounded-contextSkill
- clean-branchSkill
- commitSkill
- componentSkill
- controllerSkill
- db-modellingSkill
- ddd-modelingSkill
- ddd-specSkill
- design-systemSkill
- desktop-shellSkill
- e2eSkill
- entitySkill
- enumSkill
- errorsSkill
- eventSkill
- formSkill
- grill-with-docsSkill
- handlerSkill
- handoffSkill
- middlewareSkill
- migrateSkill
- prdSkill
- primitiveSkill
- projectionSkill
- projectorSkill
- querySkill
- repositorySkill
- routeSkill
- saas-researchSkill
- schedulerSkill
- schemaSkill
- sdkSkill
- serviceSkill
- spec-reviewSkill
- storeSkill
- storybookSkill
- task-breakdownSkill
- testSkill
- trace-analysisSkill
- ui-compositionSkill
- usecaseSkill
- user-storiesSkill
- value-objectSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

