Agent skill
type-safety-audit
Audits TypeScript code for type safety best practices - no any usage, branded types for IDs, runtime validation, proper type narrowing. Use before committing TypeScript code or during type system reviews.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/type-safety-audit
SKILL.md
TypeScript Type Safety Audit Skill
Purpose
Audit TypeScript code for type safety best practices. This skill ensures the type system is leveraged correctly to catch bugs at compile-time, prevent runtime type errors, and maintain type safety across API boundaries.
What This Skill Checks
Critical Violations (Block Commit)
- Any Type Usage - Zero tolerance policy
- Missing Branded Types - IDs must be branded
- Missing Runtime Validation - API boundaries need validation
- Type Assertions - Prefer type guards
- Unsafe Null Handling - Check for null/undefined
- Weak Generic Constraints - Generics need constraints
- Non-Strict tsconfig - Must have strict mode
For detailed checks with code examples and rationale, see references/CHECKS-REFERENCE.md.
- Hermes Code Reviewer: Type Safety Patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?