[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C8Q7PPT6JRTCAAMJRJEJ49":3,"skill-same:01M7C8Q7PPT6JRTCAAMJRJEJ49":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7C8Q7PPT6JRTCAAMJRJEJ49","migrate-to-shoehorn",null,"Migrate test files from `as` type assertions to @total-typescript\u002Fshoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.","sung1-labs\u002Fsddx","sung1-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F325716214?v=4","01M7C7MDYAWVBFW42T3YCQYG7N","SunG1 Labs","01M7C7MDYZYBYQ5FNSK0XN0YY2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fgrill-skills\u002Fsddx-grill-misc-migrate-to-shoehorn\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: migrate-to-shoehorn\ndescription: Migrate test files from `as` type assertions to @total-typescript\u002Fshoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.\n---\n\n# Migrate to Shoehorn\n\n## Why shoehorn?\n\n`shoehorn` lets you pass partial data in tests while keeping TypeScript happy. It replaces `as` assertions with type-safe alternatives.\n\n**Test code only.** Never use shoehorn in production code.\n\nProblems with `as` in tests:\n\n- Trained not to use it\n- Must manually specify target type\n- Double-as (`as unknown as Type`) for intentionally wrong data\n\n## Install\n\n```bash\nnpm i @total-typescript\u002Fshoehorn\n```\n\n## Migration patterns\n\n### Large objects with few needed properties\n\nBefore:\n\n```ts\ntype Request = {\n  body: { id: string };\n  headers: Record\u003Cstring, string>;\n  cookies: Record\u003Cstring, string>;\n  \u002F\u002F ...20 more properties\n};\n\nit(\"gets user by id\", () => {\n  \u002F\u002F Only care about body.id but must fake entire Request\n  getUser({\n    body: { id: \"123\" },\n    headers: {},\n    cookies: {},\n    \u002F\u002F ...fake all 20 properties\n  });\n});\n```\n\nAfter:\n\n```ts\nimport { fromPartial } from \"@total-typescript\u002Fshoehorn\";\n\nit(\"gets user by id\", () => {\n  getUser(\n    fromPartial({\n      body: { id: \"123\" },\n    }),\n  );\n});\n```\n\n### `as Type` → `fromPartial()`\n\nBefore:\n\n```ts\ngetUser({ body: { id: \"123\" } } as Request);\n```\n\nAfter:\n\n```ts\nimport { fromPartial } from \"@total-typescript\u002Fshoehorn\";\n\ngetUser(fromPartial({ body: { id: \"123\" } }));\n```\n\n### `as unknown as Type` → `fromAny()`\n\nBefore:\n\n```ts\ngetUser({ body: { id: 123 } } as unknown as Request); \u002F\u002F wrong type on purpose\n```\n\nAfter:\n\n```ts\nimport { fromAny } from \"@total-typescript\u002Fshoehorn\";\n\ngetUser(fromAny({ body: { id: 123 } }));\n```\n\n## When to use each\n\n| Function        | Use case                                           |\n| --------------- | -------------------------------------------------- |\n| `fromPartial()` | Pass partial data that still type-checks           |\n| `fromAny()`     | Pass intentionally wrong data (keeps autocomplete) |\n| `fromExact()`   | Force full object (swap with fromPartial later)    |\n\n## Workflow\n\n1. **Gather requirements** - ask user:\n   - What test files have `as` assertions causing problems?\n   - Are they dealing with large objects where only some properties matter?\n   - Do they need to pass intentionally wrong data for error testing?\n\n2. **Install and migrate**:\n   - [ ] Install: `npm i @total-typescript\u002Fshoehorn`\n   - [ ] Find test files with `as` assertions: `grep -r \" as [A-Z]\" --include=\"*.test.ts\" --include=\"*.spec.ts\"`\n   - [ ] Replace `as Type` with `fromPartial()`\n   - [ ] Replace `as unknown as Type` with `fromAny()`\n   - [ ] Add imports from `@total-typescript\u002Fshoehorn`\n   - [ ] Run type check to verify\n","# Migrate to Shoehorn\n\n## Why shoehorn?\n\n`shoehorn` lets you pass partial data in tests while keeping TypeScript happy. It replaces `as` assertions with type-safe alternatives.\n\n**Test code only.** Never use shoehorn in production code.\n\nProblems with `as` in tests:\n\n- Trained not to use it\n- Must manually specify target type\n- Double-as (`as unknown as Type`) for intentionally wrong data\n\n## Install\n\n```bash\nnpm i @total-typescript\u002Fshoehorn\n```\n\n## Migration patterns\n\n### Large objects with few needed properties\n\nBefore:\n\n```ts\ntype Request = {\n  body: { id: string };\n  headers: Record\u003Cstring, string>;\n  cookies: Record\u003Cstring, string>;\n  \u002F\u002F ...20 more properties\n};\n\nit(\"gets user by id\", () => {\n  \u002F\u002F Only care about body.id but must fake entire Request\n  getUser({\n    body: { id: \"123\" },\n    headers: {},\n    cookies: {},\n    \u002F\u002F ...fake all 20 properties\n  });\n});\n```\n\nAfter:\n\n```ts\nimport { fromPartial } from \"@total-typescript\u002Fshoehorn\";\n\nit(\"gets user by id\", () => {\n  getUser(\n    fromPartial({\n      body: { id: \"123\" },\n    }),\n  );\n});\n```\n\n### `as Type` → `fromPartial()`\n\nBefore:\n\n```ts\ngetUser({ body: { id: \"123\" } } as Request);\n```\n\nAfter:\n\n```ts\nimport { fromPartial } from \"@total-typescript\u002Fshoehorn\";\n\ngetUser(fromPartial({ body: { id: \"123\" } }));\n```\n\n### `as unknown as Type` → `fromAny()`\n\nBefore:\n\n```ts\ngetUser({ body: { id: 123 } } as unknown as Request); \u002F\u002F wrong type on purpose\n```\n\nAfter:\n\n```ts\nimport { fromAny } from \"@total-typescript\u002Fshoehorn\";\n\ngetUser(fromAny({ body: { id: 123 } }));\n```\n\n## When to use each\n\n| Function        | Use case                                           |\n| --------------- | -------------------------------------------------- |\n| `fromPartial()` | Pass partial data that still type-checks           |\n| `fromAny()`     | Pass intentionally wrong data (keeps autocomplete) |\n| `fromExact()`   | Force full object (swap with fromPartial later)    |\n\n## Workflow\n\n1. **Gather requirements** - ask user:\n   - What test files have `as` assertions causing problems?\n   - Are they dealing with large objects where only some properties matter?\n   - Do they need to pass intentionally wrong data for error testing?\n\n2. **Install and migrate**:\n   - [ ] Install: `npm i @total-typescript\u002Fshoehorn`\n   - [ ] Find test files with `as` assertions: `grep -r \" as [A-Z]\" --include=\"*.test.ts\" --include=\"*.spec.ts\"`\n   - [ ] Replace `as Type` with `fromPartial()`\n   - [ ] Replace `as unknown as Type` with `fromAny()`\n   - [ ] Add imports from `@total-typescript\u002Fshoehorn`\n   - [ ] Run type check to verify\n",{"name":5,"description":7},"main","7d9c45c72ac89da53a28423808dabd6dc0be6795","skills\u002Flibrary\u002Fgrill-skills\u002Fsddx-grill-misc-migrate-to-shoehorn","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx","https:\u002F\u002Fgithub.com\u002Fsung1-labs","Building open-source tools for AI-assisted software development, spec-driven engineering, and reliable developer workflows.","2026-09-07 02:51:20",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add sung1-labs\u002Fsddx --skill migrate-to-shoehorn",{"tool":37,"command":38},"bunx","bunx skills add sung1-labs\u002Fsddx --skill migrate-to-shoehorn",{"tool":40,"command":41},"pnpm","pnpm dlx skills add sung1-labs\u002Fsddx --skill migrate-to-shoehorn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fgrill-skills\u002Fsddx-grill-misc-migrate-to-shoehorn\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",110,"https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Flibrary\u002Fgrill-skills\u002Fsddx-grill-misc-migrate-to-shoehorn\u002Fagents\u002Fopenai.yaml",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7C8TCN2HNT036445CS1VBHT","sddx-verify","Verify the complete SDDx change against its specifications, architecture, implementation, tests, security, operations, and deployment expectations.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-verify\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7C8T9FQKTSN971MP6RSV0GK","sddx-quick","Handle a small, bounded change with minimal durable artifacts while preserving verification and automatic escalation when scope grows.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-quick\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7C8T6C21FE8ZX8XDSJ5VJ5R","sddx-propose","Turn a resolved SDDx exploration into durable proposal, requirements, design, tasks, and optional RFC artifacts.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-propose\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7C8T2QDGTK9PPG4A3JXXS28","sddx-explore","Explore a change before implementation, resolve the applicable product, UX, architecture, security, testing, deployment, and operational questions, and recommend the next SDDx workflow.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-explore\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7C8SZ9GTETBRKEXT43EZ9G9","sddx-debug","Diagnose and fix a defect through reproduction, evidence-based hypotheses, a minimal fix, regression coverage, and verification.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-debug\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7C8SW14B7XG3TSQGGWZ0ZCH","sddx-archive","Complete a verified SDDx change, preserve its durable record, synchronize specifications, and recommend the next workflow.","https:\u002F\u002Fgithub.com\u002Fsung1-labs\u002Fsddx\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fsddx-archive\u002FSKILL.md",[],[]]