typescript-best-practices
π―Skillfrom 0xbigboss/claude-code
Provides TypeScript best practices for type-first development, making illegal states unrepresentable, and runtime validation patterns
Overview
typescript-best-practices is a Claude Code skill that provides TypeScript patterns for type-first development. It enforces practices such as making illegal states unrepresentable, exhaustive handling of union types, and runtime validation, ensuring that TypeScript and JavaScript code is robust and type-safe.
Key Features
- Type-first development: Encourages designing types before implementing logic, using the type system as a primary design tool to catch errors at compile time.
- Making illegal states unrepresentable: Guides code structure so that invalid data configurations cannot be expressed through the type system, eliminating entire categories of bugs.
- Exhaustive handling: Ensures all variants of union types and discriminated unions are handled, preventing missed cases that could cause runtime errors.
- Runtime validation patterns: Provides patterns for validating data at runtime boundaries (API responses, user input) to bridge the gap between TypeScript's compile-time checks and real-world data.
Who is this for?
This skill is for TypeScript and JavaScript developers who want to write more robust, type-safe code by leveraging advanced TypeScript patterns. It is particularly useful for developers working on applications where data integrity is critical and who want Claude Code to consistently apply type-first principles when reading or writing code.
Same repository
0xbigboss/claude-code(34 items)
Installation
npx vibeindex add 0xbigboss/claude-code --skill typescript-best-practicesnpx skills add 0xbigboss/claude-code --skill typescript-best-practices~/.claude/skills/typescript-best-practices/SKILL.mdSKILL.md
More from this repository10
React best practices skills covering hooks, effects, refs, component design, escape hatches, and anti-patterns for use when reading or writing React components.
Provides Python best practices for type-first development with dataclasses, discriminated unions, NewType, and Protocol patterns
Fetches web content with intelligent content extraction, converting HTML pages to clean markdown using curl and html2markdown with CSS selectors for targeted extraction.
Provides Zig patterns for type-first development with tagged unions, explicit error sets, comptime validation, and memory management best practices.
Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling for Tamagui-based projects.
Nix best practices skill covering flake structure, overlays, unfree package handling, and binary overlays for working with flake.nix or shell.nix configurations
Provides Playwright test patterns for resilient locators, Page Object Models, fixtures, web-first assertions, and network mocking with CLI-optimized output for agent workflows.
Provides Go patterns for type-first development with custom types, interfaces, functional options, and structured error handling.
React best practices skills covering hooks, effects, refs, component design, escape hatches, and anti-patterns for use when reading or writing React components.
iOS Simulator automation using AXe CLI for touch gestures, text input, screenshots, video recording, and accessibility inspection