← Back to Library|SkillsTypeScript Strict Mode
Install this skill: copy and save to ~/.claude/skills/typescript-strict-mode/SKILL.md

TypeScript Strict Mode

Finds and fixes TypeScript type issues: replaces `any`, adds missing types, removes `@ts-ignore`, enforces strict patterns.

5 min|Intermediate
BuildDeep WorkDeveloper
SKILL.md~/.claude/skills/typescript-strict-mode/
---
name: typescript-strict-mode
description: |
  Finds and fixes TypeScript type safety issues across the codebase.
  IMPORTANT: Activate this skill whenever the user asks to "fix types",
  "add types", "remove any types", "typescript strict", or "type safety".
  This skill MUST be used for all TypeScript strictness requests.
---

# TypeScript Strict Mode

Scans your codebase for TypeScript type safety issues and fixes them: replaces `any` with proper types, adds missing type annotations, remov

Members Only

Become a member to access this content

Become a Member

Scans your codebase for TypeScript type safety issues and fixes them: replaces any with proper types, adds missing type annotations, removes @ts-ignore comments, and enforces strict patterns.

Say any of these to activate this skill: - "fix the types" - "remove all any types" - "make TypeScript stricter" - "Use skill: typescript strict mode"

1. Search the codebase for any types, @ts-ignore comments, and @ts-expect-error without descriptions 2. For each any, read the surrounding code to infer the correct type 3. Replace any with the specific type (interface, union, generic, etc.) 4. For @ts-ignore, determine the underlying type error and fix it properly 5. Check for functions missing return types on exported functions 6. Run tsc --noEmit after each batch of fixes to verify no new errors 7. Report the count of issues fixed and any remaining that need manual review

  • Replace any with the most specific type possible, not unknown everywhere
  • If a type is genuinely unknowable at compile time, unknown with a type guard is correct
  • Do not add return types to internal/private functions (only exported ones)
  • Preserve @ts-expect-error comments that have a description explaining why
  • Fix issues in batches by file, running the type checker between batches
  • Best with: Claude Code CLI (can run tsc and iterate on type errors)
  • Also works: Cursor, Windsurf
  • Expects: A TypeScript project (tsconfig.json present)
  • Summary: count of any types, @ts-ignore comments, and missing return types found
  • Fixes applied file-by-file
  • Final tsc --noEmit output confirming clean compilation