Code Review Workflow
Skill11 starsChanged 6 months agoMITView on GitHub
Canonical code-review workflow for any PR, branch, diff, or local change.
In this repository37 other files it gives its agents.
- Browser ML in JavaScriptSkill
- CLI BuilderSkill
- ClickHouse Best PracticesSkill
- Code ReviewerSkill
- Commit Message WriterSkill
- deepeval Pytest Eval SuiteSkill
- deepeval OTel Trace ExportSkill
- deepeval SDK TracingSkill
- Doc Co-Authoring WorkflowSkill
- Embedding Model TrainingSkill
- Frontend Large-Feature ArchitectureSkill
- Frontend Visual Design TasteSkill
- Goal DefinitionSkill
- Internal Comms AuthoringSkill
- Invalid Name HandlerSkill
- LLM Model Pricing File UpdateSkill
- maf-prs-jobSkill
- MCP Server BuilderSkill
- Code Ownership & Bus FactorSkill
- PDF SummarizerSkill
- PDF Vision ExtractorSkill
- PNPM Upgrade PackageSkill
- promptflow-to-mafSkill
- promptfoo Eval Suite AuthorSkill
- promptfoo Redteam Plugin AuthorSkill
- Single-Flow PR YeetSkill
- React Router Search Param StateSkill
- Realtime Eval ScaffoldSkill
- Secure Code by LanguageSkill
- Security Review ChecklistSkill
- Skill Authoring LoopSkill
- SQL Query HelperSkill
- Storybook Component StoriesSkill
- Unit Test GeneratorSkill
- Repository Threat ModelSkill
- Turborepo Monorepo AuthoringSkill
- Webapp Testing HarnessSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Findings first, ordered by severity: Never start with "looks good overall" and then hide the critical finding.
- Distinctive: line 44
Defer to specialised skills: When the change touches a domain with a dedicated skill — security, ClickHouse, frontend architecture, MCP — …
- Distinctive: line 49
No findings is a valid result: If the change is clean, say so.
- Distinctive: line 210
You're implementing a feature: Use the feature's own skill.
- Distinctive: line 235
You hand-wave residual risk: If you didn't run the test suite, say so.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to use
You're reviewing code — a PR, a branch, a diff, or local changes. The job is correctness, regressions, risk, and missing tests. You are not the author; you are the second pair of eyes.
The skill is built around three rules:
- Findings first, ordered by severity. Never start with "looks good overall" and then hide the critical finding. The reviewer who reads the first line should see the worst issue.
- Defer to specialised skills. When the change touches a domain with a dedicated skill — security, ClickHouse, frontend architecture, MCP — the review defers to that skill for the domain-specific checks. This skill covers the generic parts.
- No findings is a valid result. If the change is clean, say so. Don't invent findings to fill space. Note residual risk and coverage gaps so the next reviewer knows what to look at.
Don't use this skill for implementing a feature (use the feature's own skill). And don't use it as a replacement for security review — defer to the security-review skill on the same change.
Inputs
| Field | Required | Notes |
change_scope | yes | PR number / URL / branch / diff path / "local". |
areas_touched | no | Drives which specialised skills to consult. |
severity_threshold | no | Lowest severity to report. Default medium. |
Output
Plain-text review. Typical return:
Findings (3):
1. CRITICAL — Missing tenant isolation check
File: web/src/server/api/routers/projects.ts:89
Procedure `updateProject` does not verify the
caller is a member of the project being updated.
Required: ctx.session.user.memberOf(projectId)
Fix: copy the call site at
web/src/server/api/routers/projects.ts:42
2. HIGH — Missing test
File: web/src/server/api/routers/projects.ts:89
No test covers cross-tenant access denial.
Add: web/src/server/api/routers/projects.test.ts
case "user from project A cannot update project B"
3. MEDIUM — Untyped error response
File: web/src/server/api/routers/projects.ts:104
Error returned as `throw new Error(...)` instead of
`throw new TRPCError({ code: 'FORBIDDEN' })`.
Required: typed errors with code so the client can
distinguish 401 / 403 / 404.
Deferred to:
- security-review (cross-tenant, RBAC)
- frontend-large-feature-architecture (no — purely
backend in this PR)
Residual risk:
- did not run the test suite locally; CI must
confirm
- did not review the corresponding Fern SDK
generator outputPrompt
You are reviewing code, not writing it. Output
findings first, ordered by severity, with file:line
references. No findings is a valid result.
1. Read the canonical review checklist first.
Most repos have a `references/review-checklist.md`
(or equivalent: `CONTRIBUTING.md`, `docs/review.md`,
`AGENTS.md`). Read it. It encodes the rules the
team has already agreed on. Do not duplicate those
rules in your review.
Examples of canonical rules (project-specific):
- ClickHouse / Postgres migration expectations
- tenant isolation checks
- API generator (Fern / OpenAPI / tRPC) consistency
- env var access patterns
- banner-offset UI positioning
2. Identify the area(s) the change touches.
- frontend — UI, components, state, styles
- backend — API, business logic, queues
- security — auth, RBAC, secrets, outbound HTTP
- database — schema, migration, query
- ci — workflows, build, deploy
- docs — prose, examples, READMEs
- infra — terraform, k8s, network
- mobile — iOS / Android
- none — minor doc typo, comment-only
3. Defer to the specialised skill for the area.
- security → also use the `security-review` skill
- database (ClickHouse) → also use the
`clickhouse-best-practices` skill
- frontend (large feature) → also use the
`frontend-large-feature-architecture` skill
- database migration → also use the repo's
migration checklist (often in the canonical
review checklist)
- new MCP server → also use the `mcp-builder`
skill
Do not duplicate the specialised skill's checks.
Defer; cite; move on.
4. Focus the review on the four priorities.
- correctness bugs (does it work)
- behavioural regressions (did it break what
worked)
- security / tenant risks (who can access what)
- missing / weak tests (for risky changes)
- performance w/ real impact (only if measurable)
Do NOT report:
- style nits the linter should catch
- bikeshed naming
- "I'd do it differently" without a concrete
reason
- speculative future-proofing
5. Output format.
Findings first, ordered by severity:
CRITICAL: correctness bug or direct exploit
HIGH: missing validation, missing test for
a risky change
MEDIUM: hardening gap, defense in depth
LOW: nice-to-have, log / metric
For each finding:
- file:line
- current behaviour
- required behaviour
- fix (name the call site to copy, or the
canonical helper)
After findings:
- short summary (1-3 sentences)
- list of specialised skills deferred to
- residual risk: what you couldn't verify
If there are no findings at or above the
severity threshold, say so explicitly. Note any
coverage gaps so the next reviewer knows where to
look.
6. Honour the severity threshold.
`critical-only` — only CRITICAL. Fast triage.
`high` — HIGH and above.
`medium` — MEDIUM and above (default).
`low` — everything, including LOW.When NOT to use
- You're implementing a feature. Use the feature's own skill. Code review is for the second pair of eyes, not the author.
- You start with "looks good overall" before the findings. The first line of the review should be the worst finding, not a compliment.
- You duplicate the canonical review checklist. The checklist is the source of truth. Read it; cite it; move on. Don't restate it in the review.
- You report style nits the linter should catch. A linter-fixed issue is not a finding.
- You write findings without file:line references. "There may be a bug in the integrations code" is not a finding. "integrations.ts:127 does X" is.
- You treat "no findings" as a failure of the review. No findings is a valid result. The reviewer who invented findings to fill space is the one who failed.
- You skip the deferral to specialised skills. The generic review covers correctness, regression, security, tests, performance. Domain-specific checks belong to the domain skill. Defer.
- You give the author a fix without a call site to copy. "Use a transaction" is not a fix. "Use the withTransaction helper at db.ts:42" is.
- You hand-wave residual risk. If you didn't run the test suite, say so. If you didn't review the SDK generator output, say so. The next reviewer needs to know what was not checked.
- You review a 5000-line PR in one pass. Split by sub-feature if the change is large. The findings list is a multi-pass product.
Example
Input:
change_scope: "PR #1423 — add updateProject procedure"
areas_touched: [backend, security]
severity_threshold: mediumOutput:
Findings (3):
1. CRITICAL — Missing tenant isolation check
File: web/src/server/api/routers/projects.ts:89
Procedure `updateProject` does not verify the
caller is a member of the project being updated.
Required: ctx.session.user.memberOf(projectId)
Fix: copy the call site at
web/src/server/api/routers/projects.ts:42
2. HIGH — Missing test
File: web/src/server/api/routers/projects.ts:89
No test covers cross-tenant access denial.
Add: web/src/server/api/routers/projects.test.ts
case "user from project A cannot update project B"
3. MEDIUM — Untyped error response
File: web/src/server/api/routers/projects.ts:104
Error returned as `throw new Error(...)` instead of
`throw new TRPCError({ code: 'FORBIDDEN' })`.
Required: typed errors with code so the client can
distinguish 401 / 403 / 404.
Deferred to:
- security-review (cross-tenant, RBAC scope drift)
- clickhouse-best-practices (no schema changes)
Residual risk:
- did not run the test suite locally; CI must
confirm
- did not review the corresponding Fern SDK
generator outputDoes 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.

