Not loaded · from dev
Migrates test files from `as` type assertions to `@total-typescript/shoehorn`'s `fromPartial()` and `fromAny()`. Replaces unsafe casts with type-safe partial data helpers.
Claude Code won't load this skill
It ships in dev at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Replace as assertions in test files with fromPartial() or fromAny() from @total-typescript/shoehorn.
shoehorn lets you pass partial data in tests while keeping TypeScript happy. It replaces as assertions with fromPartial() for partial data and fromAny() for intentionally wrong types.
Test code only. Never use shoehorn in production code.
Problems with as in tests:
as unknown as Type) for intentionally wrong datanpm i @total-typescript/shoehorn
as Type (and large objects with few needed properties) → fromPartial()Whether you wrote as Request or hand-faked every property of a large type, only the properties the test cares about matter. fromPartial() keeps those and lets TypeScript accept the rest.
Before:
type Request = {
body: { id: string };
headers: Record<string, string>;
cookies: Record<string, string>;
// ...20 more properties
};
it("gets user by id", () => {
// Faking the entire Request, or papering over it with `as`
getUser({ body: { id: "123" } } as Request);
});
After:
import { fromPartial } from "@total-typescript/shoehorn";
it("gets user by id", () => {
getUser(fromPartial({ body: { id: "123" } }));
});
as unknown as Type → fromAny()Before:
getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose
After:
import { fromAny } from "@total-typescript/shoehorn";
getUser(fromAny({ body: { id: 123 } }));
| Function | Use case |
|---|---|
fromPartial() | Pass partial data that still type-checks |
fromAny() | Pass intentionally wrong data (keeps autocomplete) |
Gather requirements - ask user:
as assertions causing problems?Install and migrate:
npm i @total-typescript/shoehornas assertions: grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"as Type with fromPartial()as unknown as Type with fromAny()@total-typescript/shoehornWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
59 skills in this plugin
/adr-editorProposal-driven reverse grill for the active `.red/adr/` collection. Ranks active ADR clusters, recommends where to start, confronts one cluster with current implementation evidence, and applies maintainer-approved dispositions through the full ADR verb set. Use to review, curate, reorganise, fix, or extend ADRs and to pay down accumulated decision debt./afkAutonomous loop that drains the `ready-for-agent` queue on the issue tracker. Registers the project with the `redskilled` daemon at a runner and a target width, arms the drain, and observes; the daemon admits each Worker, which claims an issue, works it in its own workspace, validates, lands, and closes. Use when the user wants to run AFK execution, drain a Spec, hammer specific issues, or otherwise let agents grind through the backlog./npx claudepluginhub reddb-io/red-skills --plugin devOther plugins' skills for the same job