Skip to content
Back to skills

Fix Schema Drift

ASecurity

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.

  • 35 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 20, 2026
developmentbashgitapifrontendbackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add ayunis-core/ayunis-core --skill fix-schema-drift --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Fix Schema Drift
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ayunis-core-fix-schema-drift/badge)](https://www.skillsdirectory.com/skills/ayunis-core-fix-schema-drift)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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
cd ..
pnpm --filter ayunis-core-e2e run openapi:generate
```

Then stage and commit the changed files per `git-workflow`: amend the branch that changed the backend, or commit them as their own change.

## Notes

- Never hand-edit generated files — always regenerate via `pnpm run openapi:update`
- The frontend command fetches using its `.env` and runs formatting and generation in `packages/api-client`. The format step keeps the schema in Prettier's compact-when-fits style.
- 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.