Typescript Best Practices
Strict TypeScript modeling rules that replace unchecked casts with validated, impossible-state-proof types.
- CCM score
- 58 of 100
- skills.sh installs
- 12.3K
- GitHub stars
- 20.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers discriminated unions, branded types, constructive modeling, schema-derived types, and exhaustiveness checks for
.tsand.tsxfiles - Enforces a ban on
ascasts andany, withunknownfor external data and a fixed narrowing hierarchy from discriminant switches to user-defined guards - Requires type guards to genuinely verify their claim and prefers
z.inferfrom the repository's schema library over hand-written guards - Applies automatically to any read or edit of
.tsor.tsxfiles, with examples inreferences/patterns.md
Install
$ npx -y skills add cursor/plugins --skill typescript-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Details
- Repository
- github.com/cursor/plugins
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Jun 23, 2026
Questions
What does the typescript-best-practices skill do?
It applies TypeScript best practices whenever an agent reads or edits any .ts or .tsx file. It covers patterns such as discriminated unions, branded types, avoiding unsafe casts, using unknown over any, and boundary validation.
How do I install the typescript-best-practices skill?
Run npx -y skills add cursor/plugins --skill typescript-best-practices -y in your project. Once installed, the agent applies these rules to TypeScript files it touches.
Which other skills lead the Frontend and UI Code category?
typescript-best-practices sits in the Frontend and UI Code category on Claude Marketplaces, alongside vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns and lark-apps. It stands out by focusing on type-system discipline for TypeScript code rather than UI design or React patterns.
More from cursor/plugins
All 93- Deslop11.1K
- Blast Radius8.5K
- How7.5K
- Why7.2K
- Technical Writing7K
- Principle Fix Root Causes6.6K
- Principle Prove It Works6.5K
- Principle Encode Lessons In Structure6.5K
- Arena6.5K
- Architect6.4K
- Principle Guard The Context Window6.4K
- Principle Type System Discipline6.2K
- Create Verification Skill6.1K
- Principle Boundary Discipline6K
- Interrogate6K
- Principle Laziness Protocol5.9K
- Principle Redesign From First Principles5.9K
- Principle Build The Lever5.8K
- Principle Subtract Before You Add5.8K
- Principle Foundational Thinking5.8K
- Principle Minimize Reader Load5.8K
- Poteto Mode5.8K
- Principle Make Operations Idempotent5.7K
- Principle Exhaust The Design Space5.7K
Similar to Typescript Best Practices
More Frontend & UI Codetypescript-writemetabase/metabase2.1K installsTyped TypeScript and JavaScript rules that bar any and casts, enforced by Metabase coding standards.
typescriptgentleman-programming/gentleman-skills505 installsStrict TypeScript patterns for const-derived types, flat interfaces, type guards, and utility types.
typescript-refactorpproenca/dot-skills814 installsType-safety and modernization guide for TypeScript and TSX refactoring, current to TypeScript 6.0 and React 19.
typescript-advanced-typeswshobson/agents102.1K installsComprehensive guide to TypeScript's advanced type system for building reusable, compile-time-safe type logic.
typescript-magicianmcollina/skills3.1K installsAdvanced TypeScript typing skill that eliminates any, resolves compiler errors, and builds generics, guards, and utility types.
typescript-projeffallan/claude-skills16.1K installsAdvanced TypeScript type-system work covering generics, custom guards, branded types, and tRPC end-to-end type safety.