Skip to content
Back to skills

Api Contract Design

ASecurity

`analysis-agent`/`task-agent`/`review-agent`: use when endpoints, payloads, errors, auth, pagination, idempotency, or compatibility need a contract; skip when APIs are unchanged.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
businessrustapidocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add machenjie/rd-skills --skill api-contract-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Contract Design?

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

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

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-design
description: "`analysis-agent`/`task-agent`/`review-agent`: use when endpoints, payloads, errors, auth, pagination, idempotency, or compatibility need a contract; skip when APIs are unchanged."
---

# api-contract-design

## Registry Trigger

**Use when**

- design API endpoints resources methods payloads pagination and compatibility

**Do not use when**

- no task-local api contract design decision is required

## Skill Role

Own resource semantics, trusted context, failures, replay, pagination, and compatibility.

## High-Value Rules

- Define operation, resource, consumer, trusted identity, and writable fields.
- Define request, response, error, repeat-delivery, pagination, and completion meaning.
- Select one named Reference for protocol choice, closure, or evidence.
- If the API decision remains active, load only its named Reference.

## Anti-Patterns

- Local success substituted for consumer-contract evidence.

## Stop Conditions

Stop on unknown ownership, identity, replay, pagination, completion, compatibility, or specialist authority.

## Output Contract

- API contract decision with consumer and resource semantics, trusted context, request and response meaning, errors, repeat delivery, pagination or completion, compatibility evidence, and proof limits

## Targeted References

| Path | Type | Load when | Do not load when | Required by | Required output |
|---|---|---|---|---|---|
| [api style and semantics](references/api-style-and-semantics.md) | targeted | Protocol semantics, versioning, or idempotency choices remain contested | An additive bounded contract change preserves established semantics | analysis-agent, task-agent, review-agent | selected-approach, residual-risk |
| [checklist](references/checklist.md) | decision-checklist | The contract changes pagination, errors, authorization, or replay behavior | Only documentation wording changes; wire behavior remains identical | analysis-agent, task-agent, review-agent | checklist-result, residual-risk |
| [evidence patterns](references/evidence-patterns.md) | evidence-pattern | Consumer compatibility depends on fresh specs, clients, or contract tests | No consumer-visible contract claim requires validation | analysis-agent, task-agent, review-agent | evidence-record, proof-limit, residual-risk |

Files in this skill

  • SKILL.md4.1 KB
  • examples/example-output.md626 B
  • references/api-style-and-semantics.md6 KB
  • references/checklist.md596 B
  • references/evidence-patterns.md1.7 KB

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…