api-contract-enforcement
Flag PRs that change the shape, semantics, or error behavior of a public API without versioning, deprecation, or migration notes.
Skill by thrillmade
Chalk Labs
Need help deploying api-contract-enforcement?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thrillmade-api-contract-enforcement
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-contract-enforcement
What's inside
- Skill name
api-contract-enforcement- Description
- Flag PRs that change the shape, semantics, or error behavior of a public API without versioning, deprecation, or migration notes. Catches removed fields, renamed parameters, changed status codes, broken pagination, and silent enum drift. Apply when reviewing HTTP routes, gRPC services, GraphQL schemas, SDK exports, CLI flags, or any other interface a downstream consumer depends on.
- License
- MIT
- Instructions
- 148 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# API contract enforcement
A public API is a promise. This skill reviews PRs for unannounced changes to that promise — the kind of edit that ships green CI in your repo but breaks every consumer the moment it lands.
## What counts as "public API" for this skill
In rough order of consequence:
1. **HTTP routes and request/response shapes** — REST endpoints, JSON-RPC methods, OpenAPI schemas.
2. **gRPC services and message definitions** — protobuf field numbers, deprecated tags, oneof variants.
3. **GraphQL schemas** — types, fields, arguments, directives, enum values.
4. **SDK exports** — anything a package's `index.ts` / `__init__.py` / package's main entry re-exports. Types AND runtime values.
5. **CLI flags, subcommands, and exit codes** — anything documented in `--help` or relied on by scripts.
6. **Database column names, view definitions, materialized views** — when the schema is consumed by readers outside the PR's own service.
7. **Event payload shapes** — Kafka topics, webhook bodies, queue messages.
8. **Configuration file schemas** — when a config file is read by code outside the PR's service.
What this skill is **not** for: internal helper functions, private classes, package-internal modules. Convention says those can change.
## Breaking-change patterns to flag
For each, the finding shape is: quote the diff, explain why it breaks consumers, propose the migration path (deprecate-then-remove, versioned endpoint, additive change, etc.).
### 1. Removed or renamed fields
```diff
- response.user_id
+ response.userId
```
This is a breaking change in two ways: removing `user_id` and adding `userId`. Old consumers reading `user_id` now get `undefined`. The fix is either an additive change (ship `userId` *alongside* `user_id`, deprecate the old field in docs, remove later) or a versioned endpoint (`/v2/users/...`).
### 2. Tightened input validation
```diff
- email: z.string()
+ email: z.string().email().max(254)
```
This rejects requests that previously succeeded. Even if the previously-accepted inputs were "wrong," consumers may be sending them today. Flag and ask whether existing data has been audited — if not, this needs a deprecation window with logged warnings.
### 3. Changed status codes or error shapes
```diff
- res.status(404).json({ error: 'Not found' })
+ res.status(410).json({ code: 'GONE', message: 'Not found' })
```
Three breakages: status code 404 → 410 (clients that switch on status), key `error` → `message` (clients that read it), new key `code` (clients with strict-shape validation may reject extra fields).
### 4. Reordered required fields or positional arguments
```diff
- function createUser(name: string, email: string, role: Role)
+ function createUser(email: string, name: string, role: Role)
```
Every caller now passes arguments in the wrong slots. Tests within the PR's own repo are updated; downstream consumers aren't.
### 5. Silently dropped enum values
```diff
type Status = 'active' | 'paused' | 'archived'
- type Status = 'active' | 'paused' | 'archived'
+ type Status = 'active' | 'archived'
```
A consumer that holds a 'paused' value loses it on the next round-trip. Surface the migration: what happens to existing 'paused' records?
### 6. Changed pagination contract
```diff
- res.json({ items, total, page, pageSize })
+ res.json({ items, nextCursor })
```
Two paradigms — offset/limit vs cursor — can't coexist transparently for consumers. Either keep both response shapes during a transition window, or version the endpoint.
### 7. Stricter rate limits or auth scopes
A previously-permissive endpoint suddenly returning `429` or `403` to existing tokens is a breaking change even though the response *shape* is identical. Flag a missing changelog entry or migration warning.
### 8. Changed default behavior of optional parameters
```diff
- function get(opts = { includeDeleted: false })
+ function get(opts = { includeDeleted: true })
```
Existing callers who omit `opts.includeDeleted` now get different data. Make the change opt-in or feature-flag it.
### 9. Removed CLI flags or shortened forms
```diff
- program.option('-v, --verbose')
+ program.option('--verbose')
```
Scripts using `-v` break silently. Either leave the short form, or version the CLI.
### 10. Database column rename without view + dual-write
```diff
- CREATE TABLE users (id, user_name TEXT)
+ ALTER TABLE users RENAME COLUMN user_name TO name
```
Any reader still issuing `SELECT user_name FROM users` breaks at the moment of deploy. Migration pattern: add the new column, dual-write, deprecate readers of the old column, then drop.
## When this skill should be silent
- The PR doesn't touch any public API surface — pure internal refactor, test changes, build config.
- The change is purely additive — adding a new optional field, new endpoint, new CLI flag — with no removal or behavior change to existing surface.
- The breaking change is explicitly versioned (new endpoint path, new SDK major version, new gRPC service version) AND a migration path / deprecation window is documented in the PR.
- The change is in a clearly marked unstable / experimental / internal surface (`@experimental`, `@internal`, `/v0/`, `__private__`, etc.).
In any of those cases, post a single line and stop:
> [api-contract-enforcement] n/a — no public-API changes in this diff. *(or: change is additive / explicitly versioned)*From thrillmade/agent-skills, MIT.
More from thrillmade/agent-skills
- 0.557score
design-token-naming
thrillmade
SUPERSEDED by `token-naming-conventions` (L0) + `udts-naming-convention` (L2, incubating) — see the design-catalog section of the README; kept unchanged…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
brand-voice-review
thrillmade
Review user-facing strings for brand-voice consistency.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
chroma-harmonization
thrillmade
Use when constructing or auditing a multi-hue palette where all hues should appear equally saturated at each contrast stop.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
component-sizing
thrillmade
SUPERSEDED by `component-sizing-principles` (L0) + `udts-component-sizing-ladders` (L2, incubating) — see the design-catalog section of the README; kept…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
component-sizing-principles
thrillmade
Use when picking a control height (button / input / chip / badge), proposing a component-height or icon-size ladder for a density mode, or auditing one-off…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
consuming-a-design-system
thrillmade
Entry-point dispatcher for CONSUMING a design system in a product — installing its tokens, wiring CSS variables, theming, upgrading across token releases, or…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
design-system-consistency
thrillmade
Use when judging whether a RENDERED surface obeys its own design system — screenshots or a live page plus the computed styles behind them — as the drift lens…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
designing-a-design-system
thrillmade
Entry-point dispatcher for BUILDING or EXTENDING a design system — creating a token architecture, color system, type scale, spacing system, or…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
skill-frontmatter-quality
thrillmade
Review SKILL.md frontmatter for trigger surface, specificity, voice, and completeness.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
apca-contrast
thrillmade
Use when picking text-on-surface contrast, auditing an accessibility budget, or generating a color against a specific contrast target.
SkillBFreshness: B★ 2Claude Code +9 - 0.554score
conventions-template
thrillmade
Template for a "review like me" skill - captures one maintainer's review conventions (formatting, what to flag, what to ignore).
SkillBFreshness: B★ 2Claude Code +9 - 0.553score
curating-a-skill-catalog
thrillmade
Use when judging whether a skill earns its place — running or reviewing a skill census cycle, triaging…
SkillBFreshness: B★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 40
- Last commit (this folder)
- Aug 23, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/thrillmade/agent-skills
- Website
- logmind.dev
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from thrillmade
- 0.557score
brand-voice-review
thrillmade
Review user-facing strings for brand-voice consistency.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
chroma-harmonization
thrillmade
Use when constructing or auditing a multi-hue palette where all hues should appear equally saturated at each contrast stop.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
design-token-naming
thrillmade
SUPERSEDED by `token-naming-conventions` (L0) + `udts-naming-convention` (L2, incubating) — see the design-catalog section of the README; kept unchanged…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
skill-frontmatter-quality
thrillmade
Review SKILL.md frontmatter for trigger surface, specificity, voice, and completeness.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
apca-contrast
thrillmade
Use when picking text-on-surface contrast, auditing an accessibility budget, or generating a color against a specific contrast target.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
component-sizing
thrillmade
SUPERSEDED by `component-sizing-principles` (L0) + `udts-component-sizing-ladders` (L2, incubating) — see the design-catalog section of the README; kept…
SkillBFreshness: B★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get api-contract-enforcement running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
api-contract-enforcement skill. Agent Mart. https://agentmart.dev/skills/thrillmade-api-contract-enforcement (last updated 2026-10-24)