Skip to content
Skills Library
Programming · Building & coding

output

/output

Import and use Kubb's generated code (types, clients, hooks, schemas, mocks). Use when writing app or test code that consumes a Kubb build.

Repository
kubb ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Import and use Kubb's generated code (types, clients, hooks, schemas, mocks). Use when writing app or test code that consumes a Kubb build.

Original author description

Import and use Kubb's generated code (types, clients, hooks, schemas, mocks). Use when writing app or test code that consumes a Kubb build.

How it works

  1. When to Use
  2. What It Does
  3. Where output lands
  4. Find what was generated
  5. Rules
  6. Related Skills
Original SKILL.md headings · 55 lines, 344 words
SKILL.md preview
---
name: output
description: Import and use Kubb's generated code (types, clients, hooks, schemas, mocks). Use when writing app or test code that consumes a Kubb build.
---

# Output Skill

This skill instructs agents on importing and using the code Kubb generates from an OpenAPI/Swagger
spec.

## When to Use

- Writing application code that calls the generated client or hooks
- Writing tests that use the generated mocks or schemas
- Wiring generated files into an app

## What It Does

- Explains where generated code lands
- Shows how to discover the real exports and a plugin's options
- Lists the rules for keeping generated code in sync

## Where output lands

Kubb writes generated code under the `output.path` from `kubb.config.ts` (for example `./src/gen`),
organized into the folders each plugin sets through its own `output.path` (for example `models`,
`clients`, `hooks`). Generated files carry a `Do not edit manually` banner and are rewritten on
every `kubb generate`, so change them by editing the spec or config and regenerating.

Export names derive from the spec's `operationId` and schema names. Casing and grouping are
configurable, so read the generated files for the exact names and signatures rather than assuming
them.

## Find what was generated

Inspect the real output instead of guessing:

1. Read `kubb.config.ts` for the top-level `output.path` and each plugin's `output.path`.
2. List the output directory for the actual file and export names.
3. Read an installed plugin's `Options` type (`node_modules/@kubb/plugin-<name>/src/types.ts`
   or the published type declarations) for its options and defaults, and the plugin's docs page
   (`https://kubb.dev/extensions/kubb-labs/plugin-<name>`) for dependencies. Use those as the source of truth
   rather than assuming an option name.

Import from a folder's `index.ts` when `output.barrel` is set, otherwise import the file directly.

## Rules

- Never edit files under `output.path`. Edit the spec or config and rerun `kubb generate`.
- Import generated code instead of copying it, so a regenerate keeps callers in sync.
- Configure the runtime client once. The client functions and framework hooks share it.
- Typecheck after regenerating so a spec change that broke a call site shows up.

## Related Skills

| Skill | Use For |
| --- | --- |
| **[../config/SKILL.md](../config/SKILL.md)** | Authoring `kubb.config.ts` and picking plugins |

Versions

RepositoryScoreLicence
This page · kubb-labs/kubb100MIT
nealrau/soundscape90MIT

Database snapshot: 13.11.2026 · package version 054e3b46a2d2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100config
    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.
  • 100output-dev-types-file
    Create types.ts files with Zod schemas for Output SDK workflows. Use when defining input/output schemas, creating type definitions, or fixing schema-related errors.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.