From frontend-skills
Migrates test `as Type` casts to `@total-typescript/shoehorn` helpers like `fromPartial()`, targeting test files only.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-skills:migrate-to-shoehornThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Test code only. Never prod.
Test code only. Never prod.
@total-typescript/shoehorn replaces test as casts with type-safe helpers for partial data.
bun add -d @total-typescript/shoehorn
as Type with partial object -> fromPartial():
import { fromPartial } from "@total-typescript/shoehorn";
getUser(fromPartial({ body: { id: "123" } }));
Intentionally invalid data -> fromPartial() plus targeted override helper from package docs. Avoid as unknown as.
*.test.*, *.spec.*, fixtures.rg " as |as unknown as".npx claudepluginhub redpanda-data/ui-harness --plugin frontend-skillsMigrates TypeScript test files from `as` type assertions to `@total-typescript/shoehorn` for type-safe partial test data. Use for replacing `as` in tests or when needing partial test data.
Guides migration from Jest to Bun's test runner including import updates, mock/spy/timer compatibility, snapshot testing, and jest.config.js to bunfig.toml conversion.
Guides Jest to Vitest migration via automated codemods and manual steps, covering setup, configuration, API differences, best practices, and troubleshooting.