Skip to content
Agentmart
Submit a tool

api-contract

Design or review an API (REST, GraphQL, gRPC, SDK or library interface) for clarity, consistency and long-term compatibility.

Skill by shankarr1503

IndexedMIT
Write a review

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/shankarr1503-api-contract

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.

We use your email only for this newsletter. Privacy

About

Design or review an API (REST, GraphQL, gRPC, SDK or library interface) for clarity, consistency and long-term compatibility. Use when adding endpoints, changing request/response shapes, designing a public interface, or reviewing an API proposal.

Use cases: documents, design, backend

No 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

What's inside

Skill name
api-contract
Description
Design or review an API (REST, GraphQL, gRPC, SDK or library interface) for clarity, consistency and long-term compatibility. Use when adding endpoints, changing request/response shapes, designing a public interface, or reviewing an API proposal.
License
MIT
Instructions
40 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# API contract

An API is a promise you will be held to for years. Design it for the caller, and make it hard to break.

## 1. Start from the caller

- Write the client code first: how will a caller use this for the main use case? If that code is awkward, the API is wrong.
- Match the existing API's conventions in this codebase (naming, casing, pagination, errors, auth, versioning) before any general best practice.

## 2. Shape

- **Resources and names:** nouns for resources, consistent plural/singular, consistent casing. Same concept, same name everywhere.
- **Operations:** correct HTTP methods and status codes (201 + location for create, 204 for empty success, 404 vs 403 deliberately, 409 for conflicts, 422/400 for validation). GraphQL: nullable by default where failure is possible; mutations return the changed object.
- **Inputs:** validate everything at the boundary; reject unknown fields or ignore them consistently; explicit units and formats (ISO-8601 UTC timestamps, currency as minor units + code, IDs as strings).
- **Outputs:** stable envelope; never leak internal fields, stack traces or database IDs you may want to change.
- **Errors:** machine-readable code + human message + details for field errors, the same shape for every endpoint (e.g. RFC 9457 problem details).
- **Collections:** pagination from day one (cursor-based for changing data), a max page size, stable sort order, filtering conventions.

## 3. Reliability

- **Idempotency:** `PUT`/`DELETE` idempotent; for `POST` that creates or charges, accept an idempotency key.
- **Concurrency:** ETags / version fields for optimistic locking on updates.
- **Limits:** rate limits with `429` + `Retry-After`; payload size limits; timeouts.
- **Long work:** return `202` with a status resource instead of holding the request open.

## 4. Security

Authentication on every endpoint unless deliberately public; object-level authorization (the caller owns _this_ record); no sensitive data in URLs; least-privilege scopes.

## 5. Compatibility

- **Safe:** adding optional request fields, adding response fields _only if_ clients tolerate unknown fields, adding endpoints, adding enum values _only if_ clients were told to tolerate unknown values.
- **Breaking:** removing/renaming fields, changing types or meaning, making optional fields required, changing defaults, changing error codes, tightening validation.
- Breaking changes need a new version or a deprecation period with signalling (docs, `Deprecation`/`Sunset` headers, logs of who still calls the old shape).

## Output

For a design: the endpoint/operation list with request/response examples and error cases. For a review: findings as `[Breaking|Major|Minor] location — issue — suggested change`, plus what is good and should be kept.

From shankarr1503/omnistack, MIT.

More from shankarr1503/omnistack

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 7, 2026 (22 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from shankarr1503

Cite this page

api-contract skill. Agent Mart. https://agentmart.dev/skills/shankarr1503-api-contract (last updated 2026-10-24)