Agent Skills: Strict TypeScript

>-

UncategorizedID: jagreehal/jagreehal-claude-skills/strict-typescript

Install this agent skill to your local

pnpm dlx add-skill https://github.com/jagreehal/jagreehal-claude-skills/tree/HEAD/skills/strict-typescript

Skill Files

Browse the full folder contents for strict-typescript.

Download Skill

Loading file tree…

skills/strict-typescript/SKILL.md

Skill Metadata

Name
strict-typescript
Description
>-

Strict TypeScript

Critical rules

  • strict: true is the floor. Also enable noUncheckedIndexedAccess, exactOptionalPropertyTypes, verbatimModuleSyntax, erasableSyntaxOnly, and related unused/fallthrough flags.
  • Ban any / as / non-null assertions in source. Narrow with guards, discriminated unions, or Zod.
  • Install @total-typescript/ts-reset so JSON.parse is unknown.
  • Prefer satisfies and as const over loose object typing; avoid barrels and erasable-syntax violations (enum, param properties).
  • Enforce with @typescript-eslint/strict-type-checked at 'error'.
  • Before editing tsconfig or patterns, read references/tsconfig.md and references/type-patterns.md.

Workflow

  1. Audit tsconfig.json against the required flags in references/tsconfig.md.
  2. Add reset.d.ts importing @total-typescript/ts-reset.
  3. Enable strict ESLint type-checked rules — see references/eslint-and-build.md.
  4. Replace as/any with guards, unions, or Zod; brand confusable IDs.
  5. Prefer direct imports over barrels; profile with tsc --extendedDiagnostics if compile is slow.
  6. Confirm tsc --noEmit and ESLint pass clean.

Resources

Validation

  • [ ] Supplementary strict flags all enabled
  • [ ] ts-reset installed via reset.d.ts
  • [ ] No any/as in source (fixtures aside); narrowing is typed
  • [ ] satisfies / as const for literal configs
  • [ ] Strict type-checked ESLint rules are 'error'
  • [ ] No hot-path barrel files; tsc --noEmit clean

Constraints

  • Prototypes may trade safety for speed; runtime input parsing belongs in validation-boundary.
  • Related: pattern-enforcement, validation-boundary, fn-args-deps, result-types.