[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWW7ENP6Y2T96352X9NWM8":3,"skill-same:01M7AWW7ENP6Y2T96352X9NWM8":53},{"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":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AWW7ENP6Y2T96352X9NWM8","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.","wangmiaozero\u002Fpi-harness","wangmiaozero","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F45121589?v=4","01M7AWPWCP23VHFH4433FG7SV8","seedling","01M7AWPWDBEBWBMPCA6VSEFJBB",385,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fmisc\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","ab32e788f56afdb9367c3a1a6b33a19e5d0058cd","resources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fmigrate-to-shoehorn",26,"https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness","https:\u002F\u002Fwangmiaozero.github.io\u002Fpi-harness-website\u002F","https:\u002F\u002Fgithub.com\u002Fwangmiaozero","Sometimes you need to applaud yourself!\r\n有时候我们需要为自己鼓掌","2026-11-15 00:08:20",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add wangmiaozero\u002Fpi-harness --skill migrate-to-shoehorn",{"tool":39,"command":40},"bunx","bunx skills add wangmiaozero\u002Fpi-harness --skill migrate-to-shoehorn",{"tool":42,"command":43},"pnpm","pnpm dlx skills add wangmiaozero\u002Fpi-harness --skill migrate-to-shoehorn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fmigrate-to-shoehorn\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"agents\u002Fopenai.yaml","REFERENCE","参考文档",110,"https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fmigrate-to-shoehorn\u002Fagents\u002Fopenai.yaml",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7AWWZY5GKH53CCVBRWM189E","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7AWWX17A9H17BRHCHHN0PYQ","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AWWTJXPFBG1WB5ASW1C9XF","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AWWR5NW24TGSN342CMHJ5P","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7AWWNYR6NZ1J9BA059WWGZ4","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7AWWKJKST2EVB9N4QH9DVGT","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002Fwangmiaozero\u002Fpi-harness\u002Fblob\u002Fmain\u002Fresources\u002Fbuiltin-skills\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[]]