Fix OpenAPI schema drift between backend and frontend. Use when CI fails with "API Schema Drift" or "API client is out of date", or after adding/changing backend controllers or DTOs.
Scanned 9/20/2026
Install to Claude Code
npx -y skills add ayunis-core/ayunis-core --skill fix-schema-drift --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Fix Schema Drift?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/ayunis-core-fix-schema-drift)More formats (shields.io, HTML) on the badges page.
---
name: fix-schema-drift
description: Fix OpenAPI schema drift between backend and frontend. Use when CI fails with "API Schema Drift" or "API client is out of date", or after adding/changing backend controllers or DTOs.
---
# Fix OpenAPI Schema Drift
## Prerequisites
The dev stack must be running (`./dev status`). Start with `./dev up` if needed.
## Fix
```bash
cd ayunis-core-frontend
pnpm run openapi:update
```
Then stage and commit the changed files with `gt modify` or `gt create`.
## Notes
- Never hand-edit generated files — always regenerate via `pnpm run openapi:update`
- `pnpm run openapi:update` runs `openapi:fetch` → `openapi:format` → `openapi:generate`. The format step (`prettier --write`) is required: `fetch-openapi-schema.js` writes via `JSON.stringify(_, null, 2)`, which puts every short array on multiple lines, but the canonical on-disk format is prettier's compact-when-fits style. Without the format step, schema regens produce ~2000 lines of whitespace-only churn.
- If you ever need to format the schema by itself: `pnpm run openapi:format`
- Formatting-only changes are normal — still commit them to keep CI green
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!