loom-api-documentation

A guide to documenting REST APIs, which are web interfaces that programs use to exchange data. It uses OpenAPI/Swagger specifications to describe endpoints, inputs, outputs, authentication, errors, limits, and versions.

In plain words
What is it for?
Use it to create API reference pages, OpenAPI specifications, interactive explorers, authentication and error guides, versioning notes, and SDK documentation.
Why use it?
It keeps API documentation closer to the actual service and helps catch differences before clients depend on incorrect instructions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cosmix/loom/loom-api-documentation
Any agent
npx skills add cosmix/loom --skill loom-api-documentation
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00045 $0.03674
Opus 5 $0.00023 $0.01837
Sonnet 5 $0.00009 $0.00735
Haiku 4.5 $0.00005 $0.00367

Measured 3d ago against content hash 88960e64f901, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loom-api-documentation scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.example.com/v2/users \
skills/loom-api-documentation/SKILL.md · 334 lines

How it starts

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

API Documentation

Overview

Produce API docs developers can actually use: an accurate OpenAPI spec as the source of truth, plus reference/auth/error/versioning guides generated or kept in sync with it. Correctness and drift-prevention matter more than prose.

What every API must document

Auth · base URLs per environment · every endpoint + operation · request/response schemas · all response codes (incl. errors) · rate limits (with headers) · pagination · versioning/deprecation policy.

Spec-first vs code-first (choose deliberately)

Approach How Drift risk Use when
Spec-first Hand-write OpenAPI, generate server stubs + clients + mocks Runtime can diverge from spec unless validated New APIs, contract negotiated across teams, mock-driven frontend
Code-first Annotate handlers; framework emits spec (FastAPI, springdoc, drf-spectacular, tsoa) Spec stays close to code, but annotations can lie Existing codebase, small team, code is the truth

Either way, enforce the contract in CI (lint + validate examples + breaking-change diff). Docs that aren't tested against the running API are fiction.

OpenAPI 3.1 — what changed from 3.0 (get these right)

  • Fully aligned with JSON Schema 2020-12. A schema is now a valid JSON Schema; you can set jsonSchemaDialect and use $schema per-schema.
  • nullable: true is GONE. Use a type array: type: [string, "null"].
  • Type can be an array: type: [string, integer].
  • exclusiveMinimum/exclusiveMaximum are numbers, not booleans (draft-4 behavior removed).
  • Top-level webhooks describe events the API sends (see below).
  • Examples split by object: Schema Objects use JSON Schema's examples (an array); Media Type / Parameter Objects use example (singular) or examples (a map of named Example Objects with summary/value). Don't confuse the two.
  • info.license.identifier accepts an SPDX id (e.g., MIT) instead of a URL.
  • $ref may now sit alongside sibling keywords (e.g., description).

Read the full file on GitHub · 334 lines

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. 3d ago First seen · 334 lines · 45 tokens per session scan A 88960e64f901

Subscribe to this mod's changes

loom-api-documentation is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed 4d ago), licensed MIT. It adds 45 tokens to every session and 3,674 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Agent Design Principles

A checklist for designing agent personas, skills, and multi-agent pipelines that stay reliable as they grow — grounded in the 12-factor-agents principles.

niels-emmer/myace · 34 tokens

sandbox-next

Use when building or changing Cloudflare Sandbox apps on @cloudflare/sandbox@next (Sandbox SDK 1.0 preview)—code execution, AI runners, interpreters, CI-like jobs, terminals, files, mounts, tunnels, preview URLs, lifecycle, or errors. Not for the default stable package (use sandbox-stable) or for porting stable to…

cloudflare/skills · 86 tokens

80-livekit-agents-majiayu000-claude-skill-registr

Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter.

majiayu000/claude-skill-registry · 18 tokens

turnstile-spin

Set up Cloudflare Turnstile end-to-end in a project. Scan the codebase, create the widget via the Cloudflare API, embed it where user requests need bot verification (form submissions, SPA actions, API endpoints, download links, comment or vote submissions, etc.), wire canonical server-side siteverify in the customer's…

cloudflare/skills · 123 tokens

dag-factory

Authors Apache Airflow DAGs declaratively from dag-factory YAML configs. Use when building DAGs declaratively from YAML via dag-factory; creating/editing dag-factory templates/YAML configs,reating/editing dag-factory YAML configs, defaults, dynamic tasks, datasets, or callbacks; or validating dag-factory…

astronomer/agents · 80 tokens

deploying-airflow

Deploys Airflow DAGs and projects. Use when deploying Airflow or answering anything about deployment - deploying DAGs/projects, pushing code, setting up CI/CD, deploying to production or deployment strategies for Airflow.

astronomer/agents · 48 tokens