Skip to content
Back to skills

Api Contract Sync

ASecurity

Keep API code and contract layers synced when endpoints, DTOs, payloads, status codes, query params, auth rules, or business transitions change. Use for API work in projects with OpenAPI/Scalar or Swagger, Bruno, Gherkin, shared client types, or generated mocks.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agentsapifrontend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add me-cedric/agent-compass --skill api-contract-sync --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Contract Sync?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Contract Sync
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/me-cedric-api-contract-sync/badge)](https://www.skillsdirectory.com/skills/me-cedric-api-contract-sync)

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: api-contract-sync
description: >
  Keep API code and contract layers synced when endpoints, DTOs, payloads,
  status codes, query params, auth rules, or business transitions change. Use
  for API work in projects with OpenAPI/Scalar or Swagger, Bruno, Gherkin,
  shared client types, or generated mocks.
risk_level: medium
writes_files: true
requires_tools: []
---

# API Contract Sync

Use this for every API behavior change. An endpoint is not done until code,
docs, client examples, and behavior specs agree.

## Trigger

Run when changing:

- route path, method, auth, ownership, status code, headers, query params,
  payload, DTO/schema, error shape, pagination, sorting, filtering
- controller/service business behavior visible through an API
- generated shared types or API client contracts

## Contract Layers

Check only layers that exist in the host repo:

- Controller docs: `@ZodResponse`, Swagger/OpenAPI decorators, Scalar setup.
- DTO/schema: Zod/class DTO metadata and exported shared types.
- Bruno: `tools/bruno/**/*.bru` request examples and payloads.
- Gherkin: `**/*.feature` behavior scenarios.
- Mockoon or generated mocks when the repo uses them.
- Frontend/shared API client types when consumers import the changed symbol.

## Workflow

1. Read host `AGENTS.md`, module `README.md`, command registry, and nearby
   specs/features before editing.
2. Find every contract layer for the changed route or DTO.
3. Update code and contract files in the same task.
4. If a layer is missing, report `not present`, not `skipped`.
5. Validate with the smallest declared commands: lint, typecheck, relevant API
   tests, contract/spec tests, and build only when required by the change.

## Review Gate

Before handoff, answer:

- Which endpoints/DTOs changed?
- Which contract layers were updated?
- Which layers were not present?
- Which commands ran, and did they pass?

If code changed but an existing contract layer was not updated, report the task
as partial.

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.

Comments

Loading comments…

Newsletter

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