/nlsmdn:review-typescript [--staged | --unpushed | --changed | --all | --multi]from nlsmdn
TypeScript-specific code review focused on JUDGMENT-level type design a linter can't decide — type modeling (make invalid states unrepresentable), inference-vs-annotation calls, and casts/`any` that hide a real modeling problem. Deliberately does NOT duplicate the project's linter, and checks first whether that linter is type-aware at all (typescript-eslint's `*-type-checked` configs, or oxlint's opt-in `--type-aware`) — because more than half the rules it defers to need type information. Auto-invoked by `code-review` on TypeScript projects. Triggers "review typescript", "typescript review", "type design review".
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
TypeScript review that covers what a type-aware linter cannot decide for you — how types are modeled, when to annotate vs infer, and whether a cast or any is papering over a design problem. These are judgment calls; the mechanical rules are ESLint's job.
Use only these finding priorities, in descending order:
Grade the demonstrated consequence, realistic reachability, and available recovery against project priorities. A category, missing convention, hypothetical future problem, or confidence that a claim is true does not set its priority. Do not assign automatic severity floors or ceilings. Keep unverified claims in validation gaps, outside the graded finding count; distinguish suggestions from defects. For plans, trace the consequence if implemented and state the assumptions.
Use the short labels Must Fix, Should Fix, and Nice to Have in summaries and ledgers.
Keep effort, verification status, user-facing change size, and tool/vendor diagnostic ratings
separate. When called by code-review, return its requested evidence and impact fields; the parent
owns scoring and final triage. Otherwise apply this rubric directly. Omit empty priority sections.
This skill assumes a type-aware linter handles the mechanical layer, and "type-aware" is the load-bearing word. Most of the rules below need type information, so they run only where that layer is actually switched on. Establish which linter the project uses and whether it has types before deciding anything is out of scope.
| Linter | Type-aware layer | How to tell |
|---|---|---|
| typescript-eslint | The *-type-checked configs | eslint.config.* / .eslintrc* extends recommended-type-checked or strict-type-checked, with parserOptions.projectService (or project) |
| oxlint | Opt-in. Stable since July 2026 (tsgolint v7), covering 59 of typescript-eslint's 61 type-aware rules | --type-aware on the command line, or options.typeAware: true in the root config. Also needs the oxlint-tsgolint package and TypeScript 7+ |
| Neither, or syntax-only | none | Everything in the list below is yours to review |
Three oxlint traps, each of which makes a linter look configured when it isn't:
correctness category is on by default. pedantic, style, suspicious,
restriction, perf and nursery are all off unless something turns them on.-A / -W / -D apply to whole categories and are applied left to right. A script like
oxlint -A all -D typescript/no-explicit-any src/ allows every category and then denies one
rule — so it runs exactly one rule, and a clean run means almost nothing.oxlint-tsgolint is an optional peer dependency, so when it is missing nothing complains;
type-aware rules simply never run.Only treat the following as out of scope when the type-aware layer genuinely runs. Rules marked † need type information and are absent from any syntax-only setup — in that case they are review findings, not lint findings:
no-unnecessary-type-assertion†), explicit any
(no-explicit-any), unsafe any flow (no-unsafe-*†), non-null ! (no-non-null-assertion)@ts-ignore/@ts-expect-error without a reason (ban-ts-comment)await-thenable, throw/reject non-Error (no-floating-promises†,
no-misused-promises†, only-throw-error†)Function/{}/wrapper objects (no-unsafe-function-type,
no-empty-object-type, no-wrapper-object-types)?? vs ||, template-expression coercion
(strict-boolean-expressions†, prefer-nullish-coalescing†, restrict-template-expressions†)import type, prefer-as-const, trivially-inferrable annotations (consistent-type-imports,
prefer-as-const, no-inferrable-types)no-unnecessary-condition†, no-unnecessary-type-parameters†, switch-exhaustiveness-check†)That † set is over half the list, which is why the baseline read matters: on a syntax-only project this skill's scope is materially wider, and staying silent about a floating promise because "lint covers it" would be wrong.
Type design is decided once; the ways it gets violated recur with every change. So the default
review looks only at what the diff introduces. Whether the project's linter is configured well at
all is a project-level question — see §P, which runs at --all and nowhere else.
Run on .ts / .tsx / .mts / .cts. Complements review-cleancode (SOLID/DRY/smells) — don't repeat it.
/review-typescript # Review context-related code
/review-typescript --staged # Review staged changes
/review-typescript --unpushed # Review files changed across all unpushed commits
/review-typescript --changed # Review unstaged changes
/review-typescript --all # Full codebase audit (parallel agents)
/review-typescript --multi # Also get external advisor opinions
| Flag | Scope | Method |
|---|---|---|
| (none) | Context-related code | Files from the current conversation context. If no context, ask the user to specify files or use --staged/--changed/--all. |
--staged | Staged changes | git diff --cached --name-only |
--unpushed | Files changed across unpushed commits | git diff --name-only $(git rev-list HEAD --not --remotes | tail -1)^..HEAD |
--changed | Unstaged changes | git diff --name-only |
--all | Full codebase + §P project-level checks | Glob *.ts/*.tsx/*.mts/*.cts, parallel agents |
--multi | Add external opinions | Combines with any scope above; invokes second-opinion --quick |
--unpushed derives its range from git rev-list HEAD --not --remotes (oldest unpushed commit's parent → HEAD). If nothing is unpushed, or there is no remote/upstream (or the range walks back to the root commit) so it can't be determined reliably, stop and ask the user to pick another scope.
Restrict the resolved file list to TypeScript extensions before reviewing.
Determine scope (see table) and filter to TypeScript files only.
Read CLAUDE.md in the repo root for project conventions.
Establish the lint baseline. Identify the linter (eslint.config.*/.eslintrc*, .oxlintrc.json, or a lint script in package.json — read the script, since CLI flags can override the config entirely) and whether type-aware linting runs. Record which of the † rules above are therefore in scope. At a narrower scope this only tells you what to stay quiet about; the recommendation itself is §P.
Review each file against the three judgment categories — against what the diff introduces (load references/checklist.md). Add §P only at --all.
Parallelize if scope has >5 files: one sub-agent per category, merge and dedupe.
External opinions (if --multi): invoke second-opinion --quick with this prompt:
Read-only TypeScript review. Assume a type-aware linter (typescript-eslint `strict-type-checked`, or oxlint with `--type-aware`) already handles mechanical rules — do NOT repeat lint-level findings. Focus on TYPE DESIGN judgment: are invalid states representable that shouldn't be? Are types modeled with unions of interfaces or a bag of optional fields? Are functions returning wider types than callers need? Is inference used where it could be, and are annotations added only where they serve a purpose (definition-site checking of complex literals, public-API contracts)? Do any casts/`any` compile but hide a wrong upstream type? 300 words or less.
Wait for all external results before proceeding.
Classify severity and report, grouped by severity.
Load references/checklist.md before reviewing files — it carries the full bullet
catalogue for all three categories. Use Review grading above for priority. The categories:
satisfies vs colon
annotation vs as.any masking a
modeling gap.State your reasoning for each finding. "Cast hides that getUser is mistyped as any" is a
finding; "there's a cast here" is not (and is probably already lint-flagged).
--all onlyConfiguration, not code. It changes rarely, so raising it on a diff review is noise.
strict-type-checked (or recommended-type-checked) and set
parserOptions.projectService.oxlint-tsgolint package and turn on options.typeAware: true (or
--type-aware), on TypeScript 7+. Do not tell an oxlint project to adopt typescript-eslint;
it has covered 59 of the 61 type-aware rules since July 2026. There is no strict-type-checked
equivalent preset, so categories are selected explicitly.-A all
in a package.json lint script, say?strict, and noUncheckedIndexedAccess.## TypeScript Review: {scope}
### Baseline
{One line: which linter, and whether type-aware linting runs — so the reader knows which of the †
rules this review was responsible for. **At `--all` only:** the §P recommendations. Omit on a diff
review if the type-aware layer is in place.}
### Critical Issues (Must Fix)
- {file}:{line} — {category}: {description}
**Why it's not a lint finding:** {what judgment this needed}
**Impact:** {what breaks}
**Fix:** {model change / boundary validation — with code}
### Improvements (Should Fix)
- {file}:{line} — {category}: {description}
**Fix:** {solution}
### Suggestions (Nice to Have)
- {file}:{line} — {category}: {description} — {suggested change}
If --multi was used, append one subsection per advisor that responded (titled with the advisor's
name as reported by second-opinion), then a Cross-Model Agreement subsection.
Invalid state representable:
/review-typescript --staged
Finds a FetchState type { loading: boolean; data?: T; error?: string } — nothing prevents loading: true with both data and error set. Traces consumers before grading: Should Fix if contradictory states cause normal-flow failures, otherwise Nice to Have for a useful simplification. Suggests a discriminated-union rewrite. Not a lint finding: the type is internally consistent; only a human knows the states are illegal.
Cast hiding a mistyped source:
/review-typescript --changed
Finds const total = order.items as LineItem[] where order.items is typed any (from an untyped API client). Reports Should Fix only when the unchecked boundary causes a demonstrated failure or meaningful repair cost; otherwise Nice to Have. Fix the client's return type; the cast is a symptom. no-unnecessary-type-assertion stays silent because the cast is load-bearing.
Good annotation missing:
/review-typescript
A 40-line hand-written const config = {...} has no type, so a typo in a nested key only errors at a distant consumer. Reports Nice to Have — add satisfies AppConfig for definition-site checking while keeping the narrow inferred shape.
Solution: Check whether the project actually runs that rule — over half the list needs type information, and under oxlint that layer is opt-in and silently absent without oxlint-tsgolint. If the rule runs, drop the finding. If it doesn't, the finding is legitimately yours; fold the configuration gap into §P rather than reporting it per-occurrence. This skill only reports what a type-aware linter can't judge.
Solution: Trace where the value comes from. In-process, already-typed data → the cast may be fine (or redundant, i.e. lint's problem). External/parsed/DOM data → recommend a runtime guard; the type system can't vouch for data it never saw.
null, prefer interface/type, etc.).What SKILL.md sets; muted values are Claude Code's defaults
highOther plugins' skills for the same job
65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`)./check-agent-logsSearch past Claude Code, Codex, Cursor CLI, Devin CLI, Droid, and Pi session logs to recover context from earlier work across the current project and sibling checkouts. Use when a bug, topic, or decision was handled in a previous session but its agent or checkout is unknown; when the user says "we fixed/discussed this before", "find the session where", "recover prior context", "check agent logs", "check Claude projects", "search past sessions/transcripts", or "which checkout was that in". Do not use for aggregate failure-pattern analysis; use review-logs for that./codebase-reviewReview a whole codebase aspect by aspect, with aspects fitted to the project type (mobile, desktop, web frontend, static site, CLI, backend, library) — docs truth-check, architecture, tests, security, the type's foundations, feature deep dives, consistency, roadmap — writing a doc per aspect and a verified findings ledger that doubles as the TODO. Plans first (recon, `blind-spots`, `review-plan`, plan approval), then walks the plan with the user aspect by aspect — agents review and verify in the background, the user confirms rulings and decides judgment calls one at a time. `--auto` runs independently after the gate, with decision waves at the end. `--fix` hands settled findings through `crew` to worker sessions, integrated locally, never pushed. Use for "codebase review", "review the whole codebase", "onboard me to this repo", "deep dive this app", "audit the code base", "review and fix everything". Not for a diff or PR (code-review), a CLI release pass (release-review), or building a feature (longshot)./codebase-review-typescriptSupply TypeScript and JavaScript structural evidence to codebase-review using dependency-cruiser, ESLint complexity, and Git churn. Use for whole-codebase import-cycle and complexity-hotspot investigation, or when discovered as a project-local codebase-review extension. Does not replace review-typescript's type-design checks or review a diff./code-guideCoach the user through writing a feature themselves, one small step at a time, the way an experienced developer would build it. Each step comes with the code to type and a checkpoint that proves it works, such as logging the endpoint's response shape before typing it, or rendering a hardcoded value before wiring the real one. After each step the agent reads the user's diff and verifies it. The happy path comes first and edge cases come last. Use when the user says "code-guide", "guide me to write", "help me write this myself", "I want to code it myself", "coach me through implementing", "walk me through building this feature", "don't write it for me", or wants to learn by typing the code. Do NOT use for console or dashboard setup (use guide), explaining existing code (use code-tour), or when the agent should implement the change itself (use plan or longshot).npx claudepluginhub nielsmadan/skills --plugin nlsmdn