Skip to content
Back to skills

Api Contract Sync

ASecurity

Keep API code, OpenAPI, Bruno, Gherkin, mocks and client types in step. Use when an endpoint, DTO, payload, status code, query parameter or auth rule changes.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 6, 2026
developmentreactangularapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 6, 2026

npx -y skills add me-cedric/Shipyard --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-shipyard/badge)](https://www.skillsdirectory.com/skills/me-cedric-api-contract-sync-shipyard)

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, OpenAPI, Bruno, Gherkin, mocks and client types in step. Use when an endpoint, DTO, payload, status code, query parameter or auth rule changes.
risk_level: medium
writes_files: true
requires_tools: [bru]
metadata:
  stacks: [nestjs-api, react-web, next-web, angular-web, expo-mobile]
---

# api-contract-sync

An endpoint is not done until the code, the docs, the client examples and the behavior specs agree.
Update all layers in the same task. Never defer a layer to a follow-up PR.

## Trigger

Run this skill when you change any of these:

- A route path, method, auth rule, ownership rule, status code, header or query parameter.
- A payload, DTO, schema, error shape, pagination, sorting or filtering.
- Controller or service behavior that an API shows.
- Generated shared types or API client contracts.

## Layers

Check only the layers that exist in the repository. The OpenAPI file is in `docs/api` when the project keeps one there.

1. Controller docs and DTO metadata (OpenAPI, Swagger or Scalar decorators):
   - Each endpoint documents its purpose, all response codes, its query and path parameters and its auth scheme.
   - Each DTO field has a description and an example, and says if it is required.
   - A new module is registered in the OpenAPI bootstrap, with its tags.
2. Bruno requests (`*.bru`):
   - The URL, method, query parameters, body and headers match the controller and the DTO.
   - The `docs` block and the pre-request and post-response scripts are current.
   - A new endpoint gets a new request file. A deleted endpoint loses its file. Keep the `seq` order in `folder.bru`.
3. Gherkin (`*.feature`): add or change a `Scenario` for each new or changed behavior. Update `Examples` tables.
4. Mocks and client types:
   - Mockoon: start a mock from the OpenAPI file with `npx @mockoon/cli start --data <openapi-file>`. Check that the mock answers the new shape.
   - Shared client types: update each consumer that imports the changed symbol.

## Steps

1. Read the repository `AGENTS.md`, the module README and the nearby specs and features.
2. Find every layer for the changed route or DTO.
3. Change the code and the layers together.
4. Write `not present` for a layer that does not exist. Never write `skipped`.
5. Run the smallest declared checks: lint, typecheck, the API tests, the contract tests.
6. Run the Bruno collection against the running API: `bru run <collection-dir> --env <env>`. Report each failing request.
7. After a decorator change, check that the app still starts and the OpenAPI document builds.

## Review gate

Before the handoff, answer four questions:

- Which endpoints and DTOs changed?
- Which layers did you update?
- Which layers are not present?
- Which commands ran, and did they pass?

If code changed and an existing layer did not, 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.

View all in development →

Comments

Loading comments…

Newsletter

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