← ClaudeAtlas

api-contractlisted

Verify field-level alignment between the ORM schema, Zod validation schemas, and route handler response shapes in the main app (project.json -> mainApp), or check that SQL migrations match the ORM table definitions. Don't use it for writing new API routes (use api-integration), reviewing code style or naming (use code-standards), or auditing function length and complexity (use code-quality).
atretyak1985/swarmery · ★ 3 · API & Backend · score 65
Install: claude install-skill atretyak1985/swarmery
# Purpose Detects field-name mismatches, type mismatches, and nullable/optional inconsistencies across the three layers that define an API entity in the main app: the ORM schema (`apps/<mainApp>/src/lib/db/schema.ts`), the Zod validation schema (co-located with the route or in `src/lib/`), and the route handler's JSON response shape (`src/app/api/**/route.ts`). It also verifies that the ORM table definitions stay in sync with the SQL migrations kept in the infrastructure repo's migrations directory (check `CLAUDE.md` / project.json -> `repos` for the exact path). Examples below use Drizzle ORM and Flyway-style SQL migrations -- adapt to the project's actual ORM and migration tool (project.json -> `stack.db`). # When to use / When NOT to use **Use when:** - An ORM schema table or column was added, renamed, or had its type changed - A new Zod schema was added or an existing one was modified for request/response validation - A route handler's returned JSON shape was changed or a new route handler was created - A SQL migration added/altered a column and the ORM schema needs verification **Do NOT use when:** - Writing a new API route handler from scratch (use `api-integration`) - Reviewing code for style, naming, or function length (use `code-standards` or `code-quality`) - Running a database migration without any schema alignment concern - Refactoring a React component that does not consume or produce API data **Near-miss disambiguation:** - "A schema naming convention looks