agentleFS
LeostrukaLeostruka/devin-bundle/skills/api-spec/SKILL.md

api-spec

Skill0 starsChanged 3 months agoMITView on GitHub

Use when the user wants to design, review, or document an API (REST, OpenAPI, versioning, error models, contract testing, authentication), or when generating/maintaining OpenAPI specs as machine-readable context for AI agents.

4 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

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    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:

    No spec, or an outdated one.

    line 43

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

Design and review HTTP/gRPC/GraphQL APIs, and keep the contract explicit, versioned, and machine-readable (OpenAPI). The spec is the primary context for agents — they work from the spec, not from implementation memory.

Design protocol

  1. Collect constraints — consumers, auth, rate limits, error handling, versioning.
  2. Choose style — REST, gRPC, GraphQL, or hybrid per use case.
  3. Design endpoints — nouns as resources, consistent paths, status codes, error model.
  4. Specify input/output/behavior — every endpoint declares input schema, output schema, observable behavior. A spec lacking I/O is incomplete.
  5. Write the contract — OpenAPI spec (or proto), validated with tools.
  6. Add tests — contract, serialization, happy/unhappy paths.
  7. Document + sync — spec stays in version control, in sync with code.

What a spec must include

  1. Endpoints — paths, methods, parameters, request/response schemas.
  2. Authentication — type, headers, token format.
  3. Error responses — status codes, error schemas, retry semantics.
  4. Versioning — version, deprecation policy, migration path.
  5. Rate limits — rps, burst, backoff strategy.

Process

Design/review API → generate/update OpenAPI → validate against impl →
use spec as agent context → keep in VCS

Anti-patterns

  • No spec, or an outdated one.
  • Spec in prose instead of OpenAPI.
  • Spec not versioned / not in version control.
  • Agents reading implementation code instead of the spec.

Output rule

Deliver a spec file, examples, and a test command. Validate with swagger-codegen or equivalent when available.

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.