Agent skill

API Contract Design

by rsmdt in rsmdt/the-startup

REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns.

MITAuto-check passedBackend & APIs

Install API Contract Design

skills CLI
$ npx skills add rsmdt/the-startup --skill api-contract-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rsmdt/the-startup api-contract-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rsmdt/the-startup.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/team/skills/development/api-contract-design .claude/skills/api-contract-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-contract-design
GitHub stars
536
Token cost
~1.1k tokens
SKILL.md length
445 words
Files
7
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns.

  • Works in 5 steps: Analyze Requirements → Select API Style → Design Contract → …
  • Reviewing API contracts
  • SKILL.md covers Persona, Interface, Constraints and Reference Materials, plus 1 more section
  • Needs API_KEY

What it does

API Contract Design is an agent skill from rsmdt/the-startup. REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns. Use when designing APIs, reviewing API contracts, evaluating API technologies, or implementing API endpoints.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `reference/graphql-patterns.md`, `reference/openapi-patterns.md` and `reference/rest-patterns.md`).

It sits in Backend & APIs, covering API design, OpenAPI specifications and GraphQL. It works with OpenAPI and GraphQL. The repository describes itself as: The Agentic Startup - A collection of Claude Code commands, skills, and agents. The licence is MIT.

When your agent uses it

  • Reviewing API contracts
  • Evaluating API technologies
  • Implementing API endpoints

Example prompts

  • “/api-contract-design”

Requirements

  • A credential in API_KEY

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Analyze Requirements
  2. Select API Style
  3. Design Contract
  4. Validate Contract
  5. Recommend Next Steps

What it can do on your machine

Read from SKILL.md and the folder at commit 88d447c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Contract Design loads about 1.1k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 445 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rsmdt/the-startup at commit 88d447c, republished under its MIT licence (© rsmdt). 445 words, ~1,078 tokens.

Download SKILL.mdSave it as .claude/skills/api-contract-design/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
api-contract-design
description
REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns. Use when designing APIs, reviewing API contracts, evaluating API technologies, or implementing API endpoints.

Persona

Act as an API design specialist who creates developer-friendly, consistent, and evolvable API contracts. You apply contract-first design principles, ensuring APIs are defined before implementation to enable parallel development and clear communication.

Design Target: $ARGUMENTS

Interface

ApiStyle { type: REST | GRAPHQL | HYBRID versioning: URL_PATH | HEADER | QUERY_PARAM | DUAL auth: API_KEY | OAUTH2 | JWT | NONE }

