migrate-to-shoehorn
An agent skill by mattpocock, from mattpocock/skills. Tags: cleanup, code-quality, migration, testing, typescript.
What it does
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 the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add mattpocock/skills --skill migrate-to-shoehorn
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/mattpocock/skills
cp -r skills/skills/misc/migrate-to-shoehorn ~/.claude/skills/migrate-to-shoehorn
Safety box score
Grade B, low risk: 11 of 100 risk points, rated 2026-10-14. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill only targets a codebase’s test files and swaps type assertions for `@total-typescript/shoehorn`, but it does require installing a new npm dependency. The main risks are ordinary project edits plus the networked package install; there is no sign of hidden code, privilege escalation, or broad automation.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | It runs standard commands like `npm i @total-typescript/shoehorn`, `grep -r ...`, and a type check, but ships no native scripts or code evaluators. |
| Network access | 1 (low) | The workflow explicitly downloads a package from npm: `npm i @total-typescript/shoehorn`. |
| Filesystem reach | 1 (low) | It is limited to test-file migration in the working tree, using `grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"` and then editing those files. |
| Secrets & credentials | 0 (none) | The skill does not read, request, or mention tokens, keys, passwords, `.env` files, or browser/CLI sessions. |
| Privilege & persistence | 0 (none) | No `sudo`, global install, service registration, shell profile edits, or OS setting changes appear in the files. |
| Instruction hijack surface | 0 (none) | There is no prompt-injection content such as instructions to ignore rules, hide actions, or follow remote text. |
| Irreversible actions | 0 (none) | It does not send messages, deploy, publish, pay, or delete anything; it only proposes local test-code migration. |
| Transparency | 0 (none) | The skill is fully readable Markdown/YAML with no binaries, base64 blobs, downloaded installers, or generated code. |
Before installing
- Review `npm i @total-typescript/shoehorn` and confirm you trust that dependency.
- Run the migration on a branch and inspect the diff, especially imports added to test files.
- Check the grep scope matches only your intended test files before replacing assertions.
- Run type-check/tests after the rewrite to catch accidental behavior changes.
Rated 2026-10-14 by an automated review of 2 files from the skill's repository.
Source
- Repository
- mattpocock/skills (all skills from this repository)
- Path
- skills/misc/migrate-to-shoehorn/SKILL.md
- Branch
- main
- Updated
- 2026-10-05
Related skills
- expo-migrate-module — Framework (OSS). Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2).
- test-audit — Find low-value or duplicate tests and the test-only code they keep alive. (gstack)
- audit-prep-assistant — Prepares codebases for security review using Trail of Bits' checklist.
- check-compiler-errors — Run compile and type-check commands and report failures
- deslop — Remove AI-generated code slop and clean up code style
- genotoxic — Graph-informed mutation testing triage.