api-documentation

api-documentation is a skill for Claude Code from bobmatnyc/claude-mpm-skills. It costs 20 tokens per session (2,311 once invoked), scanned A, original, MIT.

Guidance for documenting APIs and code interfaces, including their purpose, expected behavior, examples, and errors.

In plain words
What is it for?
It helps write function documentation, API contracts, usage examples, and explanations of design decisions.
Why use it?
It keeps documentation useful and closer to the code, so people can understand how to use an interface without reading its implementation.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit It helps write function documentation, API contracts, usage examples, and explanations of design decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bobmatnyc/claude-mpm-skills/api-documentation
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 bobmatnyc/claude-mpm-skills --skill api-documentation
Clone the repo
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm-skills

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/api-documentation"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/api-documentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,311 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 pass 7 Sept 2026
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.00020 $0.02311
Opus 5 $0.00010 $0.01156
Sonnet 5 $0.00004 $0.00462
Haiku 4.5 $0.00002 $0.00231

Measured 9d ago against content hash 7a7306a54f01, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

api-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 9d 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.

universal/web/api-documentation/SKILL.md · 399 lines

How it starts

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

API Documentation

Best practices for documenting APIs and code interfaces. Eliminates ~100-150 lines of redundant documentation guidance per agent.

Core Documentation Principles

  1. Document the why, not just the what - Explain intent and rationale
  2. Keep docs close to code - Inline documentation stays synchronized
  3. Document contracts, not implementation - Focus on behavior
  4. Examples are essential - Show real usage
  5. Update docs with code - Outdated docs are worse than no docs

Function/Method Documentation

Python (Docstrings)

def calculate_discount(price: float, discount_percent: float) -> float:
    """
    Calculate discounted price with percentage off.

    Args:
        price: Original price in dollars (must be positive)
        discount_percent: Discount percentage (0-100)

    Returns:
        Final price after discount, rounded to 2 decimals

    Raises:
        ValueError: If price is negative or discount > 100

    Examples:
        >>> calculate_discount(100.0, 20.0)
        80.0
        >>> calculate_discount(50.0, 50.0)
        25.0

    Note:
        Discount percent is capped at 100% (minimum price of 0)
    """
    if price < 0:
        raise ValueError("Price cannot be negative")
    if discount_percent > 100:
        raise ValueError("Discount cannot exceed 100%")

    discount_amount = price * (discount_percent / 100)
    return round(price - discount_amount, 2)

JavaScript (JSDoc)

/**
 * Calculate discounted price with percentage off
 *
 * @param {number} price - Original price in dollars (must be positive)
 * @param {number} discountPercent - Discount percentage (0-100)
 * @returns {number} Final price after discount, rounded to 2 decimals
 * @throws {Error} If price is negative or discount > 100
 *
 * @example
 * calculateDiscount(100.0, 20.0)
 * // returns 80.0
 *
 * @example
 * calculateDiscount(50.0, 50.0)
 * // returns 25.0
 */
function calculateDiscount(price, discountPercent) {
  if (price < 0) {
    throw new Error('Price cannot be negative');
  }
  if (discountPercent > 100) {
    throw new Error('Discount cannot exceed 100%');
  }

  const discountAmount = price * (discountPercent / 100);
  return Math.round((price - discountAmount) * 100) / 100;
}

Read the full file on GitHub · 399 lines

Files

What ships with it

1 file 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. 9d ago First seen · 399 lines · 20 tokens per session scan A 7a7306a54f01

Subscribe to this mod's changes

api-documentation is a skill published in the GitHub repository bobmatnyc/claude-mpm-skills (75 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 2,311 once invoked, about $0.0001 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

openapi-expert

Expert-level OpenAPI/Swagger specification for API design, documentation, and code generation. Use when the user mentions swagger, API specs, REST, API design, or documentation, or when the task involves OpenAPI Specification, Webhooks, or Polymorphism.

personamanagmentlayer/pcl · 57 tokens

api-documenter-v2

This public intake copy packages plugins/antigravity-awesome-skills/skills/api-documenter from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.

diegosouzapw/awesome-omni-skills · 74 tokens

api-documentation-v2

API Documentation Workflow workflow skill. Use this skill when the user needs API documentation workflow for generating OpenAPI specs, creating developer guides, and maintaining comprehensive API documentation and the operator should preserve the upstream workflow, copied support files, and provenance before merging…

diegosouzapw/awesome-omni-skills · 58 tokens

documentator-api-docs

Build, change, diagnose, or verify Laravel API endpoints documented by tsitsishvili/documentator. Use for routes, controllers, closures, FormRequests, inline validation, API Resources, Eloquent models, Spatie Data, Laravel Actions, HTTP QUERY operations, callbacks, webhooks, streaming responses, recorded examples…

tsitsishvili/documentator · 107 tokens

api-documentation-generator-v2

API Documentation Generator workflow skill. Use this skill when the user needs Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices and the operator should preserve the upstream workflow, copied support files, and provenance before…

diegosouzapw/awesome-omni-skills · 61 tokens

API Documentation Generator

Generates OpenAPI-compatible documentation for REST API endpoints from code or route definitions.

Notysoty/openagentskills · 20 tokens