typescript-coding

Apply TypeScript best practices for type safety and maintainability.

1|Updated Dec 15, 2025
One-click install
npx skills add https://github.com/Anveio/conveaux --skill typescript-coding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-coding
Source: https://github.com/Anveio/conveaux/tree/main/.claude/skills/typescript-coding
Command: npx skills add https://github.com/Anveio/conveaux --skill typescript-coding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates TypeScript coding patterns, type system best practices, and safety guarantees.

Core Features & Use Cases

  • Type Safety: Automatically apply patterns for generics, discriminated unions, and conditional types.

Core Features & Use Cases

  • Type System Patterns: Apply generics, conditional types, and type guards automatically.
  • Use Case: When writing TypeScript code, designing types, or working with generics, invoke this Skill to ensure type-safe, maintainable code.

Quick Start

When working with TypeScript, type safety, or type guards, use this Skill to apply established TypeScript patterns.

Quick Start

Use this Skill when the user mentions TypeScript, TS, or type safety, invoke it to apply TypeScript tenets and prevent common pitfalls.

Quick Start

Use this Skill when writing TypeScript code to automatically apply best practices for type safety and code quality.

Quick Start

Invoke this Skill when you need to write TypeScript code that follows established patterns and best practices.

Frequently Asked Questions about typescript-coding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply TypeScript type safety best practices automatically?

Type safety best practices for TypeScript involve using generics, discriminated unions, type guards, and conditional types to prevent common errors. This Skill automatically applies these patterns during code authoring and refactors, eliminating type-related pitfalls while maintaining explicit input/output contracts and precise type-narrowing with 'as const' and 'satisfies'.

What are discriminated unions and how do I use them in TypeScript?

Discriminated unions in TypeScript combine union types with a common property to enable exhaustive type-narrowing and eliminate impossible states. This Skill codifies discriminated union patterns to improve maintainability and ensure the type system catches errors at compile time rather than runtime.

How do I write maintainable TypeScript code with generics and conditional types?

Maintainable TypeScript with generics and conditional types requires establishing clear type contracts and avoiding overly broad type parameters. This Skill automates these patterns during library design and refactors, ensuring immutability-first data surfaces and stable public APIs that scale across projects.

Can I use type guards to narrow types safely in TypeScript?

Type guards narrow union types to specific branches through runtime checks and TypeScript's type-narrowing inference. This Skill applies type-guard patterns and invariant-based runtime checks to guarantee type safety and prevent logic errors in complex type hierarchies.

What's the best way to design stable TypeScript type definitions for libraries?

Stable TypeScript library APIs require explicit type contracts, immutable data surfaces, and consistent type patterns across public exports. This Skill applies design patterns for generics, conditional types, and discriminated unions to ensure your library types remain maintainable and safe as requirements evolve.