DesignDecision { area: string // e.g., pagination, error format, naming choice: string // selected approach rationale: string // why this choice fits }

State { target = $ARGUMENTS apiStyle: ApiStyle decisions: DesignDecision[] contract: string }

Constraints

Always:

  • Define the API contract before any implementation begins.
  • Apply consistent naming conventions across all endpoints (plural nouns, kebab-case).
  • Standardize error response format across all endpoints.
  • Include rate limit headers and idempotency keys for non-idempotent operations.
  • Use HTTPS exclusively.
  • Version the API from day one.
  • Document all error codes with resolution steps.
  • Identify at least the primary consumer (web, mobile, server, third-party).
  • Map each use case to specific resource operations.

Never:

  • Expose internal implementation details (database IDs, stack traces) in responses.
  • Use GET for operations with side effects.
  • Mix REST and RPC styles in the same API.
  • Break existing consumers without versioning.
  • Authenticate via query parameters (except OAuth callbacks).
  • Create deeply nested URLs (more than 2 levels).
  • Return different structures for success vs error responses.

Reference Materials

Workflow

1. Analyze Requirements

Identify use cases and consumer needs from target context. Model resources and their relationships. Determine operation types (CRUD + custom actions). Assess non-functional requirements (latency, throughput, caching).

Show full SKILL.md (172 more words)Show less
2. Select API Style

match (requirements) { multiple consumers + different data needs => GRAPHQL or HYBRID simple CRUD + broad ecosystem => REST real-time + subscriptions => GRAPHQL public API + maximum compatibility => REST }

Select versioning strategy (default: DUAL — major in URL, minor in header). Select auth pattern based on consumer type.

3. Design Contract

match (apiStyle.type) { REST => Read reference/rest-patterns.md, design resources + endpoints GRAPHQL => Read reference/graphql-patterns.md, design schema + operations HYBRID => Read both reference files, design unified contract }

For each resource/type:

  1. Define request/response schemas.
  2. Specify error scenarios.
  3. Design pagination approach.
  4. Document query parameters / arguments.

Read reference/versioning-and-auth.md for auth and versioning details. Read reference/openapi-patterns.md when generating OpenAPI spec.

4. Validate Contract

Consistency checklist:

  • Naming conventions (plural nouns, kebab-case)
  • Response envelope structure
  • Error format across all endpoints
  • Pagination approach
  • Query parameter patterns
  • Date/time formatting (ISO 8601)

Evolution check:

  • Additive changes only (new fields, endpoints)
  • Deprecation with sunset periods
  • Version negotiation support
  • Backward compatibility
5. Recommend Next Steps

match (contract) { complete spec => Validate with consumers before implementing partial design => Identify remaining decisions review request => List specific improvements with rationale }

© rsmdt, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files in plugins/team/skills/development/api-contract-design of rsmdt/the-startup.

  • SKILL.md
  • reference/graphql-patterns.md
  • reference/openapi-patterns.md
  • reference/rest-patterns.md
  • reference/versioning-and-auth.md
  • templates/graphql-schema-template.md
  • templates/rest-api-template.md

Open the folder on GitHubat commit 88d447c

Compare with similar skills

API Contract Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Contract Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Contract Design this skillrsmdt/the-startup536—~1.1kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
API Designeraiskillstore/marketplace4301 repos~3.6kAutomated safety check: PassNone
API Architectcuriositech/some_claude_skills2431 repos~1.4kAutomated safety check: PassMIT
API Designaiskillstore/marketplace4301 repos~1.8kAutomated safety check: PassApache-2.0
API Designermajiayu000/claude-skill-registry6661 repos~3.5kAutomated safety check: PassMIT

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • API Designer

    aiskillstore/marketplace

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices.

    430 GitHub starsUsed in 1 repo~3.6k tokens
    Backend & APIsAuto-check passed
  • API Architect

    curiositech/some_claude_skills

    Expert API designer for REST, GraphQL, gRPC architectures. An agent skill from curiositech/some_claude_skills.

    243 GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check passed
  • API Design

    aiskillstore/marketplace

    Design RESTful and GraphQL APIs following best practices. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.8k tokens
    Backend & APIsAuto-check passed
  • API Designer

    majiayu000/claude-skill-registry

    REST/GraphQL API architect specializing in OpenAPI 3.1, HATEOAS, pagination, and versioning strategies

    666 GitHub starsUsed in 1 repo~3.5k tokens
    Backend & APIsAuto-check passed
  • API Design

    yonatangross/orchestkit

    API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.

    288 GitHub stars~2.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from rsmdt/the-startup

All 27 skills in this repo
  • Analyze

    rsmdt/the-startup

    Deep-dive codebase analysis that explains how things actually work — business rules, architecture patterns, auth flows, data models, integrations, and performance hotspots.

    536 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Implement

    rsmdt/the-startup

    Implementation entry point. An agent skill from rsmdt/the-startup.

    536 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Implement Factory

    rsmdt/the-startup

    Factory loop orchestrator for multi-feature or multi-component implementation manifests.

    536 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Agentic Patterns

    rsmdt/the-startup

    Context enrichment for agentic AI application development using LangChain, Vercel AI SDK, and assistant-ui.

    536 GitHub stars~501 tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Selection

    rsmdt/the-startup

    System architecture patterns including monolith, microservices, event-driven, and serverless, with C4 modeling, scalability strategies, and technology selection criteria.

    536 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Brainstorm

    rsmdt/the-startup

    You MUST use this before any creative work — creating features, building components, adding functionality, or modifying behavior.

    536 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about API Contract Design

What does API Contract Design do?

REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns. API Contract Design is an agent skill from rsmdt/the-startup. REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns.

When should I use API Contract Design?

API Contract Design fits situations like: reviewing API contracts; evaluating API technologies; implementing API endpoints.

How do I install API Contract Design in Claude Code?

Run `npx skills add rsmdt/the-startup --skill api-contract-design -a claude-code`. Or copy the skill folder (plugins/team/skills/development/api-contract-design in rsmdt/the-startup) into .claude/skills/api-contract-design in your project. Claude Code loads it when a task matches its description.

How do I install API Contract Design in Codex?

Run `npx skills add rsmdt/the-startup --skill api-contract-design -a codex`. Or copy the skill folder (plugins/team/skills/development/api-contract-design in rsmdt/the-startup) into .agents/skills/api-contract-design in your project. Codex loads it when a task matches its description.

Can I use API Contract Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rsmdt/the-startup --skill api-contract-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-contract-design, .gemini/skills/api-contract-design, .github/skills/api-contract-design and .opencode/skills/api-contract-design in your project.

What does API Contract Design need to run?

Going by SKILL.md and its folder, API Contract Design needs credentials named API_KEY. Our summary lists: A credential in API_KEY.

Does API Contract Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Contract Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Contract Design use?

API Contract Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Contract Design use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Contract Design?

Skills that share tags, products or a category with API Contract Design: API Designer (Jeffallan/claude-skills, 12k stars), API Designer (aiskillstore/marketplace, 430 stars), API Architect (curiositech/some_claude_skills, 243 stars) and API Design (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Contract Design?

rsmdt (a GitHub user) maintains it in rsmdt/the-startup, which has 536 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on August 3, 2026.

Source: rsmdt/the-startup on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.