smithery/jagreehal

strict-typescript

>- Configures and applies strict TypeScript safety (tsconfig flags, ts-reset, narrowing, exhaustive checks). Use this skill when tightening compiler options, eliminating unsafe patterns, or reviewing type-safety gaps. Do not use when/for runtime Zod validation at boundaries (use validation-boundary) or general design review (use design-principles).

Installation

$ npx skills add smithery/jagreehal --skill strict-typescript

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/jagreehal · top by installs.

npx skills add smithery/jagreehal

Browse all from smithery/jagreehal

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.3.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,699 B
  • docs SUMMARY.md 203 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

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](references/tsconfig.md) and [references/type-patterns.md](references/type-patterns.md).

Workflow

  1. Audit tsconfig.json against the required flags in [references/tsconfig.md](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](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

  • [references/tsconfig.md](references/tsconfig.md) — required flags and explanations. Read when configuring.
  • [references/type-patterns.md](references/type-patterns.md) — narrowing, ts-reset, type-fest, branded types. Read when fixing unsafe code.
  • [references/eslint-and-build.md](references/eslint-and-build.md) — ESLint, barrels, build tools, rationalizations. Read when enforcing in CI.

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.