migrate-to-shoehorn

Convert 'as' assertions in TypeScript test files to Shoehorn type-safe alternatives.

9|Updated May 25, 2026
One-click install
npx skills add https://github.com/wzser/supermatrix --skill migrate-to-shoehorn-wzser
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/wzser/supermatrix/tree/main/platform/skill-master/skills/migrate-to-shoehorn
Command: npx skills add https://github.com/wzser/supermatrix --skill migrate-to-shoehorn-wzser

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @total-typescript/shoehorn, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the process of updating TypeScript test files to use type-safe Shoehorn alternatives for 'as' assertions, improving test maintainability and reliability.

Core Features & Use Cases

  • Type-Safe Conversion: Automatically converts 'as' assertions in TypeScript test files to Shoehorn's type-safe alternatives.
  • Test Maintainability: Reduces the risk of type-related errors and simplifies future maintenance of test code.
  • Use Case: Ideal for developers who want to refactor their test suite to be more robust and maintainable.

Quick Start

Run the migrate-to-shoehorn skill to convert all 'as' assertions in your test files to Shoehorn's type-safe alternatives.

Frequently Asked Questions about migrate-to-shoehorn

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

FAQPage Schema
How do I convert 'as' assertions to type-safe alternatives in TypeScript tests?▼

To convert 'as' assertions in TypeScript tests, you can use the migrate-to-shoehorn skill to automatically replace them with Shoehorn's type-safe alternatives, improving overall test maintainability and reliability.

What is the benefit of replacing 'as' assertions with Shoehorn in TypeScript?▼

Replacing 'as' assertions with Shoehorn in TypeScript reduces the risk of type-related errors in your test suite. This refactoring approach simplifies future test maintenance and ensures better type safety.

Do I need the Shoehorn library installed to refactor my TypeScript test files?▼

Yes, you need the @total-typescript/shoehorn library installed and available in your project environment, as the migrate-to-shoehorn conversion process requires this dependency to function correctly.

What is the best way to refactor TypeScript test suites for better type safety?▼

The best way to refactor TypeScript test suites for type safety is automating the conversion of unsafe type assertions to type-safe Shoehorn alternatives, which reduces type-related errors and simplifies ongoing test code maintenance.

When should I avoid using 'as' assertions in TypeScript test code?▼

You should avoid using 'as' assertions in TypeScript test code when type safety and long-term maintainability are priorities, as they bypass compiler checks and increase the risk of type-related errors.