Skip to content

meow:typescript

Strict TypeScript patterns for null safety, type guards, discriminated unions, utility types, and ESLint configuration.

What This Skill Does

meow:typescript enforces strict TypeScript patterns that prevent the subtle bugs tsc doesn't catch on its own. It goes beyond "no any types" into the nuances: implicit truthiness checks that miss 0 and "", untyped error catches, runtime enums that add bundle weight, and as assertions that lie to the compiler. The skill auto-activates on .ts and .tsx files.

Core Capabilities

  • Strict null handling — Explicit === null || === undefined instead of implicit truthiness
  • Type guard patterns — Proper runtime narrowing instead of as SomeType assertions
  • Discriminated unions{ ok: true; data: T } | { ok: false; error: string } for result types
  • Utility type mastery — Correct use of Partial, Readonly, Pick, Omit, Record
  • Import conventionsimport type { X } for type-only imports, named exports over defaults
  • ESLint configuration — Recommended strict rules for @typescript-eslint
  • Strict tsconfigstrict: true, noUncheckedIndexedAccess: true, exactOptionalPropertyTypes: true

When to Use This

Use meow:typescript when...

  • You're writing new TypeScript code and want strict patterns
  • You're fixing type errors or ESLint issues
  • You need to refactor code for better type safety
  • You want to set up strict TypeScript configuration

Don't use for...

Usage

bash
# Auto-activates on .ts/.tsx files, or invoke explicitly
/meow:typescript fix type errors in auth module
/meow:typescript add strict null checks
/meow:typescript configure ESLint for strict TypeScript

Example Prompts

PromptWhat typescript does
fix type errors in auth.tsReplaces any with proper types, adds null guards
make this function type-safeAdds generics, discriminated unions, or type guards
set up strict TypeScript configGenerates tsconfig.json with all strict flags
add ESLint rules for TypeScriptConfigures @typescript-eslint strict rules

Quick Workflow

Detect concern (type error? new code? refactor? config?)
  → Load strict-patterns.md reference
  → Apply: null guards, type guards, utility types, imports
  → Verify: npx tsc --noEmit → 0 errors

Skill Details

Phase: 3
Used by: developer agent

Released under the MIT License.