migrate-to-shoehorn

Migrate TypeScript test code from as assertions to shoehorn fromPartial and fromAny patterns.

13|3|Updated May 12, 2026
One-click install
npx skills add https://github.com/kevinnft/ai-agent-skills --skill migrate-to-shoehorn-kevinnft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/kevinnft/ai-agent-skills/tree/main/skills/mattpocock/misc/migrate-to-shoehorn
Command: npx skills add https://github.com/kevinnft/ai-agent-skills --skill migrate-to-shoehorn-kevinnft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates test code that uses as assertions to shoehorn-based patterns, improving type-safety and maintainability.

Core Features & Use Cases

  • It identifies as-based test code and replaces with fromPartial and fromAny migration patterns.
  • It supports common test structures in TypeScript projects and preserves existing test intent while improving type-safety.
  • It provides clear migration guidance for when to apply fromPartial vs fromAny in real-world scenarios.

Quick Start

Migrate my project's test files from as assertions to shoehorn-based patterns using fromPartial and fromAny.

Frequently Asked Questions about migrate-to-shoehorn

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

FAQPage Schema
How do I migrate TypeScript test suites from as assertions to safer type patterns?

Migrate TypeScript test suites by replacing as assertions with shoehorn-based fromPartial and fromAny patterns. This identifies test files, updates imports, and applies migration patterns to improve type-safety while preserving existing test intent.

When should I use fromPartial vs fromAny in TypeScript test migration?

Use fromPartial vs fromAny based on your test data structure: fromPartial applies when only a subset of object properties matters, while fromAny handles broader type assertions. The migration preserves test intent while removing unsafe as usage from small data objects.

Can I migrate test files to shoehorn without changing production code?

Yes, migrating test files to shoehorn requires no production code changes. The migration strictly targets TypeScript test suites by updating test imports and replacing as assertions with fromPartial and fromAny patterns to improve maintainability.

What's the best way to remove as assertions from TypeScript tests with many small data objects?

The best way to remove as assertions from TypeScript tests is migrating to shoehorn patterns. It targets test suites with many small data objects where only a subset matters, replacing as with fromPartial and fromAny for better type-safety.

Does shoehorn test migration work with existing TypeScript test structures?

Shoehorn test migration supports common test structures in TypeScript projects. It identifies as-based test code and replaces it with fromPartial and fromAny migration patterns while preserving existing test intent and improving type-safety.