agentsclimarketplace

Api design

Skill youcisla/Agent-Foundry/skills/core/api-design

Design REST or GraphQL APIs: resource modeling, URL conventions, error contracts, versioning, pagination, idempotency keys, rate-limit headers. Use when creating a new API endpoint or reviewing API consistency.From its SKILL.md

Install
npx -y skills add youcisla/Agent-Foundry --skill api-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

1.8 KB, as published. Nobody here has run it

API Design

Design APIs that are predictable, versionable, and self-documenting.

REST Conventions

  • Resources are nouns, plural: /users, /cases, /reflections
  • Actions are sub-resources: /users/{id}/sessions
  • Verbs only when nothing else fits: /users/{id}/verify-email

HTTP Methods

MethodActionIdempotent
GETexamineYes
POSTCreateNo (without key)
PUTReplaceYes
PATCHPartial updateNo
DELETEDeleteYes

Status Codes

CodeWhen
200Successful read/update
201Successful create (include Location)
204Successful delete / no body
400Malformed request
401Missing/invalid auth
403Not permitted
404Resource missing or hidden
409State collision
422Valid syntax, semantic fail
429Rate-limited (Retry-After)
500Unexpected server error

Error Contract

Every error uses the same shape:

{
  "error": {
    "code": "user_not_found",
    "message": "No user with id 'abc123'",
    "param": "user_id",
    "doc_url": "https://api.example.com/docs/errors#user_not_found"
  }
}
  • code: stable, snake_case, machine-readable
  • message: human-readable, may include the failing value
  • param: which field caused the issue
  • doc_url: always present for documented codes

Anti-patterns

  • Skipping verification when the change 'feels small'
  • Reasoning by analogy without a real example

Keep looking

Skills are one crate of 608,666. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.