[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79JSG7APB4XHM1Q5R6VHDBQ":3,"skill-same:01M79JSG7APB4XHM1Q5R6VHDBQ":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M79JSG7APB4XHM1Q5R6VHDBQ","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.","Leehow\u002Fpipiui","Leehow","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8022275?v=4","01M79JQKJ75AT6BQD6Q8BDZ6HX","01M79JQKK1HF42F74CMVWVS2ZJ",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fbuilt-in-skills\u002Fmigrate-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","0fc8c5f1d479ff1d7a0f392920d9479a67d4d884","Electron\u002Fresources\u002Fruntime\u002Fbuilt-in-skills\u002Fmigrate-to-shoehorn",0,"https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui","https:\u002F\u002Fpipi.aichattrpg.com\u002F","https:\u002F\u002Fgithub.com\u002FLeehow","2026-10-22 22:52:03",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Leehow\u002Fpipiui --skill migrate-to-shoehorn",{"tool":37,"command":38},"bunx","bunx skills add Leehow\u002Fpipiui --skill migrate-to-shoehorn",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Leehow\u002Fpipiui --skill migrate-to-shoehorn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fbuilt-in-skills\u002Fmigrate-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\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fbuilt-in-skills\u002Fmigrate-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":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M79JW5VYX2QR2404PD7WARKS","terminal-investigation","Bounded file discovery and terminal execution for a Computer Task Terminal Worker.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fterminal-investigation\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M79JW2KXB8C795WKCMA3YQXH","procedure-learning","Compile verified Computer Task exploration into safe parameterized Procedure candidates.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fprocedure-learning\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M79JVZ6B01YXQJNDRYQHMRY9","desktop-verification","Verify a Computer Task from a fresh observation without repairing or mutating the target.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fdesktop-verification\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M79JVWSCCH7MKFKP9NJC4N4G","desktop-investigation","Locate desktop controls with semantic evidence and bounded visual fallback.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fdesktop-investigation\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M79JVRFK3WVCKRCVZ0S1K0X8","cua-driver-operation","Operate PipiUI's pinned Cua Driver through snapshot, semantic locate, coherent action batch, and fresh verification.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fcua-driver-operation\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M79JVMQP7N4SR5HP5QYWMZD3","computer-task-recovery","Replan after target loss, ambiguous location, unknown mutation outcome, or failed verification.","https:\u002F\u002Fgithub.com\u002FLeehow\u002Fpipiui\u002Fblob\u002Fmain\u002FElectron\u002Fresources\u002Fruntime\u002Fpi-ext\u002Fpackages\u002Fcomputer-agent\u002Fskills\u002Fcomputer-task-recovery\u002FSKILL.md",[],[]]