add-bead
무료Capture free-text work as a tracked Beads issue. Use when the user runs /add-bead or wants to quickly file a Beads issue.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Migrate test files from `as` assertions to @total-typescript/shoehorn helpers. Use when tests need partial fixtures, intentionally invalid data, or safer replacements for TypeScript assertions.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Use this skill to migrate test code only from TypeScript as assertions to @total-typescript/shoehorn helpers.
Shoehorn is for tests, fixtures, and test-only helpers. Do not recommend it for production or source files, and do not add @total-typescript/shoehorn imports outside *.test.* or *.spec.* files.
value as Type to satisfy a function, component, or hook signature.value as unknown as Type.Do not use this skill to loosen production typing. If the assertion is in source code, fix the domain type, parser, or test boundary instead.
Install Shoehorn only when the target repository does not already depend on it, and use the package manager already used by that repository:
# bun.lock or bun.lockb
bun add -d @total-typescript/shoehorn
# pnpm-lock.yaml
pnpm add -D @total-typescript/shoehorn
# yarn.lock
yarn add -D @total-typescript/shoehorn
# package-lock.json or npm-shrinkwrap.json
npm install --save-dev @total-typescript/shoehorn
Do not switch package managers. If multiple lockfiles exist, ask which package manager owns the repo before installing.
Search only test files and review every result manually:
rg "\bas\s+[A-Z][A-Za-z0-9_$]*(<[^>]+>)?" --glob "*.{test,spec}.{ts,tsx}"
rg "\bas\s+unknown\s+as\s+" --glob "*.{test,spec}.{ts,tsx}"
Avoid broad replacements. Migrate one assertion at a time so the new helper matches the test intent.
value as Type -> fromPartial(value)Use fromPartial() when the test supplies a subset of a larger type and the supplied properties should still type-check.
Before:
getUser({ body: { id: "123" } } as Request);
After:
import { fromPartial } from "@total-typescript/shoehorn";
getUser(fromPartial({ body: { id: "123" } }));
If TypeScript cannot infer the target from context, provide the target type explicitly:
const request = fromPartial<Request>({
body: { id: "123" },
});
value as unknown as Type -> fromAny(value)Use fromAny() only when the test intentionally passes invalid data, such as exercising validation or error handling paths. This replaces double assertions while keeping the intent visible.
Before:
getUser({ body: { id: 123 } } as unknown as Request);
After:
import { fromAny } from "@total-typescript/shoehorn";
getUser(fromAny({ body: { id: 123 } }));
fromExact(value)Use fromExact() as a temporary helper when a fixture already has the full shape and you want to keep the migration mechanical before deciding whether it can be reduced.
import { fromExact } from "@total-typescript/shoehorn";
const request = fromExact<Request>({
body: { id: "123" },
headers: {},
cookies: {},
});
Prefer fromPartial() once the test only needs a subset of the object. fromExact() should not become a dumping ground for unnecessary fixture fields.
*.test.ts, *.test.tsx, *.spec.ts, or *.spec.tsx).@total-typescript/shoehorn is already installed.rg commands above.value as Type with fromPartial(value) when the supplied data is partial but type-valid.value as unknown as Type with fromAny(value) when the supplied data is intentionally invalid.fromExact() only for full-shape fixtures or short-lived migration steps.@total-typescript/shoehorn.After migrating, run the repository's normal checks. For a Bun-based repo, use:
bun run typecheck
bun test
Verify Shoehorn remains test-only:
rg "@total-typescript/shoehorn"
rg "@total-typescript/shoehorn" --glob "!*.{test,spec}.{ts,tsx}"
The first command should show only intended test imports. The second command should return no source-file imports; if it finds any, remove Shoehorn from production/source code and fix the underlying type boundary instead.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Capture free-text work as a tracked Beads issue. Use when the user runs /add-bead or wants to quickly file a Beads issue.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Register a new sub-repo in the knowledge base.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Answer questions about the codebase from knowledge files. Use when the user runs /ask or asks a domain/knowledge question about the repos.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Meta-skill for creating Agent Forge skills under .claude/skills/ with SKILL.md, optional references/ and scripts/, and Bun scaffolds. Use when the user wants to add or author a skill, scaffold a new skill folder, or align skill docs with harness conventions (JSON script output, Beads for tasks).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Choose Beads issue priority (P0–P4, numeric, or named) from urgency, impact, and risk when creating or triaging work.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.