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.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is -o ./generated/server \.

Good fit Use it to document endpoints, define request and response schemas, describe errors and authentication, and generate code from an API contract.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills
agentmods
npx agentmods add skills/j4flmao/agent-skills/openapi-documentation

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-openapi-documentation

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 91
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Data Exfiltration · line 111
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 273
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 276
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 279
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 285
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 292
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.5 $0.00041 $0.01754
Sonnet 5.5 $0.00021 $0.00877
Haiku 4.5 $0.00010 $0.00439

Measured 1mo ago against content hash 3f4286021a3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (34 stars, last pushed 11d ago), licensed MIT. It adds 103 tokens to every session and 4,385 once invoked, about $0.0004 per session on Opus 5.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