typescript-enforcer
CommunityEnforce strict TypeScript, eliminate 'any'.
System Documentation
What problem does it solve?
This Skill combats the pervasive issue of loose TypeScript usage, particularly the any type, which undermines type safety, leads to runtime errors, and makes codebases difficult to maintain.
Core Features & Use Cases
- Zero Tolerance for
any: Strictly enforces the avoidance ofany, guiding users to useunknownwith type guards for truly dynamic scenarios. - Explicit Typing: Requires explicit function parameters and return types, proper interfaces for all data structures, and specific types over broad ones.
- Strict Configuration: Provides a
tsconfig.jsonconfiguration to enable strict mode, catching potential type errors at compile time. - Use Case: When reviewing a pull request, activate this skill to automatically identify and flag any
anytypes, missing return types, or improperly defined interfaces, ensuring high-quality, type-safe TypeScript code.
Quick Start
Example: Explicitly typed function with interface
interface User { id: string; name: string; email: string; }
function createUser(data: User): User { return { id: data.id, name: data.name, email: data.email, createdAt: new Date() }; }
Example: Using 'unknown' with a type guard
function isUser(data: unknown): data is User { return ( typeof data === 'object' && data !== null && 'id' in data && 'name' in data ); }
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: typescript-enforcer Download link: https://github.com/T1nker-1220/.claude/archive/main.zip#typescript-enforcer Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.