/dd:ts:reviewfrom dd:ts
Runs automated checks (format, typecheck, lint, tests) then reviews TypeScript changes against convention skills. Use when reviewing finished TypeScript work, preparing a PR, or auditing code quality.
Ships in dd:ts. 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.
A review through automated checks and a manual pass against every TypeScript convention. This
skill is invoked explicitly (/dd:ts:review), not auto-triggered.
Run these first, cheap ones first. Report a failure and fix it before the manual review.
bun fmt --check # formatting and import order
bun lint # lints, type-aware per bunfig.toml
bun check # types
bun test # tests
On an old Bun, bun fmt and bun lint fail with Script not found. Then the repo is still on
prettier and eslint — run its own scripts, and report the missing Bun tooling as a MEDIUM issue.
git diff HEAD~1 --name-only -- '*.ts' '*.tsx' # for commits
git diff main...HEAD --name-only -- '*.ts' '*.tsx' # for PRs
git status --short -- '*.ts' '*.tsx' # for uncommitted work
Invoke each with the Skill tool to load the full criteria:
dd:ts:core — layout, DRY, control flow, functions, types, enums, errors, async, module
state, logging, classes, files, comments, namingdd:ts:testing — layout, shape, what to assert, mockingdd:ts:tooling — bun, bun fmt, bun lint, bun check, bunfig.toml, tsconfig flagsdd:ts:library — only when the code ships as a packageReview each changed file against all the criteria from Step 3. Check these first — they are the violations that slip through most:
interface instead of typeas const object or a string union for a closed set the code defines — states, modes,
units, the options of a public API — or a raw string in a comparison, a default value or an
argument — instead of an enumlet, or work at import timeany, a ! non-null assertion, an as cast, an unnarrowed catch (e)else, a C-style for'?', -1, null) for a failure the caller handles — instead of the error
in the return type; a catch-all catch that does not narrowif (!x) throw where assert() fits; cleanup repeated in two branches instead of finallyconsole.log or a raw process.stdout.write outside the loggerawait that should be Promise.allfunction declaration where an arrow const fits; a default export; a ../ importFor each issue record:
Bad blank lines and copies are what a diff breaks most often and what a reviewer lets through
most often: the code compiles, bun fmt is silent, and each line looks fine. A blank line can
be wrong in two ways: a wall has none, and a spaced-out body has one after every statement. So
they get their own pass, and the report answers it for every changed file.
Find the candidates, then judge them against Layout and DRY in dd:ts:core:
# runs of 8+ lines with no blank line — wall candidates
awk 'FNR == 1 { n = 0 } NF { n++; if (n == 8) print FILENAME ":" FNR - 7 } !NF { n = 0 }' <files>
# a one-line guard with a blank line after it — spaced-out candidates
awk 'FNR == 1 { p = "" }
!NF && p ~ /^[[:space:]]*if \(.*\) (return|throw)/ { print FILENAME ":" FNR - 1 }
{ p = $0 }' <files>
# lines that appear more than once across the changed files — copy candidates
sed 's/^[[:space:]]*//' <files> | grep -v '^import' | awk 'length > 25' |
sort | uniq -c | awk '$1 > 1' | sort -rn
Flag:
return;ifs on one value;Grade these HIGH. A bad blank line or a copy blocks the merge; it does not warn. Being cosmetic is why it survives review — treating it as cosmetic is the failure this pass exists to stop.
Read every comment run against the Comments budget in dd:ts:core — a module header 1 line
or none, a TSDoc 1 line, an inline // 1–3 lines.
grep -nE '^[[:space:]]*(//|/\*\*|\*)' <file>
grep -nE '@(param|returns)' <file>
Flag a header past one line, a TSDoc past one line whose extra text records no real invariant,
any comment longer than its code, a // that restates the code, and @param / @returns that
restate the signature. Grade these HIGH. Every fix shortens; it never strips a public doc to
nothing.
Output the review in the exact structure of references/report-template.md.
| Decision | Condition |
|---|---|
| Approve | No CRITICAL or HIGH issues; layout, DRY and comment passes clean |
| Warning | Only MEDIUM issues — merge with caution |
| Block | Any CRITICAL or HIGH issue, a wall, a copy or a comment overrun included |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub napalmpapalam/skills --plugin ts5 skills in this plugin
/coreThe TypeScript conventions that apply to almost every edit — code layout and blank lines, DRY, control flow, functions, types and enums, zod at boundaries, errors, async, module state, logging, classes, files and imports, comments, and naming. Use whenever writing, changing, or reviewing TypeScript, declaring types or enums, parsing external data, adding try/catch or error classes, writing async code, organizing files, barrels and imports, writing comments or TSDoc, refactoring code to be shorter, flatter or less repetitive, naming anything, or when the user asks about idiomatic TypeScript. This is the default TypeScript skill — load it first; reach for testing, tooling, or library on top of it when the task calls for them./libraryExtra TypeScript rules for a published package — the public API surface, package-prefixed names, private over/testingTypeScript testing with bun test — file layout, describe/test naming, arrange-act-assert, fixtures and mocks, asserting errors. Use whenever writing or reviewing TypeScript tests, setting up a test runner, organizing test files or fixtures, mocking dependencies, asserting on thrown errors, or when the user asks about test structure, coverage, or testing patterns in a TypeScript project./toolingTypeScript project tooling on Bun — bun as package manager, runtime and test runner, bun fmt for formatting and import order, bun lint for lint rules, bun check for types, bunfig.toml, tsconfig strictness flags, workspaces, and git hooks. Use whenever setting up or changing a TypeScript project's config, editing bunfig.toml or tsconfig.json, choosing format or lint settings, adding dependencies or scripts, configuring a monorepo workspace, setting up CI checks, or when the user asks about strict flags, lint rules, formatting, or which tools to use.