boring-ui: Skill for Claude Code

.agents/skill-library/miscellaneous/migrate-to-shoehorn/SKILL.md

migrate-to-shoehorn is a skill for Claude Code, Codex from hachej/boring-ui. It costs 48 tokens per session (724 once invoked), scanned A, a copy of migrate-to-shoehorn, MIT.

A test-code migration guide for replacing TypeScript’s `as` type assertions with Shoehorn’s `fromPartial` helper. TypeScript is a language tool that checks whether code uses data in the expected shape.

In plain words
What is it for?
Use it when updating tests that pass incomplete request or other typed data. It is specifically for test code, not production code.
Why use it?
It lets tests provide only the fields they need instead of manually creating complete objects. This reduces awkward casts and keeps partial test data easier to understand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is hachej/boring-ui's own configuration. It tells Claude Code and Codex how to work on boring-ui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything boring-ui configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hachej/boring-ui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hachej/boring-ui/main/.agents/skill-library/miscellaneous/migrate-to-shoehorn/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/hachej/boring-ui

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-to-shoehorn

README.md
[![agentmods](https://agentmods.dev/badge/skills/hachej/boring-ui/migrate-to-shoehorn/github.svg)](https://agentmods.dev/skills/hachej/boring-ui/migrate-to-shoehorn)
Your own site
<a href="https://agentmods.dev/skills/hachej/boring-ui/migrate-to-shoehorn"><img src="https://agentmods.dev/badge/skills/hachej/boring-ui/migrate-to-shoehorn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrate-to-shoehorn

Your own site · 80×15
<a href="https://agentmods.dev/skills/hachej/boring-ui/migrate-to-shoehorn"><img src="https://agentmods.dev/badge/skills/hachej/boring-ui/migrate-to-shoehorn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00724
Opus 5 $0.00024 $0.00362
Sonnet 5 $0.00010 $0.00145
Haiku 4.5 $0.00005 $0.00072

Measured 11d ago against content hash de4da4c11d92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

migrate-to-shoehorn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to migrate-to-shoehorn — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skill-library/miscellaneous/migrate-to-shoehorn/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

npm i @total-typescript/shoehorn

Migration patterns

Large objects with few needed properties

Before:

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:

import { fromPartial } from "@total-typescript/shoehorn";

it("gets user by id", () => {
  getUser(
    fromPartial({
      body: { id: "123" },
    }),
  );
});

as TypefromPartial()

Before:

getUser({ body: { id: "123" } } as Request);

After:

import { fromPartial } from "@total-typescript/shoehorn";

getUser(fromPartial({ body: { id: "123" } }));

as unknown as TypefromAny()

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 } }));

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?

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 119 lines · 48 tokens per session scan A de4da4c11d92

Subscribe to this mod's changes

migrate-to-shoehorn is a skill published in the GitHub repository hachej/boring-ui (46 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 724 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to migrate-to-shoehorn, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

V3 Core Implementation

Core module implementation for claude-flow v3. Implements DDD domains, clean architecture patterns, dependency injection, and modular TypeScript codebase with comprehensive testing.

ruvnet/RuView · 37 tokens

migrate-to-shoehorn

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.

mattpocock/skills · 48 tokens

typescript-test-writing

Use this skill when writing or modifying tests in the llxprt-code repository. Covers mandatory TDD, behavioral testing, bun:test conventions and file naming, mock hygiene (no mock theater), and what never to test. Distilled from dev-docs/RULES.md, which remains the source of truth.

vybestack/llxprt-code · 66 tokens

typescript

TypeScript strict mode with eslint and jest.

alinaqi/maggy · 10 tokens

agent-inspect

Local evidence debugger and trajectory-test toolkit for TypeScript AI agents. Use when capturing framework-faithful traces, asserting TraceContract/TraceFacts, packaging Evidence v2, or inspecting local runs over read-only MCP (gettracefacts).

rajudandigam/agent-inspect · 52 tokens

extending-personhog-test-harness

When and how to add scenarios, chaos events, and invariants to the personhog e2e test harness (rust/personhog-test-harness). Use after fixing a bug or regression in the personhog leader path (leader, router, writer, replica, coordination protocol) so the fix gets a permanent regression scenario; when adding a new…

PostHog/posthog · 134 tokens