This file is byte-identical to the first copy the registry indexed, one of 6 indexed copies. Same content hash, so the same checks give both the same grade.
migrate-to-shoehorn from rudycity/superagent is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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
## Install
```bash
npm i @total-typescript/shoehorn
```
## Migration patterns
### Large objects with few needed properties
Before:
```ts
type Request = {
body: { id: string };
headers: Record<string, string>;
cookies: Record<string, string>;
// ...20 more properties
};
it("gets user by id", () => {
// Only care about body.id but must fake entire Request
getUser({
body: { id: "123" },
headers: {},
cookies: {},
// ...fake all 20 properties
});
});
```
After:
```ts
import { fromPartial } from "@total-typescript/shoehorn";
it("gets user by id", () => {
getUser(
fromPartial({
body: { id: "123" },
}),
);
});
```
### `as Type` → `fromPartial()`
Before:
```ts
getUser({ body: { id: "123" } } as Request);
```
After:
```ts
…
The line at the top of this page pins the label git:20260626.019dba9, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
A 17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (2795 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
rudycity/superagent · 52 stars · license MIT · pushed 2026-10-20 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_o24zvg5fp6yku4ep
GET https://markdownregistry.com/api/v1/resolve?ref=rudycity/superagent/migrate-to-shoehorn
GET https://markdownregistry.com/api/v1/blob/de4da4c11d924fac79c924b2ee3d2db4a5cb98386eb490a599119463d036ae72
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
rudycity/superagent · .agents/skills/adhd/SKILL.md · Designed to assist users with ADHD (Attention Deficit Hyperactivity Disorder) by mitigating task paralysis, managing…
rudycity/superagent · .agents/skills/agent-browser/SKILL.md · Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages…
rudycity/superagent · .agents/skills/airflow-dag-patterns/SKILL.md · Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when…
rudycity/superagent · .agents/skills/algorithmic-art/SKILL.md · Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users…
rudycity/superagent · .agents/skills/angular-migration/SKILL.md · Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates…
rudycity/superagent · .agents/skills/anti-reversing-techniques/SKILL.md · Understand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill…
rudycity/superagent · .agents/skills/antislop-copywriting/SKILL.md · Copy and text skill for antislop. Use when writing or editing prose: headlines, tone, CTAs, and anti-AI-writing…
rudycity/superagent · .agents/skills/antislop-human/SKILL.md · Human and accessibility skill for antislop. Contrast, keyboard, focus, and states for real people. Includes the…
rudycity/superagent · .agents/skills/antislop-layoutmobile/SKILL.md · Mobile layout skill for antislop. Use for layouts that reflow across screen sizes, phone to desktop: grids, overflow…
mxyhi/ok-skills · migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…
asymmetric-al/core · .agents/skills/migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…
akillness/jeo-skills · .agent-skills/migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…
vodailocz/kilo-kit-mcp · skills/productivity/migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…
mambo-wang/codewiki-plus · .trae/skills/migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…
mambo-wang/codewiki-plus · .codebuddy/skills/migrate-to-shoehorn/SKILL.md · Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to…