type-safety

Resolve TypeScript type safety issues with type guards and explicit typing.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill type-safety-mgd34msu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-safety
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/type-safety
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill type-safety-mgd34msu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses and resolves TypeScript type safety issues, preventing runtime errors caused by unsafe member access, assignments, returns, and calls, particularly when dealing with any or unknown types.

Core Features & Use Cases

  • Detects and Fixes: Identifies and provides solutions for common TypeScript errors like @typescript-eslint/no-unsafe-*.
  • Type Guard Generation: Offers patterns and scripts to create robust type guards for safer data handling.
  • Use Case: When your TypeScript compiler flags no-unsafe-member-access on a variable typed as unknown, this Skill provides strategies to safely access its properties using type guards or discriminated unions.

Quick Start

Use the type-safety skill to fix unsafe member access issues in your codebase.

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-member-access errors in TypeScript?

Fix @typescript-eslint/no-unsafe-member-access errors by implementing type guards, explicit typing, and validation functions to safely access properties on variables typed as `any` or `unknown`. This Skill automates detection and generation of type guards for these scenarios.

What is the best way to handle unsafe assignments and returns with unknown types?

The best way to handle unsafe assignments and returns with `unknown` types is applying type guards or discriminated unions to validate data before access. This Skill resolves type safety issues by generating explicit validation functions for safer data handling.

Can I automatically generate type guards for TypeScript variables?

Yes, you can automatically generate type guards for TypeScript variables using the patterns and scripts provided by this Skill. It supports automated detection and generation of robust type guards to mitigate risks associated with `any` and `unknown` types.

Why does TypeScript flag unsafe calls on my data objects and how do I resolve them?

TypeScript flags unsafe calls to prevent runtime errors from unvalidated data shapes. Resolve them by replacing `any` types with explicit typing and validation functions, using this Skill to implement safe member access and mitigate type-related risks.

Does this type safety approach require any specific ESLint plugins or dependencies to work?

No specific ESLint plugins or external dependencies are required. This Skill operates independently using provided scripts and references to detect and resolve TypeScript type safety issues like unsafe member access, assignments, returns, and calls.