.agents/skills/hey-api-openapi-ts/SKILL.md
End-to-end guidance for @hey-api/openapi-ts across configuration, plugin composition, generated artifact usage, migration safety, and runtime integration. Use whenever users mention hey-api, openapi-ts, openapi-ts.config.ts, sdk.gen.ts, client.gen.ts, types.gen.ts, zod.gen.ts, @hey-api/client-fetch, @hey-api/sdk, @tanstack/react-query.gen, or OpenAPI code generation workflows.
npx skillsauth add HuynhSang2005/delivery-app hey-api-openapi-tsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to implement, audit, refactor, and troubleshoot projects that generate API layers with @hey-api/openapi-ts.
@hey-api/openapi-ts.sdk.gen.ts, types.gen.ts, client.gen.ts, zod.gen.ts, transformers.gen.ts, or TanStack output files..gen.ts files.client.setConfig(), runtime config path, interceptors).openapi-ts.config.ts).package.json.openapi/*.json|yaml or URL inputs).main.tsx, app bootstrap, or API init module).Detailed checklist: references/audit-checklist.md
At minimum, validate:
input: file path(s), URL(s), or OpenAPI object(s).output.path: generated destination.plugins: explicit ordered list.Common production stack for Fetch + SDK + validation + transforms + TanStack Query:
@hey-api/client-fetch@hey-api/sdkzod (or another validator plugin)@hey-api/transformers@tanstack/react-query (or framework equivalent)Reference recipes: references/config-recipes.md
Preferred order of runtime initialization:
Supported patterns:
client.setConfig() at startup.runtimeConfigPath for initialization-time defaults.Reference runtime patterns: references/runtime-patterns.md
Treat these outputs as stable integration surfaces:
client.gen.ts: global client instance setup.sdk.gen.ts: operation-level SDK functions/classes.types.gen.ts: canonical request/response types.zod.gen.ts / validator artifacts: runtime schema validation.transformers.gen.ts: parse/transform helpers when enabled.@tanstack/...gen.ts: generated query/mutation option builders.Never duplicate generated DTOs unless extending with clearly named local view-model types.
Before upgrading @hey-api/openapi-ts:
Reference migration watchlist: references/migration-watchlist.md
After any generator or config change:
Reference verification matrix: references/testing-and-verification.md
.gen.ts files.fetch/axios without explicit reason.sdk.transformer.sdk.validator wiring.tanstack-query-best-practices for cache and mutation strategy.zod for schema authoring/validation conventions.plan-work for multi-file design and sequencing.execute-work for disciplined implementation checkpoints.systematic-debugging for root-cause investigation.verification-before-completion before claiming success.templates/openapi-ts.config.fetch-react-query.tstemplates/runtime-config.fetch.tshttps://heyapi.dev/openapi-ts/https://heyapi.dev/openapi-ts/migratinghttps://heyapi.dev/openapi-ts/clients/fetchhttps://heyapi.dev/openapi-ts/plugins/sdkhttps://github.com/hey-api/openapi-tstools
React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, and useFieldArray. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling.
tools
Build type-safe validated forms using React Hook Form v7 and Zod v4. Single schema works on client and server with full TypeScript inference via z.infer. Use when building forms, multi-step wizards, or fixing uncontrolled warnings, resolver errors, useFieldArray issues, performance problems with large forms.
tools
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
development
Required reference for Prisma v7 driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter/Transaction interfaces. Contains critical contract details not inferable from code examples — including the transaction lifecycle protocol, error mapping requirements, and verification checklist. Existing implementations do not replace this skill.