agentleFS
sivaprasadreddysivaprasadreddy/sivalabs-agent-skills/skills/api-design/SKILL.md

api-design

Skill198 starsChanged 4 days agoMITView on GitHub

Design consistent, secure, evolvable APIs and contracts for web, mobile, partner, and service-to-service applications.

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use db-design, everything-claude-code and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yuexueyuSkill

    db-design

    数据库工程师技能 - Schema设计、索引优化、并发安全、数据库审计。当你涉及数据库表/字段/索引/SQL/迁移/MCP数据库操作、建表改表、写查询时必须使用此技能。即使用户只是说"加个字段"或"查下数据",也应触发。

    Also in 4 projects that use this

  • InfopibeSkill

    everything-claude-code

    Also in 9 projects that use this

  • mryeastcodeSkill

    everything-claude-code-conventions

    Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

    Also in 8 projects that use this

  • thejordanleopoldSkill

    third-party-integration

    Use when integrating with external APIs, payment processors (Stripe), webhooks, or third-party services. Use when implementing API clients with authentication and rate limiting, handling webhooks with signature verification and idempotency, writing contract tests for external services, or isolating third-party dependencies behind adapters. Triggers: \"Stripe\", \"payment integration\", \"webhook\", \"third-party API\", \"external service\", \"API client\", \"integrate with\", \"signature verification\", \"idempotency key\".

    Also in 3 projects that use this

  • Indium-AI-LabsSkill

    data-pipeline-design

    Design batch or incremental ETL and ELT pipelines and warehouse models: grain, partitioning, idempotent loads, late-arriving data, data quality tests, PII controls, and cost monitoring, before building them. Use when adding or changing a dbt model, warehouse table, scheduled transformation, or ingestion job. Not for transactional schema design (use the database-design skill) or event-sourced stores (use the event-sourcing-architecture skill).

    Also in 3 projects that use this

  • InfopibeSkill

    investor-materials

    Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

    Also in 21 projects that use this

  • +1 more from Infopibe

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 18 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 161 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create APIs that are predictable for consumers, aligned with business capabilities, and safe to evolve.

    line 9
  2. Distinctive:

    Use when creating or changing HTTP APIs, RPC interfaces, public contracts, internal service interfaces, or client-facing operations.

    line 12
  3. Distinctive:

    Use consistent resource and operation naming.

    line 16
  4. Distinctive:

    Keep request and response contracts explicit and minimal.

    line 18
  5. Distinctive:

    Use appropriate HTTP semantics when designing HTTP APIs.

    line 21
  6. Distinctive:

    Do not expose internal exception messages, storage schemas, or secrets.

    line 23
  7. Distinctive:

    Document authentication, authorization, rate limits, and operational expectations.

    line 24
  8. Distinctive:

    Use methods and status codes consistently with their semantics.

    line 27
  9. Distinctive:

    Use nouns for resource paths.

    line 28
  10. Distinctive:

    Use pagination for collections that may grow.

    line 31
  11. Distinctive:

    Use conditional requests or concurrency tokens where lost updates matter.

    line 33
  12. Distinctive:

    Use idempotency keys or equivalent safeguards for retryable operations that create consequential side effects.

    line 34
  13. Distinctive:

    Avoid leaking whether sensitive resources exist when that information itself is confidential.

    line 36
  14. Distinctive:

    Prefer adding optional fields or new operations over changing existing meanings.

    line 39
  15. Distinctive:

    Do not repurpose a field or silently change units, null semantics, or default behavior.

    line 40
  16. Distinctive:

    Test compatibility between supported client and server versions.

    line 44
  17. Distinctive:

    Document examples and test success, validation, authorization, and failure cases.

    line 54
  18. Distinctive:

    Do not prescribe REST, GraphQL, or RPC universally.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 161 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Design

Purpose

Create APIs that are predictable for consumers, aligned with business capabilities, and safe to evolve.

When to use

Use when creating or changing HTTP APIs, RPC interfaces, public contracts, internal service interfaces, or client-facing operations.

Principles

  • Design around business capabilities and consumer workflows, not direct database table exposure.
  • Use consistent resource and operation naming.
  • Choose interaction style and protocol based on use case, latency, streaming, tooling, and consumer constraints.
  • Keep request and response contracts explicit and minimal.
  • Distinguish identifiers from display labels and internal implementation details.
  • Define validation, error semantics, pagination, filtering, sorting, and idempotency consistently.
  • Use appropriate HTTP semantics when designing HTTP APIs.
  • Make compatibility and versioning strategy explicit; prefer additive evolution where practical.
  • Do not expose internal exception messages, storage schemas, or secrets.
  • Document authentication, authorization, rate limits, and operational expectations.

HTTP API guidance

  • Use methods and status codes consistently with their semantics.
  • Use nouns for resource paths; use action endpoints only when an operation is not naturally represented as resource state.
  • Validate path, query, header, and body inputs.
  • Define a consistent error representation with a stable machine-readable code and safe human-readable message.
  • Use pagination for collections that may grow; define limits and stable ordering.
  • Define filtering and sorting explicitly; do not expose arbitrary query languages without controls.
  • Use conditional requests or concurrency tokens where lost updates matter.
  • Use idempotency keys or equivalent safeguards for retryable operations that create consequential side effects.
  • Set request and response size limits.
  • Avoid leaking whether sensitive resources exist when that information itself is confidential.

Contract evolution

  • Prefer adding optional fields or new operations over changing existing meanings.
  • Do not repurpose a field or silently change units, null semantics, or default behavior.
  • Define how unknown fields and enum values are handled by consumers.
  • Measure usage before removing deprecated behavior.
  • Publish deprecation timelines and migration guidance for external consumers.
  • Test compatibility between supported client and server versions.

Workflow

  1. Identify consumers and their use cases.
  2. Define operations, resource identity, and business semantics.
  3. Specify request/response schemas, validation, and error behavior.
  4. Define authorization and data exposure rules.
  5. Decide pagination, filtering, sorting, and concurrency behavior.
  6. Define idempotency and retry expectations.
  7. Review compatibility and versioning impact.
  8. Document examples and test success, validation, authorization, and failure cases.

Review checklist

  • Is the API intuitive and consistent?
  • Does it expose only necessary data?
  • Are errors stable and actionable?
  • Are collections bounded?
  • Are retry and concurrency semantics clear?
  • Can existing clients continue to work?
  • Are security and rate limits addressed?

Do not prescribe REST, GraphQL, or RPC universally. Choose based on actual consumers and interaction needs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.