From skills
TypeScript/Node conventions — strict compiler settings, parse-don't-cast boundaries, Result-style domain errors, floating-promise hygiene, ESM. Use when writing or reviewing TypeScript.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skills:typescript-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
General TS/Node rules. React Native specifics live in `react-native.md`; both may load on the same file — this one governs the language, that one the platform.
General TS/Node rules. React Native specifics live in react-native.md; both may load on the same file — this one governs the language, that one the platform.
strict: true plus noUncheckedIndexedAccess and exactOptionalPropertyTypes in every new tsconfig. Weakening compiler options to make code compile is fixing the smoke alarm with a hammer.any — use unknown and narrow. No non-null ! outside tests. No as on data you didn't construct.@ts-ignore/@ts-expect-error require a reason on the same line; prefer @ts-expect-error (it errors when stale).zod or equivalent) at the boundary. JSON.parse(x) as Config is a runtime bug with a type-checker alibi.Result shapes so the compiler forces handling.switch ends with a never-typed default (assertNever(x)), so adding a variant breaks the build, not production.?? vs ||: use || only when 0/''/false are genuinely invalid values. Defaulting with || on numeric or string config is a classic silent bug.void-ed with a comment. Enable @typescript-eslint/no-floating-promises.Promise.all — sequential awaiting of unrelated calls is silent 2-10x latency.unhandledRejection crash in Node is a design failure, not bad luck."type": "module"); no new CJS. Node built-ins imported with the node: prefix.index.ts re-export hubs) are import-cycle factories and tree-shaking obstacles — import from the concrete module.node:test, built-in fetch, node --env-file, node:util parseArgs — reach for a package only when these run out."engines": { "node": ">=22" }) and commit the lockfile. CI installs with npm ci, never npm install.node:test (or the repo's established runner) with the same no-real-world rule as Go/Python: no live network, no wall clock, no shared module state between tests — reset or inject.npx claudepluginhub bjornjee/skills --plugin skillsCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.