type-safety

Generate runtime guards and validation for unsafe TypeScript typing patterns.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/gil00pita/lanify --skill type-safety-gil00pita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-safety
Source: https://github.com/gil00pita/lanify/tree/main/.agents/skills/type-safety
Command: npx skills add https://github.com/gil00pita/lanify --skill type-safety-gil00pita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Type safety fixes address runtime risks caused by unsafe TypeScript typings, such as any/unknown usage and unguarded operations.

Core Features & Use Cases

  • Detection and remediation of unsafe member access, assignments, returns, calls, and arguments
  • Centralized workflows to generate type guards, validate data, and enforce stricter typing across codebases
  • Use cases include preventing runtime errors in large TS codebases and improving maintainability through explicit type guards

Quick Start

Identify the unsafe operation and apply the appropriate workflow to implement a type guard or validation.

Frequently Asked Questions about type-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix @typescript-eslint/no-unsafe-* errors in my codebase?

Fix @typescript-eslint/no-unsafe-* errors by implementing type guards and runtime validation patterns to replace unsafe any and unknown usage. This skill detects unsafe member access, assignments, and returns, generating guards to enforce strict static analysis.

What is the best way to enforce TypeScript type safety across a large project?

Enforce TypeScript type safety by applying centralized workflows that generate type guards and validate data. This approach surfaces unsafe patterns like any usage and provides explicit runtime validation to prevent errors during code modification and refactoring.

Can I automatically generate type guards for unknown variables in TypeScript?

Yes, you can automatically generate type guards for unknown variables in TypeScript. This skill includes detection scripts to surface unsafe operations and generators to produce runtime guards, aligning with workflows for member-access and argument safety.

Does this static analysis approach work for runtime validation as well as compile-time checks?

Yes, this static analysis approach works for runtime validation by generating type guards that bridge compile-time checks and runtime safety. It remediates unsafe calls and arguments, ensuring data validated at runtime matches the expected TypeScript typings.

Why do I need runtime type guards when using TypeScript static analysis?

You need runtime type guards because static analysis cannot prevent runtime risks caused by unguarded operations and any usage. Implementing validation patterns ensures data integrity at boundaries, improving maintainability and preventing errors that TypeScript alone misses.