agentleFS
salmandevsalmandev/everything-gemini/skills/api-craftsman/SKILL.md

api-craftsman

Skill2 starsChanged 28 days agoApache-2.0View on GitHub

Designs, specifies, and reviews production-grade REST APIs, OpenAPI 3.1 specifications, gRPC protobuf schemas, and GraphQL types. Use when creating or updating API contracts.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Nouns, Not Verbs: Use /api/v1/orders instead of /api/v1/getOrders.

    line 14
  2. Distinctive:

    Always return errors conforming to the Problem Details specification:

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Craftsman

This skill enforces industry-leading API design principles, contract-first development, and consistent versioning.

API Design Principles

1. Resource-Oriented REST

  • Nouns, Not Verbs: Use /api/v1/orders instead of /api/v1/getOrders.
  • HTTP Methods Semantics:
    • GET: Safe, idempotent retrieval.
    • POST: Non-idempotent creation or processing.
    • PUT: Complete idempotent replacement.
    • PATCH: Partial modification.
    • DELETE: Idempotent removal.
  • Consistent Response Envelopes:
    {
      "data": { ... },
      "error": null,
      "meta": { "page": 1, "pageSize": 20, "total": 100 }
    }

2. Contract-First OpenAPI 3.1

Define schemas in OpenAPI 3.1 YAML before writing backend route handlers. Validate schemas using Zod or Pydantic models on the server.

3. Error Standard (RFC 7807)

Always return errors conforming to the Problem Details specification:

{
  "type": "https://api.example.com/errors/invalid-argument",
  "title": "Invalid Argument",
  "status": 400,
  "detail": "Field 'email' must be a valid email address.",
  "instance": "/orders/123/items"
}

For OpenAPI 3.1 sample specifications, see examples/openapi-spec.yaml.

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.