agentleFS
adymireadymire/CraftLayer/skills/api-engineering/SKILL.md

api-engineering

Skill0 starsChanged 3 days agoMITView on GitHub

Design stable, validated, secure APIs with explicit contracts, errors, pagination, and compatibility behavior.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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:

    Use when adding or changing HTTP, RPC, webhook, or internal service contracts.

    line 10
  2. Distinctive:

    Do not introduce a new API style or versioning scheme without compatibility or consumer requirements.

    line 15
  3. Distinctive:

    Add pagination and bounds for collection endpoints.

    line 30
  4. Distinctive:

    Add timeouts and rate limits appropriate to the existing platform.

    line 33
  5. Distinctive:

    Test malformed input, permission boundaries, conflicts, and failures.

    line 35
  6. Distinctive:

    Do not leak stack traces, secrets, or existence-sensitive data in errors.

    line 39
  7. Distinctive:

    No pagination or idempotency plan.

    line 53
  8. Distinctive:

    Check contract examples, schema validation, authorization, error mapping, pagination bounds, compatibility tests, and generated …

    line 57

≈ “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 Engineering

When to use

Use when adding or changing HTTP, RPC, webhook, or internal service contracts.

When not to use

Do not introduce a new API style or versioning scheme without compatibility or consumer requirements.

Inputs and assumptions

Identify callers, authentication, authorization, data ownership, expected volume, latency, compatibility guarantees, and existing schemas.

Workflow

  1. Define resources and operations around domain behavior.
  2. Specify request/response schemas, validation, status/error contract, and examples.
  3. Enforce authorization and tenant scope on the server for every operation.
  4. Add pagination and bounds for collection endpoints; avoid unbounded responses.
  5. Define idempotency, concurrency, and retry behavior for writes.
  6. Add timeouts and rate limits appropriate to the existing platform.
  7. Version or evolve contracts compatibly; deprecate with a migration path.
  8. Test malformed input, permission boundaries, conflicts, and failures.

Decision rules

  • Do not leak stack traces, secrets, or existence-sensitive data in errors.
  • Return stable machine-readable error codes where clients depend on them.
  • Validate inputs at runtime even when generated types exist.
  • Encode identifiers in URLs and enforce request-size limits.

Example

An update endpoint should distinguish invalid input from a stale revision, so clients can correct data or reload rather than showing a generic success.

Common failures

  • Breaking response shapes without versioning or tests.
  • Missing authorization on nested resources.
  • No pagination or idempotency plan.

Validation

Check contract examples, schema validation, authorization, error mapping, pagination bounds, compatibility tests, and generated documentation.

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.