heyapi
Skill1 starsChanged 3 months agoMITView on GitHub
Build, configure, review, debug, migrate, or plan Hey API (@hey-api/openapi-ts) OpenAPI-to-TypeScript codegen with current docs. Use for openapi-ts, defineConfig, generated SDKs, types, Fetch/Axios/Next/Nuxt/Ky clients, Zod/Valibot validators, TanStack Query plugins, vite-plugin, client.setConfig, auth, interceptors, throwOnError, registry inputs, and regenerating clients from OpenAPI specs.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches Hey API / @hey-api/openapi-ts: generating TypeScript clients from OpenAPI, configuring plugins, wiring …
- Very specific: line 24
Prefer regenerating over hand-editing *.gen.ts or bundled client/ / core/ scaffolding.
- Very specific: line 27
Prefer bun / bunx in command examples when adding scripts.
- Distinctive: line 31
Treat the OpenAPI spec as the contract.
- Distinctive: line 32
Treat the output folder as a dependency.
- Very specific: line 33
Default client is Fetch (@hey-api/client-fetch).
- Distinctive: line 43
Prefer the repo's existing checks.
- Distinctive: line 49
After upgrades, read Migrating for the crossed versions before merging.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Hey API
Use this skill when work touches Hey API / @hey-api/openapi-ts: generating TypeScript clients from OpenAPI, configuring plugins, wiring HTTP clients, validators, TanStack Query artifacts, or regenerating API layers.
Workflow
- Inspect the local Hey API surface before changing code:
- Package versions for
@hey-api/openapi-ts,@hey-api/vite-plugin, client packages, validators (zod/valibot), and TanStack Query. - Config file:
openapi-ts.config.ts(or.js/.mjs/.cjs) and any Vite plugin integration. - Spec input: local path, remote URL, registry shorthand (
hey-api/...,scalar:...,readme:...), or inline object. - Output folder contents (
*.gen.ts,client/,core/) and whether consumers import fromindex.tsor specific generated files. - Runtime wiring:
client.setConfig,runtimeConfigPath/createClientConfig, auth, interceptors, per-callclientoverrides.
- Package versions for
- Refresh docs when the user asks for latest behavior, the installed version is unclear, or the work touches migrations, plugin APIs, or Node/runtime requirements. Start from source-map.md.
- For install, CLI,
defineConfig, input/output, multi-job configs, and Vite, use setup-config.md. - For HTTP clients, SDK shapes, auth, interceptors,
throwOnError, and consuming generated functions, use clients-sdk.md. - For Zod/Valibot, TanStack Query, transformers/validators, and web-framework plugins, use plugins-validators.md.
- For output layout, entry exports, and breaking-change checks, use output-migration.md.
- Implement in the existing project style:
- Prefer regenerating over hand-editing
*.gen.tsor bundledclient//core/scaffolding. - Compose only the plugins the app needs; defaults already emit TypeScript + SDK (Fetch).
- Pin
@hey-api/openapi-tsto an exact version unless the project deliberately tracks a range. - Prefer
bun/bunxin command examples when adding scripts.
- Prefer regenerating over hand-editing
Judgment
- Treat the OpenAPI spec as the contract. Fix or regenerate from the spec; do not paper over drift with local edits to generated files.
- Treat the output folder as a dependency. Changes there are erased on the next codegen run.
- Default client is Fetch (
@hey-api/client-fetch). Pick Axios, Ky, Next.js, Nuxt, OFetch, or Angular only when the runtime needs them. - SDK responses are typically
{ data, error }unlessthrowOnErroris enabled on the client plugin (not the SDK plugin). - Enable SDK
validator/transformeronly when runtime validation or transformation is intentional; it has a cost and pulls in the validator plugin. - For React Query, prefer spreading generated
*Options()/*Mutation()helpers intouseQuery/useMutationrather than re-wrapping SDK calls by hand. - Watch mode supports remote URL inputs; do not assume local-file watch works.
- Requires Node.js 22+ (22.13+ for recent releases). Package is ESM-only since v0.91.
- Python codegen is not production-ready yet; keep this skill focused on TypeScript
@hey-api/openapi-ts.
Verification
Prefer the repo's existing checks. For meaningful Hey API work, include the relevant subset:
- Regenerate with the project's
openapi-tsscript and confirm a clean diff policy for generated output. - Typecheck consumers of SDK functions, query options, and Zod/Valibot schemas.
- Smoke one success path and one error path (
datavserror, or thrown errors ifthrowOnError). - Confirm
baseUrl/baseURL(client-specific), auth, and interceptors against a real or mocked endpoint. - After upgrades, read Migrating for the crossed versions before merging.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

