migrate-to-shoehorn

Migrate unsafe TypeScript as assertions to shoehorn wrappers in test files.

40|9|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/akillness/jeo-skills --skill migrate-to-shoehorn-akillness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-shoehorn
Source: https://github.com/akillness/jeo-skills/tree/main/.agent-skills/migrate-to-shoehorn
Command: npx skills add https://github.com/akillness/jeo-skills --skill migrate-to-shoehorn-akillness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate unsafe TypeScript as assertions in test files to type-safe alternatives from @total-typescript/shoehorn, ensuring test code remains non-production and easier to maintain.

Core Features & Use Cases

  • Replace obj as Type with fromPartial<Type>, and obj as unknown as Type with fromAny<Type> in tests.
  • Replace complete objects with fromExact<Type> to enforce full-structure assertions.
  • Focus on test code only; production code must not use shoehorn utilities.

Quick Start

Run the migration workflow on your test suite to replace unsafe as assertions with shoehorn wrappers and verify TypeScript compilation.

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 unsafe TypeScript as assertions in test files?

Replace unsafe TypeScript as assertions in test files by migrating them to type-safe shoehorn wrappers such as fromPartial, fromAny, and fromExact. This workflow targets test code only and verifies changes through TypeScript compilation.

What is the difference between fromPartial, fromAny, and fromExact in shoehorn migrations?

During shoehorn migration, fromPartial replaces obj as Type, fromAny replaces obj as unknown as Type, and fromExact replaces complete objects to enforce full-structure type assertions in TypeScript test code.

Can I use shoehorn migration utilities in production TypeScript code?

No, the shoehorn migration workflow focuses exclusively on test code. Production code must not use shoehorn utilities, ensuring that non-production test files handle type safety while production code remains untouched.

How do I verify TypeScript compilation after migrating as assertions to shoehorn?

Verify TypeScript compilation after migrating as assertions by running the migration workflow on your test suite. The workflow applies shoehorn wrappers and verifies changes by running TypeScript compilation and tests.

What's the best way to enforce type safety in TypeScript integration tests?

To enforce type safety in TypeScript integration tests, replace unsafe as assertions with shoehorn wrappers like fromExact for complete objects and fromPartial for partial structures. This applies across unit and integration tests relying on as assertions.