Skip to content
Back to skills

Api Contract

ASecurity

Change an HTTP route that a live client depends on without breaking it, and update the contract snapshots when a change is intended. Use when editing any route in points, storefront, calendar, auth, public, users or organizations.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
testingapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add asusoda/platform --skill api-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Contract?

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

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

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
description: Change an HTTP route that a live client depends on without breaking it, and update the contract snapshots when a change is intended. Use when editing any route in points, storefront, calendar, auth, public, users or organizations.
---

thesoda.io (asusoda/website) and the `dashboard/` app call the API directly. `docs/api-contract.md` lists every route a client depends on, and `tests/contract/test_contract.py` checks each one's status code and JSON shape against `tests/contract/snapshots.json`.

1. Before changing a route, find it in `docs/api-contract.md` and in `CASES` in `test_contract.py`.
2. Keep the path, method, status codes and response keys. Add fields rather than renaming or removing them.
3. Run `uv run pytest tests/contract -q`. A failing contract case means a client breaks.
4. When a break is intended and the client is updated in the same release, regenerate with `UPDATE_CONTRACT=1 uv run pytest tests/contract/test_contract.py`, and name the client and its change in the PR.
5. Access checks start in report mode: a new refusal is logged as `access decision=would_deny` until `ACCESS_ENFORCE=true`. Do not turn a report-mode check into a hard refusal in the same change.

Routes added for new modules are not in the contract until a client depends on them.

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.