/tia-skills:typescript-best-practicesfrom tia-skills
TypeScript design and safety rules. Use when reading or editing .ts or .tsx files, especially when modeling data, parsing boundaries, or resolving type errors.
Ships in tia-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Make invalid states hard to construct and validate untrusted data where it enters the program. Types should express the program's real guarantees, not hide uncertainty.
| Rule | Practice |
|---|---|
| Variants | Use discriminated unions with a literal kind; do not use bags of optional fields. |
| Domain values | Brand primitives when values of the same base type must not mix. Validate once at construction. |
| Construction | Express constraints in the type where practical, such as [T, ...T[]] for non-empty arrays. |
| External data | Accept unknown, parse it at the boundary, and use named domain types inside. |
| Assertions | Avoid any and as. Narrow with a discriminant, in, typeof, instanceof, or a truthful guard. |
| Exhaustiveness | Put const exhaustive: never = value in the default branch of a discriminant switch. |
| Inference | Prefer satisfies to as; prefer Pick, Omit, Parameters, ReturnType, Awaited, and typeof before a duplicate interface. |
| APIs | Prefer object arguments when parameter order is not obvious. Keep positional arguments only on proven hot paths. |
| Tests and diagnostics | Test real behavior when possible and emit structured diagnostics rather than shipping console.log. |
Strengthen a type only when the looser type forces a non-null assertion, cast, or impossible-state branch. A type that makes ordinary code needlessly awkward is not a better model.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mattiaippoliti/tia-skills --plugin tia-skills87 skills in this plugin
/apple-designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces./architectDesign a non-trivial change before implementation by sketching its callers, types, boundaries, and failure cases. Use for '/architect', 'architect this', or when coding first would lock in the wrong shape./ask-mattiaAsk which skill or flow fits your situation. A router over the skills in this repo./audit-data-intensive-repoAudit a repository's data architecture, scalability, consistency, failure handling, dataflow, and operability using data-intensive system principles. Use for evidence-backed repo reviews and risk assessments; not greenfield design, performance tuning implementation, or a security-only review./cavemanUltra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".
/claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately.