migrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
Skill by vasyapym
Chalk Labs
Need help deploying migrate-to-shoehorn?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/vasyapym-migrate-to-shoehorn
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
migrate-to-shoehorn- Description
- 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.
- License
- MIT
- Instructions
- 115 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# 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
import { fromPartial } from "@total-typescript/shoehorn";
getUser(fromPartial({ body: { id: "123" } }));
```
### `as unknown as Type` → `fromAny()`
Before:
```ts
getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose
```
After:
```ts
import { fromAny } from "@total-typescript/shoehorn";
getUser(fromAny({ body: { id: 123 } }));
```
## When to use each
| Function | Use case |
| --------------- | -------------------------------------------------- |
| `fromPartial()` | Pass partial data that still type-checks |
| `fromAny()` | Pass intentionally wrong data (keeps autocomplete) |
| `fromExact()` | Force full object (swap with fromPartial later) |
## Workflow
1. **Gather requirements** - ask user:
- What test files have `as` assertions causing problems?
- Are they dealing with large objects where only some properties matter?
- Do they need to pass intentionally wrong data for error testing?
2. **Install and migrate**:
- [ ] Install: `npm i @total-typescript/shoehorn`
- [ ] Find test files with `as` assertions: `grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"`
- [ ] Replace `as Type` with `fromPartial()`
- [ ] Replace `as unknown as Type` with `fromAny()`
- [ ] Add imports from `@total-typescript/shoehorn`
- [ ] Run type check to verifyFrom vasyapym/vasyapym.github.io, MIT.
More from vasyapym/vasyapym.github.io
- 0.644score
minimize-iteration3
vasyapym
Use when delegating to the randomized routing chat model or when a relay prompt failed — reframe the delegation as a question-form refinement, one question…
SkillAFreshness: A★ 20Claude Code +9 - 0.644score
orchestrate
vasyapym
Run the relay loop between this orchestrator session and a designated non-agentic specialist in a separate chat (Claude Opus or similar) that has no tools…
SkillAFreshness: A★ 20Claude Code +9 - 0.641score
minimize-iteration2
vasyapym
Relay self-contained design/code briefs to the owner's chat model and integrate the replies — with a strict minimal-log rule for the results file.
SkillAFreshness: A★ 20Claude Code +9 - 0.638score
design-iteration
vasyapym
Refine interfaces through visual feedback rounds against an append-only liked/rejected ledger.
SkillAFreshness: A★ 20Claude Code +9 - 0.638score
code-iteration
vasyapym
Implement and refine code through small, evidence-backed verification passes.
SkillAFreshness: A★ 20Claude Code +9 - 0.634score
lesson-script
vasyapym
Fast relay lesson for Practice Map — one chat-model round, salvage, convert, scripted wiring.
SkillAFreshness: A★ 20Claude Code +9 - 0.613score
ask-matt
vasyapym
Ask which skill or flow fits your situation.
SkillAFreshness: A★ 20Claude Code +9 - 0.604score
minimize-iteration
vasyapym
Use when work is about to be delegated to a separate chat model — compress the task into the shortest prompt that still carries it, because the router sends…
SkillBFreshness: B★ 20Claude Code +9 - 0.601score
bug-iteration
vasyapym
Fix a reported bug — especially one that has returned after a previous fix — by reproducing it, diagnosing the root cause rather than the symptom, gating…
SkillBFreshness: B★ 20Claude Code +9 - 0.601score
custom-learning
vasyapym
Guide technology learning in Russian, one subcard at a time, through interactive Practice Map artifacts and proof-of-skill projects.
SkillBFreshness: B★ 20Claude Code +9 - 0.598score
planning
vasyapym
Turn an approved direction into a deterministic implementation and verification plan.
SkillBFreshness: B★ 20Claude Code +9 - 0.598score
lesson-iteration
vasyapym
Draft, deepen, review, and integrate a comprehensive Russian-language lesson into Practice Map.
SkillBFreshness: B★ 20Claude Code +9
Signals
- Stars
- 20
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 18, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/vasyapym/vasyapym.github.io
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.745score
migrate-to-shoehorn
mattpocock
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: A★ 302.4KClaude Code +9 - 0.358score
migrate-to-shoehorn
caterpi11ar
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: A★ 8Claude Code +9 - 0.354score
migrate-to-shoehorn
leandrocfe
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillBFreshness: B★ 40Claude Code +9 - 0.347score
migrate-to-shoehorn
tajo9128
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: A★ 4Claude Code +9 - 0.334score
migrate-to-shoehorn
fveracoechea
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: A★ 1Claude Code +9 - 0.334score
migrate-to-shoehorn
xs1128
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: A★ 1Claude Code +9 - 0.324score
migrate-to-shoehorn
JacobStephens2
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillAFreshness: AClaude Code +9 - 0.322score
migrate-to-shoehorn
tt-a1i
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillCFreshness: C★ 187Claude Code +9 - 0.306score
migrate-to-shoehorn
uwvwko-zzz
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillCFreshness: C★ 10Claude Code +9 - 0.304score
migrate-to-shoehorn
harshit2490
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillCFreshness: C★ 6Claude Code +9 - 0.300score
migrate-to-shoehorn
Eresea
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillBFreshness: BClaude Code +9 - 0.297score
migrate-to-shoehorn
danilocasim
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillBFreshness: BClaude Code +9
More from vasyapym
- 0.644score
orchestrate
vasyapym
Run the relay loop between this orchestrator session and a designated non-agentic specialist in a separate chat (Claude Opus or similar) that has no tools…
SkillAFreshness: A★ 20Claude Code +9 - 0.644score
minimize-iteration3
vasyapym
Use when delegating to the randomized routing chat model or when a relay prompt failed — reframe the delegation as a question-form refinement, one question…
SkillAFreshness: A★ 20Claude Code +9 - 0.641score
minimize-iteration2
vasyapym
Relay self-contained design/code briefs to the owner's chat model and integrate the replies — with a strict minimal-log rule for the results file.
SkillAFreshness: A★ 20Claude Code +9 - 0.638score
code-iteration
vasyapym
Implement and refine code through small, evidence-backed verification passes.
SkillAFreshness: A★ 20Claude Code +9 - 0.638score
design-iteration
vasyapym
Refine interfaces through visual feedback rounds against an append-only liked/rejected ledger.
SkillAFreshness: A★ 20Claude Code +9 - 0.634score
lesson-script
vasyapym
Fast relay lesson for Practice Map — one chat-model round, salvage, convert, scripted wiring.
SkillAFreshness: A★ 20Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get migrate-to-shoehorn running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
migrate-to-shoehorn skill. Agent Mart. https://agentmart.dev/skills/vasyapym-migrate-to-shoehorn (last updated 2026-10-24)