/typescript:typescript-strictfrom typescript
Enables TypeScript strict mode (strict, noImplicitAny, strictNullChecks) and fixes resulting errors without weakening types or runtime behavior. Use when migrating a codebase to strict type checking.
Ships in typescript. 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.
None: SKILL.md is the whole skill.
Your role is to turn on strict type checking and repair the code so the project is genuinely type-safe, without changing runtime behavior or weakening existing verification. Fixing the diagnostics matters; silencing them does not.
package.json (scripts, packageManager, engines), the lockfile(s), .nvmrc/.node-version, and CI config to learn the authoritative package manager, Node version, and build/lint/test commands.node_modules/.bin/tsc or use the manager's local resolution (npm exec --no-install tsc -- -v, yarn tsc -v, pnpm exec tsc -v). Never use bare interactive npx tsc as an availability test: it can offer to install the unrelated npm package tsc.npm ci, yarn install --immutable, pnpm install --frozen-lockfile) before any version, build, lint, or test probe, then confirm the compiler version. A restore failure is a blocker to report separately from compiler diagnostics. Never install another tsc, and do not switch managers or versions merely to unblock.extends chains, references, tsconfig.*.json (tests, scripts, build, declarations), per-package configs in monorepos, and test runner configs (ts-node/ts-jest/mocha/vitest/jest). Test and secondary configs are in scope, not just the root one."strict": true in each config that type-checks project code (or in the shared base they extend). Do it for test and secondary configs too.strict: false, noImplicitAny: false, strictNullChecks: false, skipLibCheck added for convenience, new exclude entries, narrower include/files, transpileOnly/isolatedModules test runners, or separate relaxed configs. Preserve original input membership and verification strength.noImplicitAny, strictNullChecks, strictFunctionTypes, strictPropertyInitialization, useUnknownInCatchVariables, ...) but the end state must be strict: true.@types/*), and keep the manifest, lockfile, and package manager in sync.Prefer these, roughly in order:
in/typeof/instanceof checks, and unknown for genuinely untyped input (JSON, catch variables, event payloads), validated before use.object, Function, Record<string, any>, or any. Public/exported signatures and declaration output should stay as expressive as before or improve.null/undefined with real checks, defaults that preserve current behavior, optional chaining, or by fixing the declared type. If a property is assigned outside the constructor, prefer restructuring initialization; use ! only when an invariant is guaranteed and documented.this parameters, overloads, or generics for callback/receiver typing problems.Forbidden (in production code and in the project's normal tests):
any (explicit, as any, Record<string, any>, any[], Function), double assertions (as unknown as T), unjustified as T casts, and broad non-null assertions (!).// @ts-ignore, // @ts-nocheck, and // @ts-expect-error used to hide diagnostics. Same for eslint-disable of type-safety rules.If a diagnostic truly cannot be modeled (e.g. a faulty third-party declaration), use the narrowest local escape with a comment explaining why and what would remove it, and list it in the final report. Never use that as the default.
Before supplying a local declaration, ambient module, or replacement for a dependency's types, inspect the installed package's own declarations and upstream type entry points (including test-only or subpath entries) and prefer those or a precisely modeled boundary. A replacement needs contract evidence: name the API/invariant source, keep the original generic, argument, and result relationships, do not substitute permissive signatures for a known API, and verify that valid usage compiles and invalid usage is still rejected. A removal comment alone is not enough. Preserve all original inputs; never check only the files that happen to compile.
@ts-expect-error in a dedicated negative type test that asserts something should not compile is a legitimate use. Keep such checks in test/type-test files, with a one-line reason, and report them as intentional rather than as strictness workarounds.any/casts that already existed before your change are not new regressions, but do not copy them into new code, and prefer tightening them when you edit those lines anyway.tsc -p for each, or tsc -b), including tests and declaration/build outputs. Declaration emit for exported generics should still work and any generated-type assertions/tests must still pass.package.json, restore from the lockfile with the frozen install command to confirm it is still consistent. Do not use --no-package-lock or switch package managers.any, assertions/casts, !, @ts-* and lint disables, .d.ts files, ambient modules, custom matcher/fixture interfaces, and dynamic APIs returning any. Distinguish pre-existing or moved patterns from new weakening.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub microsoft/typescript-skills --plugin typescript6 skills in this plugin
/typescript-build-referencesGuidance for configuring TypeScript project references and incremental builds (`tsc -b`/`--build`, `composite`, solution-style tsconfigs) and declaration emission (`.d.ts` files) with `isolatedDeclarations` in an existing repo or monorepo. Use this whenever asked to add project references, build mode, incremental builds, declaration files, or isolated declarations, even when the repo already has a working build or bundler./typescript-project-setupHow to set up a new TypeScript project/typescript-publish-typesHow to publish TypeScript declarations from an npm package so consumers actually resolve them. Use this when asked to add types/typings to a package, ship .d.ts files, fix "Could not find a declaration file for module", or make a package's published types resolve correctly.Other plugins' skills for the same job