TypeScript Reviewer
Reviewer skill for TypeScript PRs. Universal review framework at workflows/code-review.md; full reference at languages/typescript/reviewer.md.
Severity tier
SOFT WARNING. Agent flags; operator decides on merge.
Checklist
Type discipline
anyin committed code → flag.unknownwith narrowing is the alternative.astype assertions → require an accompanying type guard or schema check.@ts-ignore/@ts-expect-error→ require comment with reason and ideally an issue link.!non-null assertion → flag. Prefer explicit narrowing.- Index access without bounds check → verify
noUncheckedIndexedAccess: trueis on. FunctionandObjecttypes → too wide. Use specific signatures.
Module hygiene
- Default exports → ask if named would do.
- Circular imports → flag; tend to produce undefined-at-load-time bugs.
- Implementation imports of internals across package boundaries → API surface violation.
Async
- Floating promises →
.catch(...)orawaitrequired. Promise.allover rate-limited APIs unbounded → usep-limit.- Missing
awaitbefore Promise-returning expressions (especially in conditionals). asyncfunctions that don't await anything → probably sync.- No
AbortSignalon long-running operations.
Error handling
- Thrown non-
Errorvalues → always throw anErrorsubclass. catch (err)without typing asunknownand narrowing.try/catchswallowing errors → at minimum log; usually re-throw or wrap.
Tests
- Type-level tests for libraries publishing types.
- Tests touch behavior, not implementation.
describe/itnames are sentences.- Coverage threshold enforced in CI.
Build and config
strict: truein tsconfig.noUncheckedIndexedAccesson for new projects.tsc --noEmitas its own CI step.- Lint and format pass before commit.
- No
node_modulesordistin diff.
Dependencies
- No
latestor floating versions. yarn auditclean.- License-compatible.
- No new deps without justification.
Public API (for libraries)
- New
exports are deliberate. @internalJSDoc on tooling-exported items.- CHANGELOG entry in the same PR as breaking changes.
Refusal
The reviewer skill refuses to review and escalates if:
- Non-TypeScript code in diff.
- Empty PR description.
- Out-of-session-scope code.
- No
strict: truein tsconfig — refuse and escalate. Type discipline is the foundation.
Phrasing
- Lead with concern: "This function takes
data: anyand forwards it to the network layer. What's the actual shape?" - Cite the rule.
nit:for taste.
Related
- Full reference:
languages/typescript/reviewer.md - Gotchas:
languages/typescript/gotchas.md - Universal review:
workflows/code-review.md - Sister roles:
chainsafe-typescript-architect,chainsafe-typescript-developer