loom-api-documentation

loom-api-documentation is a skill for Claude Code, Codex from cosmix/loom. It costs 28 tokens per session (3,657 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create API reference pages, OpenAPI specifications, interactive explorers, authentication and error guides, versioning notes, and SDK documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/loom-api-documentation
View source ↗ cosmix/loom
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.

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.

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 loom-api-documentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-api-documentation/github.svg)](https://agentmods.dev/skills/cosmix/loom/loom-api-documentation)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-api-documentation"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-api-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 loom-api-documentation

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-api-documentation"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-api-documentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,657 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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: 9 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 Privilege Escalation · line 260
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 83
    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 Data Exfiltration · line 237
    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 Data Exfiltration · line 84
    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 Data Exfiltration · line 237
    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 286
    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 289
    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 290
    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 287
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
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.00028 $0.03657
Opus 5.5 $0.00011 $0.01463
Sonnet 5.5 $0.00006 $0.00731
Haiku 4.5 $0.00003 $0.00366

Measured 2mo ago against content hash fa00fb5f1709, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo ago Changed · -17 tokens per session fa00fb5f1709
  2. 3mo 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 (66 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 3,657 once invoked, about $0.0001 per session on Opus 5.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

loom-api-documentation compared with skills from other repositories

loom-api-documentation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loom-api-documentationcosmix/loomSkill66todayMITA28Claude Code, Codex
API Discoverability for Agentsniels-emmer/myaceSkill1yesterdayMITA51Claude Code, Codex
durable-objectscloudflare/skillsSkill3.5k4d agoApache-2.0A22Claude Code
sandbox-nextcloudflare/skillsSkill3.5k4d agoApache-2.0A39Claude Code
cloudflarecloudflare/skillsSkill3.5k4d agoApache-2.0A103Claude Code
cloudflare-email-servicecloudflare/skillsSkill3.5k4d agoApache-2.0A21Claude Code
workers-best-practicescloudflare/skillsSkill3.5k4d agoApache-2.0A25Claude Code