Download for MacApple silicon, macOS 14+
Skill

migrate-to-shoehorn

@mattpocock 534k installs Trending #128 on Skills.Sh Updated 2026-07-31

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

Install

With your agent

Install OMGSkills skill "mattpocock/skills:migrate-to-shoehorn" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/mattpocock/skills /tmp/skills && ln -s /tmp/skills/skills/misc/migrate-to-shoehorn ~/.claude/skills/migrate-to-shoehorn

From README

Migrate to Shoehorn Why shoehorn? shoehorn lets you pass partial data in tests while keeping TypeScript happy. It replaces as assertions with type-safe alternatives. Test code only. Never use shoehorn in production code. Problems with as in tests: Trained not to use it Must manually specify target type Double-as (as unknown as Type) for intentionally wrong data Migration patterns Large objects with few needed properties Before: After: as Type → fromPartial() Before: After: as unknown as Type → fromAny() Before: After: When to use each | Function | Use case | | --------------- | -------------------------------------------------- | | fromPartial() | Pass partial data that still type-checks | | fromAny() | Pass intentionally wrong data (keeps autocomplete) | | fromExact() | Force full object (swap with fromPartial later) | Workflow Gather requirements - ask user: What test files have as assertions causing problems? Are they dealing with large objects where only some properties matter?