SkillsReviewed · mattpocock

Migrate to Shoehorn

Migrate to Shoehorn is an assistant skill for TypeScript developers simplifying test data, with helpers intended only for test code. It explains how to replace type assertions with @total-typescript/shoehorn helpers for incomplete or deliberately invalid inputs; package compatibility and runtime behavior are not assessed.

Researched 14 Nov 2026

In short.

Migrate to Shoehorn is an assistant skill for TypeScript developers replacing test type assertions, with use explicitly restricted to test code. It maps as Type to fromPartial() and as unknown as Type to fromAny(), and identifies fromExact() for complete objects. Its concrete examples make the intended migration understandable, but the supplied files contain no package implementation, compatibility results or execution evidence.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete migrate-to-shoehorn directory at revision 5863806dd4e15c63174bee4e7515a4256792ecfa: SKILL.md and agents/openai.yaml, plus the accompanying repository LICENSE. Linked pages, other folders and the separately installed @total-typescript/shoehorn package are excluded. Installation, example migrations, type-checking outcomes and runtime behavior remain untested.

The overview

Identity

Migrate to Shoehorn is an instruction skill in Matt Pocock's skills repository, at [https://github.com/mattpocock/skills/tree/main/skills/misc/migrate-to-shoehorn]. Its purpose is to guide an assistant through replacing TypeScript assertions in tests with @total-typescript/shoehorn helpers.

The resource contains SKILL.md and agents/openai.yaml. The YAML supplies the display name Migrate to Shoehorn and a short description; the migration guidance resides in SKILL.md.

Assessment

The guidance is useful for tests that construct large objects but exercise only a few properties, or deliberately supply invalid values to test error handling. Before-and-after examples make the proposed changes concrete.

The likely benefit is clearer intent in test data. Improvements in correctness, migration speed or maintenance effort are not established. The skill's description of type-safe alternatives is not supported by package source or compiler results in the supplied material.

Users

The intended users are TypeScript developers and coding-assistant users maintaining tests with incomplete objects or double assertions. A type assertion is the as Type syntax used in the examples to tell TypeScript how to treat a value.

The skill is particularly relevant when constructing every required property creates distracting dummy data. Users still need to understand what each test exercises and which missing or incorrect values are intentional.

Capabilities

The skill provides examples for shortening large test objects, replacing as Type with fromPartial(), and replacing as unknown as Type with fromAny(). It also identifies fromExact() as an option for requiring a complete object.

Its procedure covers asking about the affected tests, installing the package, searching for assertions, adding imports, making replacements and running a type check. The selected files provide instructions and display metadata; they contain no executable migration script.

Using it

Requirements

The documented approach requires TypeScript test code and the separately installed @total-typescript/shoehorn package. The examples assume existing functions and parameter types, plus a project type-checking command.

Required Node.js, npm, TypeScript and package versions are unspecified. Test-runner compatibility and support for particular assistant applications are also unspecified. The skill explicitly restricts Shoehorn use to tests.

Mechanism

The examples wrap test values in imported helper calls and remove the explicit target-type assertion. fromPartial() is described as accepting incomplete data that still type-checks. fromAny() is described as accepting deliberately wrong data while retaining autocomplete. fromExact() is listed for complete objects.

These are descriptions from the skill. Function signatures, implementation details, inference edge cases and runtime validation behavior are not supplied. The material does not establish that an incomplete object meets every requirement of the function receiving it.

Setup

The documented installation command is npm i @total-typescript/shoehorn. The examples then import fromPartial or fromAny from that package, update the relevant test inputs and run a type check.

The command does not pin a package version or specify a development-only dependency. The source provides no assistant-specific skill installation procedure, type-check command or dependency compatibility guidance.

Example

One example changes getUser({ body: { id: "123" } } as Request) to getUser(fromPartial({ body: { id: "123" } })). The test supplies body.id while omitting headers, cookies and other Request properties.

For an intentionally incorrect value, the guide changes getUser({ body: { id: 123 } } as unknown as Request) to getUser(fromAny({ body: { id: 123 } })). The numeric id conflicts with the example's string type. These are illustrative snippets; getUser's implementation and the resulting test behavior are not provided.

Assessment & evidence

Limitations

The suggested search covers only .test.ts and .spec.ts files and looks for as assertions followed by an uppercase initial. Other filenames, lowercase type names or differently formatted assertions can be missed. Search matches require review before replacement.

The skill supplies no automated transformation, runtime checks or evidence that omitting properties preserves test behavior. It gives no worked example for fromExact(). Installation success, compiler outcomes and test results are not established.

Reasoning

The useful distinction is between missing data and deliberately wrong data. The skill assigns fromPartial() to the former and fromAny() to intentional error cases, making the reason for relaxing a test input more explicit.

A sensible migration therefore maps each replacement to the test's purpose and confirms that omitted fields are unnecessary for the exercised path. The examples support this focused use; they do not justify replacing every assertion mechanically.

Alternatives

The examples show existing approaches: constructing a complete object with placeholder fields, asserting a partial object as the required type, or using a double assertion for invalid data. Complete objects retain all required fields but can introduce irrelevant setup.

Within Shoehorn, fromExact() is presented as the complete-object option, with the possibility of switching to fromPartial() later. No comparison with other fixture libraries or measured trade-offs is supplied.

Evidence

The version-specific instruction source is [https://raw.githubusercontent.com/mattpocock/skills/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/misc/migrate-to-shoehorn/SKILL.md]. The assistant display metadata is [https://raw.githubusercontent.com/mattpocock/skills/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/misc/migrate-to-shoehorn/agents/openai.yaml].

The accompanying licence is [https://raw.githubusercontent.com/mattpocock/skills/5863806dd4e15c63174bee4e7515a4256792ecfa/LICENSE]. These sources establish the skill's instructions, identity and repository permissions. They provide no Shoehorn implementation, benchmark data or execution results.

Access & freshness

Costs

The accompanying MIT licence grants permission to use and redistribute the repository material free of charge, subject to its notice requirements.

The evidence does not establish pricing for the separately installed package, an assistant service or migration work. Total usage cost is unknown; no model-usage estimates or measured migration costs are provided.

Rights

The repository notice is the MIT License, copyright 2026 Matt Pocock. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions. It disclaims warranties and liability.

The supplied repository notice does not establish the licence terms of the separately installed @total-typescript/shoehorn package.

Freshness

The source snapshot is dated 2026-11-14T13:10:36.106Z and identifies repository revision 5863806dd4e15c63174bee4e7515a4256792ecfa.

The skill specifies no release number, package version or supported tool versions. Its update history, later upstream changes and compatibility with current package releases are unknown.

Actions

Start with one test file and identify which assertions represent incomplete valid data and which represent deliberate invalid inputs. Follow the documented installation and import steps, then choose the corresponding helper for each case.

Review the replacements and run the project's type checker as the skill recommends. Running affected tests would also help check behavior when fields are omitted. Confirm package compatibility and its separate licence before broader adoption; neither is established here.

Evidence for this report

LICENSEnotice · checked 2026-11-14
skills/misc/migrate-to-shoehorn/SKILL.mdselected · checked 2026-11-14