typecheck

Analyzes TypeScript files and proposes safer type fixes.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/morgs32/skills --skill typecheck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typecheck
Source: https://github.com/morgs32/skills/tree/main/skills/typecheck
Command: npx skills add https://github.com/morgs32/skills --skill typecheck

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams enforce TypeScript safety by providing guidance to avoid unsafe patterns and to improve type definitions, resulting in safer, more maintainable code.

Core Features & Use Cases

  • Establishes and enforces safer type patterns through rules and best practices.
  • Guides debugging TypeScript errors by suggesting type guards and proper generics.
  • Use Case: When refactoring a complex codebase with unions and generics, the skill helps identify safe narrowing strategies and safer design decisions.

Quick Start

Analyze a TypeScript file with type errors and propose safer type fixes to improve safety without runtime changes.

Frequently Asked Questions about typecheck

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

FAQPage Schema
How do I fix unsafe type assertions in TypeScript during a refactor?

To fix unsafe type assertions during a TypeScript refactor, apply type guards and proper generics to narrow type unions safely. This prevents forced casts by guiding you toward safer type definitions and narrowing strategies without altering runtime behavior.

What is the best way to resolve TypeScript errors with complex generics?

The best way to resolve TypeScript errors with complex generics is to use type narrowing and proper typing utilities. By establishing safer type patterns, you can debug errors effectively and avoid unsafe forced casts in your codebase.

How does type narrowing prevent forced casts in TypeScript?

Type narrowing prevents forced casts in TypeScript by validating specific types within unions before access. Using type guards allows you to safely isolate types during API surface changes, eliminating the need for unsafe assertions and improving maintainability.

Can I use type guards to improve error handling for TypeScript unions?

Yes, you can use type guards to improve error handling for TypeScript unions. They provide strict type-safe rules that validate types at runtime, helping you avoid unsafe patterns and safely manage complex generics during codebase refactoring.

When do I need type-safe rules for TypeScript API surface changes?

You need type-safe rules for TypeScript API surface changes when modifying complex generics and type unions. Establishing safer type patterns during these changes prevents unsafe assertions and ensures error handling improvements do not break existing type definitions.

Why does avoiding unsafe type assertions improve codebase maintainability?

Avoiding unsafe type assertions improves codebase maintainability by enforcing strict type safety through proper type guards and narrowing. This practice identifies safe design decisions during refactors, resulting in safer code without requiring runtime changes.