Home/Skills/TypeScript Strict Mode
Claude Code
SKILL.md
Language
Verified
Featured

TypeScript Strict Mode

Ensures strict type safety, proper generics usage, and advanced TypeScript patterns across your codebase.

Claude Code
Cursor
Windsurf
VS Code

Quick Info

File Type:SKILL.md
Platform:Claude Code
Author:MCP Directory
Category:Language

What This Skill Does

Enforces TypeScript best practices including strict mode compliance, proper generic constraints, discriminated unions, exhaustive switch statements, and branded types. Eliminates type-safety loopholes and produces more reliable code.

Tags

#typescript
#types
#strict
#generics

Skill Code Preview

Copy this code to your SKILL.md file

---
name: typescript-strict
description: TypeScript strict mode enforcer
---
# TypeScript Strict Mode
## Rules
- Never use 'any' — use 'unknown' and narrow with type guards
- Always define explicit return types on functions
- Use discriminated unions for algebraic data types
- Prefer 'satisfies' over type assertions
- Use branded types for IDs and domain values

Installation Instructions

For Claude Code:

  1. Create a .claude/ folder in your project root
  2. Create a file named SKILL.md in the .claude/ folder
  3. Copy the skill code above and paste it into the SKILL.md file
  4. Save the file and Claude Code will automatically use this skill

For Cursor:

  1. Create a file named .cursorrules in your project root
  2. Copy the skill code above and paste it into the file
  3. Save and Cursor will apply these rules automatically

For Windsurf:

  1. Open Windsurf IDE settings
  2. Navigate to AI Rules / Custom Instructions
  3. Copy and paste the skill code above
  4. Save and apply the rules

Recommended MCP Servers

These MCP servers work great with this skill

Need More AI Skills?

Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.