[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B2Y6JRRBAXSHS8GJ733PMJ":3,"skill-same:01M7B2Y6JRRBAXSHS8GJ733PMJ":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":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7B2Y6JRRBAXSHS8GJ733PMJ","hamster-ai-tools",null,"Design, implement, review, and repair model-facing AI SDK tools in apps\u002Fai, including Zod input schemas, field descriptions, JSON Schema conversion, validation-error loops, tool-call repair hooks, and contract tests. Use whenever adding or changing an agent tool, diagnosing tool input validation failures, or reviewing whether a tool gives the model enough guidance.","gethamster\u002Fskills","gethamster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F215697643?v=4","01M7B2R6PGB3SDZZ71E0WE2S74","Hamster","01M7B2R6Q21HWJRXZZWB78BNDG",4,"MIT","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fhamster-ai-tools\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: hamster-ai-tools\ndescription: \"Design, implement, review, and repair model-facing AI SDK tools in apps\u002Fai, including Zod input schemas, field descriptions, JSON Schema conversion, validation-error loops, tool-call repair hooks, and contract tests. Use whenever adding or changing an agent tool, diagnosing tool input validation failures, or reviewing whether a tool gives the model enough guidance.\"\n---\n\n# Hamster AI Tools\n\nTreat an agent tool's generated JSON Schema as its prompt contract. Make the valid call shape obvious before relying on validation errors or repair.\n\n## Design the input contract\n\n1. Put every machine-readable constraint in Zod:\n   - Use `.min()`, `.max()`, `.length()`, `.int()`, `.positive()`, enums, `z.uuid()`, optional\u002Fdefault fields, and discriminated unions as appropriate.\n   - Prefer native Zod constraints over prose because the AI SDK converts them to JSON Schema keywords the model can use.\n   - Give model-correctable bounds an actionable Zod error message. State how to rewrite the value for a valid retry (for example, synthesize repeated evidence or split independent operations), not only the numeric limit. Keep the native constraint so the generated JSON Schema still carries `minLength`, `maxLength`, or the equivalent keyword.\n   - Reuse canonical shared schemas and constants; do not duplicate enum members or validation limits.\n2. Use field-local `.describe()` text only for semantics Zod cannot express:\n   - Explain what the value means, when to choose it, where to obtain it, cross-field relationships, and side effects.\n   - Do not repeat lengths, ranges, enum members, required\u002Foptional status, UUID format, or other constraints already present in the generated schema.\n   - Keep descriptions concise and actionable. Avoid implementation details and generic filler.\n3. Use refinements only for constraints that native Zod cannot represent:\n   - Attach the issue to the relevant `path` and write an actionable message that states how to correct the input.\n   - Use `superRefine` for cross-field invariants. Describe the relationship on the involved fields because refinements may not survive JSON Schema conversion.\n   - Do not depend on a thrown validation error as the model's first source of guidance.\n4. Treat transforms as execution behavior, not model guidance. Confirm that the input-side constraints and descriptions still appear after conversion.\n\n## Inspect what the model receives\n\nRender the actual tool schema through the same AI SDK conversion used in production:\n\n```typescript\nimport { asSchema } from '@ai-sdk\u002Fprovider-utils';\n\nconst jsonSchema = asSchema(tool.inputSchema).jsonSchema;\n```\n\nInspect `properties`, `required`, enums, formats, bounds, descriptions, and union structure. Do not approve a schema by reading only its Zod source.\n\nAdd a contract test for every new or materially changed model-facing schema. Assert both layers separately:\n\n- Structural guidance is represented by JSON Schema keywords such as `minLength`, `maxLength`, `enum`, and `format`.\n- Descriptions contain only the semantic guidance that cannot be encoded structurally.\n- Required fields and union branches match the tool's execution contract.\n- Correctable validation failures expose the intended retry guidance through the Zod issue message. Assert the issue `code`, `path`, and message so a generic default cannot silently return.\n\nFollow the repository's `test-driven-development` skill: change the contract test first, observe the intended failure, then change the schema.\n\n## Handle tool-call repair\n\n- Use the AI SDK's `experimental_repairToolCall` hook for model-generated calls that fail parsing or validation.\n- Keep orchestration wiring thin. Put reusable repair dispatch in the orchestration repair module and tool-specific repair beside the tool.\n- Parse with the AI SDK\u002Fprovider utility used by the codebase; do not add bespoke `JSON.parse` wrappers.\n- Repair only lossless structural defects deterministically. Revalidate the complete repaired payload against the canonical Zod schema.\n- Never repair semantic text by truncating, slicing, dropping fields, or otherwise discarding context to satisfy a bound. Return no repair so the multi-step model can retry from the full conversation context. If a dedicated model-based repair is justified, require structured output against the canonical schema and instruct it to preserve every material fact.\n- Return no repair for ambiguous, missing, authorization-sensitive, or semantically invalid input. Never invent IDs, enum choices, or user intent.\n- Bound repair to one attempt and preserve observability. Repair is a safety net, not a substitute for a strong schema.\n\n## Review checklist\n\n- Inspect the generated JSON Schema, not just Zod.\n- Encode structure in Zod and semantics in `.describe()`.\n- Avoid duplicated constraints in prose.\n- Make refinement errors field-specific and actionable.\n- Test the model-facing contract and execution validation.\n- Use official AI SDK repair and parsing APIs.\n- Keep tool-specific logic out of the core orchestrator.\n- Compare detail quality with adjacent tools before declaring the contract complete.\n\n## Key files\n\n| File | Purpose |\n| --- | --- |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Ftools\u002F` | Agent tool implementations and specs |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Forchestration\u002Fcore-tool-call-repair.ts` | Shared repair dispatch for core agents |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Fagents\u002Fcore-agent\u002Fcore-orchestrator.agent.ts` | Thin AI SDK repair-hook wiring |\n| `packages\u002Fshared\u002Fsrc\u002Fschemas\u002F` | Canonical shared Zod schemas and limits |\n","# Hamster AI Tools\n\nTreat an agent tool's generated JSON Schema as its prompt contract. Make the valid call shape obvious before relying on validation errors or repair.\n\n## Design the input contract\n\n1. Put every machine-readable constraint in Zod:\n   - Use `.min()`, `.max()`, `.length()`, `.int()`, `.positive()`, enums, `z.uuid()`, optional\u002Fdefault fields, and discriminated unions as appropriate.\n   - Prefer native Zod constraints over prose because the AI SDK converts them to JSON Schema keywords the model can use.\n   - Give model-correctable bounds an actionable Zod error message. State how to rewrite the value for a valid retry (for example, synthesize repeated evidence or split independent operations), not only the numeric limit. Keep the native constraint so the generated JSON Schema still carries `minLength`, `maxLength`, or the equivalent keyword.\n   - Reuse canonical shared schemas and constants; do not duplicate enum members or validation limits.\n2. Use field-local `.describe()` text only for semantics Zod cannot express:\n   - Explain what the value means, when to choose it, where to obtain it, cross-field relationships, and side effects.\n   - Do not repeat lengths, ranges, enum members, required\u002Foptional status, UUID format, or other constraints already present in the generated schema.\n   - Keep descriptions concise and actionable. Avoid implementation details and generic filler.\n3. Use refinements only for constraints that native Zod cannot represent:\n   - Attach the issue to the relevant `path` and write an actionable message that states how to correct the input.\n   - Use `superRefine` for cross-field invariants. Describe the relationship on the involved fields because refinements may not survive JSON Schema conversion.\n   - Do not depend on a thrown validation error as the model's first source of guidance.\n4. Treat transforms as execution behavior, not model guidance. Confirm that the input-side constraints and descriptions still appear after conversion.\n\n## Inspect what the model receives\n\nRender the actual tool schema through the same AI SDK conversion used in production:\n\n```typescript\nimport { asSchema } from '@ai-sdk\u002Fprovider-utils';\n\nconst jsonSchema = asSchema(tool.inputSchema).jsonSchema;\n```\n\nInspect `properties`, `required`, enums, formats, bounds, descriptions, and union structure. Do not approve a schema by reading only its Zod source.\n\nAdd a contract test for every new or materially changed model-facing schema. Assert both layers separately:\n\n- Structural guidance is represented by JSON Schema keywords such as `minLength`, `maxLength`, `enum`, and `format`.\n- Descriptions contain only the semantic guidance that cannot be encoded structurally.\n- Required fields and union branches match the tool's execution contract.\n- Correctable validation failures expose the intended retry guidance through the Zod issue message. Assert the issue `code`, `path`, and message so a generic default cannot silently return.\n\nFollow the repository's `test-driven-development` skill: change the contract test first, observe the intended failure, then change the schema.\n\n## Handle tool-call repair\n\n- Use the AI SDK's `experimental_repairToolCall` hook for model-generated calls that fail parsing or validation.\n- Keep orchestration wiring thin. Put reusable repair dispatch in the orchestration repair module and tool-specific repair beside the tool.\n- Parse with the AI SDK\u002Fprovider utility used by the codebase; do not add bespoke `JSON.parse` wrappers.\n- Repair only lossless structural defects deterministically. Revalidate the complete repaired payload against the canonical Zod schema.\n- Never repair semantic text by truncating, slicing, dropping fields, or otherwise discarding context to satisfy a bound. Return no repair so the multi-step model can retry from the full conversation context. If a dedicated model-based repair is justified, require structured output against the canonical schema and instruct it to preserve every material fact.\n- Return no repair for ambiguous, missing, authorization-sensitive, or semantically invalid input. Never invent IDs, enum choices, or user intent.\n- Bound repair to one attempt and preserve observability. Repair is a safety net, not a substitute for a strong schema.\n\n## Review checklist\n\n- Inspect the generated JSON Schema, not just Zod.\n- Encode structure in Zod and semantics in `.describe()`.\n- Avoid duplicated constraints in prose.\n- Make refinement errors field-specific and actionable.\n- Test the model-facing contract and execution validation.\n- Use official AI SDK repair and parsing APIs.\n- Keep tool-specific logic out of the core orchestrator.\n- Compare detail quality with adjacent tools before declaring the contract complete.\n\n## Key files\n\n| File | Purpose |\n| --- | --- |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Ftools\u002F` | Agent tool implementations and specs |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Forchestration\u002Fcore-tool-call-repair.ts` | Shared repair dispatch for core agents |\n| `apps\u002Fai\u002Fsrc\u002Fmodules\u002Fai-agent\u002Fagents\u002Fcore-agent\u002Fcore-orchestrator.agent.ts` | Thin AI SDK repair-hook wiring |\n| `packages\u002Fshared\u002Fsrc\u002Fschemas\u002F` | Canonical shared Zod schemas and limits |\n",{"name":5,"description":7},"main","fe3bb1476c3ec23d8a366eac0fa8cd9f0852360a","skills\u002F.experimental\u002Fhamster-ai-tools",0,"https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgethamster","https:\u002F\u002Ftryhamster.com","We're building the AI-native future of work, unlocking the promised acceleration for your whole team, from idea to impact.","2026-11-05 11:33:33",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add gethamster\u002Fskills --skill hamster-ai-tools",{"tool":39,"command":40},"bunx","bunx skills add gethamster\u002Fskills --skill hamster-ai-tools",{"tool":42,"command":43},"pnpm","pnpm dlx skills add gethamster\u002Fskills --skill hamster-ai-tools","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fhamster-ai-tools\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"agents\u002Fopenai.yaml","REFERENCE","参考文档",205,"https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fhamster-ai-tools\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},"01M7B5MWYW0KE251276S56KQDZ","writing-waterfall-requirements-documents","Write a waterfall requirements document: elicit, structure and review testable, traceable requirements, then baseline the specification before design.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-waterfall-requirements-documents\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},"01M7B5MRCXWWPKREPB1CHQ7H90","writing-vision-and-values-statements","Write a V2MOM vision a reader can test and a ranked list of values that settles real tradeoffs, so the rest of the document has a clear anchor.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-vision-and-values-statements\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},"01M7B5MKH2CH22YZAHQW3080VQ","writing-system-prompts-for-claude","Write Claude prompts and CLAUDE.md files that supply exact inputs, scope the task, and define done so the first attempt can be checked.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-system-prompts-for-claude\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},"01M7B5ME1Y3X9RNRKP5HKHKACZ","writing-page-specific-website-copy","Website copywriting by page type: write homepage, landing page, pricing page and feature page copy that fits each page's visitor and single job.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-page-specific-website-copy\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},"01M7B5M8MQNM8MN8PYH6BVWJ2B","writing-internal-press-releases","How to write an internal press release: the one-page working backwards press release that opens a PR\u002FFAQ document before anything is built.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-internal-press-releases\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},"01M7B5M3P3YH1XF37R8PWXXSBK","writing-email-sequences-that-sell","Email sequence copywriting for nurture and sales: give each email one job, write clear subject lines, and close with one specific call to action.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-email-sequences-that-sell\u002FSKILL.md",[],[]]