generate-api-client

SkillDev tools

Regenerate the frontend TypeScript API client from backend OpenAPI spec. Use after changing backend controller signatures or related data types. Triggers on: generateTypeScript, API regeneration, controller signature changed, OpenAPI lint failure, generated API code.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the generate-api-client skill

What this skill tells your AI

The instructions your AI receives, as published by nerds-odd-e/doughnut in .agents/skills/generate-api-client/SKILL.md and read by ahel’s review.

Purpose: Keep packages/generated/donut-backend-api in sync with Java controllers — never hand-edit generated output.

Output: Regenerated client + green frontend tests + summary ending with ## API CLIENT GENERATED.

Never edit generated code directly. This includes whitespace-only cleanup in sdk.gen.ts, types.gen.ts, and open_api_docs.yaml; if generated output changes, accept it or fix the generator path.

Git does not use the Nix prefix. All other repo tooling does: CURSOR_DEV=true nix develop -c …

Do not run raw git diff --check as a generated-client cleanup gate. Use scripts/check_diff_whitespace.sh, which excludes generated API artifacts from manual whitespace fixes.

Regenerate when:

  • A backend controller signature changed
  • A backend data type used by any controller signature changed
  • pnpm openapi:lint or pnpm format:all fails with OpenAPI validation errors
CURSOR_DEV=true nix develop -c pnpm frontend:test

Fix any broken frontend code that used the old API signatures.

<success_criteria>

  • Java controllers fixed at source (not generated files)
  • pnpm generateTypeScript run with Nix prefix
  • Frontend tests pass after signature changes
  • OpenAPI lint passes (fix controllers + regenerate, never hand-edit YAML)
  • Final output includes ## API CLIENT GENERATED </success_criteria>
  1. What triggered regeneration (controller/DTO change, lint failure, etc.).
  2. Whether frontend call sites needed updates.
  3. Tests run and confirmed passing.
## API CLIENT GENERATED

<out_of_scope>

  • Do not hand-edit sdk.gen.ts, types.gen.ts, or open_api_docs.yaml.
  • Do not use raw git diff --check for generated-client whitespace gates. </out_of_scope>

Signals

GitHub stars
49
Forks
72
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
generate-api-client
Source
github.com/nerds-odd-e/doughnut