backend-openapi-documentation

backend-openapi-documentation is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 103 tokens per session (4,385 once invoked), scanned A, original, MIT.

A guide to documenting an API with OpenAPI, a standard format that describes its endpoints, inputs, outputs, and security rules. It uses the API description as the main contract for development.

In plain words
What is it for?
Use it to document endpoints, define request and response schemas, describe errors and authentication, and generate code from an API contract.
Why use it?
It helps developers and clients agree on how an API works before implementation. A shared specification can also support validation, versioning, and code generation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is -o ./generated/server \.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend-openapi-documentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/openapi-documentation.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/openapi-documentation)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/openapi-documentation"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/openapi-documentation.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,385 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.04385
Opus 5 $0.00051 $0.02193
Sonnet 5 $0.00021 $0.00877
Haiku 4.5 $0.00010 $0.00439

Measured 2d ago against content hash 3f4286021a3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

backend-openapi-documentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend/universal/openapi-documentation/SKILL.md · 592 lines

How it starts

The opening of the file, as written. The whole thing — 592 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Backend OpenAPI Documentation

Purpose

Drive all API development with an OpenAPI 3.x spec-first workflow: spec defines the contract, code is generated from it, and the spec is versioned alongside the code. The OpenAPI spec is the single source of truth for the API contract.

Agent Protocol

Trigger

Exact user phrases: "OpenAPI", "Swagger", "API documentation", "spec-first", "API spec", "openapi.yaml", "swagger.json", "codegen", "openapi-generator", "API contract first".

Input Context

  • Existing API endpoints or resource definitions.
  • Chosen OpenAPI version (3.0.x or 3.1.x).
  • Code generation target language.

Output Artifact

OpenAPI YAML/JSON spec snippet or full spec file. No file unless requested.

Response Format

Path: {path}
Method: {method}
OperationId: {operationId}
Tags: [{tag}]

Completion Criteria

  • Every endpoint has: path, method, operationId, summary, tags.
  • Every request/response has a schema.
  • All schemas use $ref and are not inline.
  • Error responses documented.
  • Security schemes defined.
  • Spec passes validation (spectral or swagger-cli).

Max Response Length

6 lines per endpoint. Unlimited for full spec.

Architecture Decision Tree

Spec-First vs Code-First

Who owns the API contract?
  ├── Spec-first (OpenAPI as source of truth)
  │   ├── PRO: Contract before implementation, generates client/server code
  │   ├── CON: Slower initial development, requires spec discipline
  │   └── Use when: Public API, multiple consumers, external integrations
  └── Code-first (annotations/comments generate spec)
      ├── PRO: Faster development, single source (code)
      ├── CON: Spec is afterthought, easy to forget docs
      └── Use when: Internal API, single consumer, rapid prototyping

OpenAPI Version Decision

Do you need JSON Schema full compatibility?
  ├── Yes → OpenAPI 3.1.x (fully compatible with JSON Schema 2020-12)
  │   ├── PRO: $ref anywhere, JSON Schema ecosystem
  │   └── CON: Less tooling support, newer standard
  └── No → OpenAPI 3.0.x (wider tool support)
      ├── PRO: Most tools support this (Swagger UI, codegen, Spectral)
      └── CON: Limited JSON Schema compatibility

Read the full file on GitHub · 592 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 592 lines · 103 tokens per session scan A 3f4286021a3a

Subscribe to this mod's changes

backend-openapi-documentation is a skill published in the GitHub repository j4flmao/agent-skills (20 stars, last pushed today), licensed MIT. It adds 103 tokens to every session and 4,385 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories