agentleFS
codebygarvcodebygarv/Ai-skills/skills/development/api-designer/SKILL.md

api-designer

Skill26 starsChanged 4 months agoMITView on GitHub

Helps design REST APIs - routes, request/response structures, validation, status codes, and conventions. Use when designing new endpoints or reviewing an existing API's design for consistency.

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use postgres-pro, mcp-developer 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.
  • JeffallanSkill

    postgres-pro

    Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring.

    Also in 5 projects that use this

  • JeffallanSkill

    mcp-developer

    Use when building, debugging, or extending MCP servers or clients that connect AI systems with external tools and data sources. Invoke to implement tool handlers, configure resource providers, set up stdio/HTTP/SSE transport layers, validate schemas with Zod or Pydantic, debug protocol compliance issues, or scaffold complete MCP server/client projects using TypeScript or Python SDKs.

    Also in 4 projects that use this

  • +10 more from Jeffallan

The file

Files
SKILL.md

Purpose

Design or review REST API surfaces — routes, resource modeling, request/response shapes, status codes, versioning, and error formats — so the API is consistent, predictable, and follows established conventions rather than ad hoc choices per endpoint.

When to Use

  • Designing new endpoints or a new API from scratch.
  • Reviewing an existing API for consistency before it gets more consumers.
  • The user has a rough idea of what an endpoint should do and needs it shaped into a proper REST contract.

What to Analyze / Do

  1. Resource modeling — identify the actual resources and their relationships; prefer nouns-as-resources over RPC-style action endpoints where REST conventions fit naturally.
  2. Route design — consistent pluralization, nesting depth (avoid over-nesting past 2 levels), and clear path parameters.
  3. HTTP methods & status codes — correct verb per operation (GET/POST/PUT/PATCH/DELETE), and status codes that mean what they say (200 vs 201 vs 204, 400 vs 422, 404 vs 403).
  4. Request/response shape — consistent envelope (or deliberately no envelope) across endpoints, consistent field naming (camelCase vs snake_case — pick one and stay consistent with the rest of the API).
  5. Validation & errors — what's validated, what error shape is returned, whether error responses are consistent and machine-parseable.
  6. Pagination, filtering, sorting — for any list endpoint, define these explicitly rather than leaving them unbounded.
  7. Versioning & backward compatibility — how breaking changes are handled without breaking existing consumers.

Output Format

  • For new design: proposed routes as a table (Method, Path, Description), then example request/response JSON per endpoint, then validation/error notes.
  • For review: findings grouped by inconsistency type (naming, status codes, pagination, etc.), each with the specific endpoints affected and the recommended fix.

Avoid

  • Proposing a fully RPC-style API when the resources genuinely fit REST conventions (or vice versa — forcing REST onto an inherently action-based operation).
  • Inventing a new convention when the existing API already has an established one — match it unless explicitly asked to redesign.
  • Ignoring auth/permissions implications of a new route (who can call it) even if full auth design is out of scope.

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.