type-tightener

Installation
SKILL.md

Type-Tightener: Strict Typing & Schema Hardening

Tighten types in the code affected by the requested change. Preserve behavior and public contracts. Reuse the project's type and validation tools; this skill does not require new schema libraries or cleanup elsewhere in a touched file.

Type Risks to Check in Scope

  1. any and as any casts:
    • Replace with generic parameters, typed interfaces, or unknown + runtime type guard (typeof, instanceof, or Zod parser).
  2. @ts-ignore / @ts-nocheck:
    • Remove ignore directives. Fix underlying type mismatch or declare missing module augmentation.
  3. Loose object dictionaries (Record<string, any> / dict):
    • Replace with explicit TypeScript interface or Python TypedDict / Pydantic model.
  4. Bare strings and shapeless variants:
    • A string that only ever holds a few values becomes a string literal union ("draft" | "sent").
    • An object whose fields depend on its kind becomes a discriminated union tagged by type or kind.
    • A string literal union is already strict; leave it as it is.
Installs
2
Repository
ptshih/skills
First Seen
Oct 5, 2026