migrate-to-shoehorn

Migrates TypeScript test assertions from `as` to Shoehorn for enhanced type safety and partial data handling.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions --skill migrate-to-shoehorn-tgmarinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions/tree/main/upstream-snapshots/mattpocock-skills/skills/misc/migrate-to-shoehorn
Command: npx skills add https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions --skill migrate-to-shoehorn-tgmarinho

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers replace as type assertions in tests with Shoehorn, ensuring type safety and partial data handling.

Core Features & Use Cases

  • Type-Safe Testing: Migrate as assertions to Shoehorn for better type safety.
  • Partial Data Handling: Use Shoehorn to pass partial data in tests while maintaining TypeScript compatibility.
  • Use Case: When a developer wants to replace as assertions in tests with a more robust solution that supports partial data.

Quick Start

Run the migrate-to-shoehorn skill to update your test assertions with 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 replace 'as' type assertions in TypeScript tests with Shoehorn?

To replace 'as' type assertions in TypeScript tests with Shoehorn, you can run the migrate-to-shoehorn skill to automatically update your test suite. This migration ensures enhanced type safety and robust partial data handling.

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

Handling partial data in TypeScript test assertions is best achieved by migrating to Shoehorn. It allows you to pass partial data while maintaining strict TypeScript compatibility and avoiding brittle type casts.

Why should I migrate my test assertions from 'as' to Shoehorn?

You should migrate test assertions from 'as' to Shoehorn to enforce type safety and prevent runtime errors. The 'as' keyword bypasses compiler checks, whereas Shoehorn safely handles partial data structures.

Does migrating to Shoehorn require the @total-typescript/shoehorn dependency?

Yes, migrating to Shoehorn requires the @total-typescript/shoehorn dependency for implementation. You must install this package in your project before running the migration script to ensure type-safe testing.

Can I use Shoehorn for partial data manipulation across my entire test suite?

You can use Shoehorn for partial data manipulation across your entire test suite by running the migration skill. It systematically updates applicable test assertions to support robust partial data handling.