agentleFS
RichardMcQuiston01RichardMcQuiston01/unofficial-claude-skill-examples/skills/api-conventions/SKILL.md

api-conventions

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

API Conventions for structure, comments, requests, and responses.

16 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 7

    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:

    Prefer specific HTTP Response Codes(e.g.

    line 10
  2. Distinctive:

    If Security is a concern, develop a table for Developers that have anonymized Error Codes(i.e.

    line 13
  3. Distinctive:

    If a language supports shared libraries, these DTO and/or Interfaces should be in a shared library that is easily accessible by projects …

    line 16
  4. Distinctive:

    Follow standard REST style URLs unless otherwise specified(i.e.

    line 17
  5. Distinctive:

    Prefer JSON encoding for Request bodies for POST, PUT, PATCH, etc.

    line 18
  6. Distinctive:

    Prefer JSON for Response bodies where supported

    line 19
  7. Distinctive:

    Use OpenAPI(aka Swagger) for documenting API endpoints and related resources(e.g.

    line 23

“Common” is measured: kept by at least 6 in 10 of the 12 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 Conventions

General

  • Prefer specific HTTP Response Codes(e.g. 400) over generic Codes wherever available(e.g 500)
    • See STATUS CODES for more examples.
  • Error Responses should include specific errors for troubleshooting purposes rather than generic messages.
    • If Security is a concern, develop a table for Developers that have anonymized Error Codes(i.e. 1001) along with how to locate and/or diagnose the issue. In such case, return the anonymized code(e.g. 1001) in the HTTP Response.
  • Requests and Responses should follow a standard format across the entire API.
  • Development and use of specific DTO or Interfaces(where available) for each Endpoint is preferred.
    • If a language supports shared libraries, these DTO and/or Interfaces should be in a shared library that is easily accessible by projects accessing the API(e.g. frontend, mobile app, etc.)
  • Follow standard REST style URLs unless otherwise specified(i.e. POST for INSERT, PUT for UPDATE, DELETE for delete, etc.)
  • Prefer JSON encoding for Request bodies for POST, PUT, PATCH, etc.
  • Prefer JSON for Response bodies where supported

TypeScript

  • Use OpenAPI(aka Swagger) for documenting API endpoints and related resources(e.g. DTO)

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.