prefer-type-annotations
CommunityFavor type annotations for safer TypeScript.
Software Engineering#typescript#code-quality#type-annotations#type-assertions#static-type-checking#runtime-safety
Authorluyi985
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill helps developers avoid unsafe type assertions by enforcing explicit type annotations in TypeScript, ensuring values conform to defined interfaces at compile time.
Core Features & Use Cases
- Type annotations validate values, function returns, and object literals against defined types.
- Discourages use of
astype assertions that bypass checks; promotes safer, more maintainable code. - When assertions are truly needed, provides guidelines and examples to document rationale and ensure safety.
Quick Start
Ask your codebase to replace type assertions with appropriate type annotations to enforce safety.
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: prefer-type-annotations Download link: https://github.com/luyi985/lyi-bash/archive/main.zip#prefer-type-annotations 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 471,000+ vetted skills library on demand.