migrate-to-shoehorn

Refactor TypeScript test files by replacing 'as' assertions with @total-typescript/shoehorn functions.

Updated May 31, 2026
One-click install
npx skills add https://github.com/danielorzeata83-a11y/Abc --skill migrate-to-shoehorn-danielorzeata83-a11y
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/danielorzeata83-a11y/Abc/tree/main/.claude/skills/migrate-to-shoehorn
Command: npx skills add https://github.com/danielorzeata83-a11y/Abc --skill migrate-to-shoehorn-danielorzeata83-a11y

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps users refactor as type assertions in tests to @total-typescript/shoehorn for a type-safe experience, enhancing test reliability and maintainability.

Core Features & Use Cases

  • Refactoring as Assertions: Automatically converts as assertions to @total-typescript/shoehorn functions for type safety.
  • Partial Data Handling: Supports passing partial data to tests while maintaining type safety.
  • Use Case: When a user wants to refactor their test suite for better type safety, especially when dealing with large objects and partial data scenarios.

Quick Start

Run the migrate-to-shoehorn skill on your test files to refactor 'as' assertions using @total-typescript/shoehorn.

Frequently Asked Questions about migrate-to-shoehorn

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

FAQPage Schema
How do I refactor 'as' type assertions in TypeScript tests for better type safety?

Yes, @total-typescript/shoehorn supports passing partial data to tests while maintaining type safety. It is specifically designed for testing environments where handling partial object data scenarios is crucial.

What is the best way to handle partial object data in TypeScript test suites?

The best way to handle partial object data in TypeScript test suites is using @total-typescript/shoehorn. It allows you to pass partial data to tests while maintaining strict type safety, avoiding unsafe 'as' assertions.

How do I migrate my TypeScript test files to use shoehorn automatically?

You can migrate TypeScript test files to use shoehorn automatically by running the migrate-to-shoehorn skill on your test files. This script refactors 'as' assertions into type-safe shoehorn functions effortlessly.

Why should I replace 'as' assertions with @total-typescript/shoehorn in my tests?

You should replace 'as' assertions with @total-typescript/shoehorn to achieve a type-safe experience in your tests. This refactoring prevents type errors when dealing with large objects and partial data scenarios, enhancing overall test reliability.

Does @total-typescript/shoehorn work with large objects in TypeScript testing environments?

Yes, @total-typescript/shoehorn works effectively with large objects in TypeScript testing environments. It is ideal for refactoring test suites where type safety is crucial, especially when handling partial data for large object structures.