kubb-labs/kubb/config
- community
Checking that the SKILL.md file is still in the repository.
How to author a kubb.config.ts and pick the right @kubb/plugin-* packages when generating TypeScript from an OpenAPI/Swagger spec. Use whenever setting up Kubb, adding a generator, or debugging codegen output.
Install
npx vskill@latest install kubb-labs/kubb/configSKILL.md
Config Skill
This skill instructs agents on authoring a kubb.config.ts and picking the right @kubb/plugin-* packages. Generation runs through the kubb CLI (kubb generate), and the same build powers the bundled MCP server.
When to Use
- Setting up Kubb in a project
- Adding or swapping a generator plugin
- Debugging why generated output is missing or wrong
What It Does
- Shows the shape of a
kubb.config.ts - Lists the generator plugins and how to combine them
- Points at each plugin's
Optionstype and kubb.dev docs page for authoritative options - Describes the validate, init and generate workflow
Shape of a config
Rules that matter:
- Set adapter options only when you need them, through a top-level
adapter: adapterOas({ ... }) from @kubb/adapter-oas (for validate, serverIndex, serverVariables, discriminator or contentType).
pluginTsis the base. Each installed plugin's
node_modules/@kubb/plugin-<name>/kubb-extension.json says what else it needs:
- Add every name in
dependencies. - A plugin with
"role": "consumer"(the framework plugins andpluginMcp) also needs a plugin
with "role": "client": pluginAxios or pluginFetch.
- Names in
optionalDependenciesare needed only for some option values, such aspluginFaker
for pluginMsw({ parser: 'faker' }). The plugin's docs page names the option.
Before install, read the same lists on the plugin's docs page (https://kubb.dev/extensions/kubb-labs/plugin-<name>).
- Each generator plugin takes its own
output.path, resolved relative to the top-level
output.path. Keep generated kinds in separate folders (models, clients, hooks, ...).
inputaccepts{ path }for a file or URL. Validate untrusted specs withkubb validate
before generating.
- Generation is destructive when
output.cleanistrue. Never pointoutput.pathat
hand-written source.
- Set
output.formatoroutput.lintto'auto'to format and lint generated files with
whatever tool the project already has (oxfmt, Biome, Prettier, oxlint or ESLint).
Available generator plugins
Pick plugins by what the consumer needs, then install kubb plus each package.
| Need | Package | Import | |
|---|---|---|---|
| TypeScript types (recommended base) | @kubb/plugin-ts | pluginTs | |
| Axios client | @kubb/plugin-axios | pluginAxios | |
| Fetch client | @kubb/plugin-fetch | pluginFetch | |
| TanStack React Query hooks | @kubb/plugin-react-query | pluginReactQuery | |
| Vue Query hooks | @kubb/plugin-vue-query | pluginVueQuery | |
| SWR hooks | @kubb/plugin-swr | pluginSwr | |
| Zod schemas | @kubb/plugin-zod | pluginZod | |
| Faker.js mock factories | @kubb/plugin-faker | pluginFaker | |
| MSW request handlers | @kubb/plugin-msw | pluginMsw | |
| Cypress fixtures | @kubb/plugin-cypress | pluginCypress | |
| MCP server from the spec | @kubb/plugin-mcp | pluginMcp | |
| ReDoc documentation | @kubb/plugin-redoc | pluginRedoc |
For an installed plugin's exact options, read its Options type from the installed package (node_modules/@kubb/plugin-<name>/src/types.ts or the published type declarations) and the plugin's docs page (https://kubb.dev/extensions/kubb-labs/plugin-<name>/options), which lists every option with defaults, the plugin dependencies, and the default output.path. Use those as the source of truth instead of guessing an option name.
Common combinations:
- Types only:
pluginTs(). - Typed data fetching: add
pluginAxios()orpluginFetch(). For hooks, add a framework plugin
(pluginReactQuery, pluginVueQuery or pluginSwr) next to that client plugin.
- Runtime validation: add
pluginZod()and point the client at it for typed, validated responses. - Testing and mocks: add
pluginFaker()andpluginMsw().
Workflow
The commands wrap the kubb CLI, so the same steps work from a terminal.
- Validate the spec with
kubb validate <spec>before anything else. - Scaffold and install with
kubb init. Pass--input,--outputand--pluginsto skip the
prompts, or write kubb.config.ts by hand using the shape above.
- Generate with
kubb generate. Pass--verbosewhen diagnosing why a file is missing or
malformed, and --watch to regenerate on spec changes.
- Typecheck the generated output and wire it into the app.
Related Skills
| Skill | Use For | |
|---|---|---|
| [../output/SKILL.md](../output/SKILL.md) | Importing and using the generated code |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtools/claude/skills/config/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kubb-labs/kubb/config)