typescript-masteryTypeScript advanced patterns — branded types, discriminated unions, template literals, generics, type guards, tsconfig optimization, and migration strategies
Install via ClawdBot CLI:
clawdbot install msruruguay/typescript-masteryGrade Fair — based on market validation, documentation quality, package completeness, maintenance status, and authenticity signals.
Calls external URL not in known-safe list
https://www.typescriptlang.org/docs/Audited Apr 17, 2026 · audit v1.0
Generated Mar 21, 2026
Implement branded types for currency values (USD, EUR) and account IDs to prevent mixing different financial entities, ensuring type safety in transactions and reporting. Use discriminated unions for transaction states (pending, completed, failed) with exhaustive checking to handle all possible outcomes securely.
Leverage template literal types to define type-safe API endpoints (e.g., GET /products, POST /cart) and event names, reducing runtime errors. Apply custom type guards and Zod validation to sanitize user input and API responses, enhancing data integrity and security.
Use discriminated unions for patient statuses (admitted, discharged, in-treatment) with exhaustive checks to ensure all medical workflows are handled. Implement branded types for patient IDs and medical record numbers to avoid misidentification, critical for compliance and safety.
Apply const assertions for user roles and permissions (admin, editor, viewer) to enable better tree-shaking and performance. Use generics with constraints to build reusable components for chat messages or document edits, ensuring type safety across different data structures.
Follow the incremental migration strategy to convert a large JavaScript codebase to TypeScript, starting with non-critical modules and using tsconfig optimizations for faster compilation. Replace any with unknown and type guards to gradually improve type safety without disrupting existing functionality.
Offer a subscription-based service for web development teams, providing advanced TypeScript patterns and tsconfig optimizations to reduce build times and improve code quality. Revenue comes from monthly or annual licenses, with tiers based on team size and support levels.
Provide expert consulting to enterprises migrating from JavaScript to TypeScript, using the skill's patterns for branded types and performance tuning. Revenue is generated through project-based contracts or hourly rates, focusing on reducing technical debt and enhancing developer productivity.
Conduct workshops and online courses teaching TypeScript mastery, covering topics like discriminated unions and runtime validation with Zod. Revenue streams include course fees, corporate training packages, and certification programs for developers seeking to upskill.
💬 Integration Tip
Integrate this skill by first applying tsconfig.json performance settings like incremental and skipLibCheck for faster builds, then gradually introducing patterns such as branded types and Zod validation in critical modules to enhance type safety without overwhelming the team.
Scored Apr 19, 2026
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Systematic code review patterns covering security, performance, maintainability, correctness, and testing — with severity levels, structured feedback guidance, review process, and anti-patterns to avoid. Use when reviewing PRs, establishing review standards, or improving review quality.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions