document

document is a command for coding agents from nitinjain999/platform-skills. It costs 31 tokens per session (852 once invoked), scanned A, original, Apache-2.0.

A tool for creating and checking technical documentation for code and APIs. It covers inline notes such as docstrings and JSDoc, OpenAPI descriptions, documentation websites, and developer guides.

In plain words
What is it for?
Use it to document functions and classes, generate REST API specifications, build documentation sites, and validate examples and documentation coverage.
Why use it?
It helps keep documentation complete, consistent, and checked against the code instead of leaving public functions or API routes unexplained.

Command

Part of the platform-skills plugin — 1 skill, 43 commands, 1 agent shipped together

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 commands/nitinjain999/platform-skills/document
Clone the repo
git clone --depth 1 https://github.com/nitinjain999/platform-skills

Or install platform-skills, the plugin that ships this one along with the rest of its 1 skill, 43 commands, 1 agent.

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 document

README.md
[![agentmods](https://agentmods.dev/badge/commands/nitinjain999/platform-skills/document.svg)](https://agentmods.dev/commands/nitinjain999/platform-skills/document)
Your own site
<a href="https://agentmods.dev/commands/nitinjain999/platform-skills/document"><img src="https://agentmods.dev/badge/commands/nitinjain999/platform-skills/document.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 852 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 $0.00031 $0.00852
Opus 5 $0.00015 $0.00426
Sonnet 5 $0.00006 $0.00170
Haiku 4.5 $0.00003 $0.00085

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

Security

Grade A, and why

document 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 4d 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.

commands/document.md · 87 lines

How it starts

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

Generate or improve technical documentation for a codebase or API.

Mode: docstrings

Add or improve inline documentation for functions, classes, and modules.

Steps:

  1. Ask for: language, preferred style (Google / NumPy / Sphinx for Python; JSDoc for TypeScript/JavaScript)
  2. Identify all public functions and classes missing documentation
  3. For each, document: purpose, all parameters with types, return value, exceptions raised, and at least one example
  4. Validate examples compile and run:
    • Python: python -m doctest file.py or pytest --doctest-modules
    • TypeScript: tsc --noEmit
  5. Generate coverage report: interrogate --fail-under=80 src/ (Python) or npx typedoc-coverage (TypeScript)

Rules:

  • Do NOT document obvious getters/setters verbosely
  • Do NOT repeat the function signature in prose
  • Do NOT document private/internal methods unless they have complex invariants

Reference: references/documentation.md → Python Docstrings, TypeScript JSDoc

Mode: openapi

Generate or improve an OpenAPI 3.1 specification for a REST API.

Steps:

  1. Ask for: framework (FastAPI / Django / NestJS / Express / raw spec), existing routes or codebase to analyse
  2. Map all endpoints: method, path, request body schema, response schemas per status code
  3. Extract shared schemas into components/schemas
  4. Extract shared responses (400, 401, 404, 500) into components/responses
  5. Add operationId for every operation
  6. Add security scheme and apply globally or per-operation
  7. Validate: npx @redocly/cli lint openapi.yaml
  8. Generate HTML preview: npx @redocly/cli build-docs openapi.yaml

For FastAPI: document with Pydantic model Field(description=...) and docstrings on route functions — auto-generates /docs. For NestJS: use @ApiProperty, @ApiOperation, @ApiResponse decorators.

Reference: references/documentation.md → OpenAPI 3.1, FastAPI, NestJS

Mode: site

Set up a documentation site for a project.

Steps:

  1. Ask for: project type (Python library / TypeScript SDK / REST API / platform runbook)
  2. Recommend appropriate generator:
    • Python projects → MkDocs + mkdocstrings + Material theme
    • TypeScript projects → TypeDoc + typedoc-material-theme
    • API portals → Redocly or Stoplight
    • General docs → Docusaurus
  3. Generate site configuration file
  4. Define nav structure: Getting Started, API Reference, Guides, Changelog
  5. Wire docstring auto-generation from source code
  6. Add search plugin
  7. Provide serve and build commands

Read the full file on GitHub · 87 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. 4d ago First seen · 87 lines · 31 tokens per session scan A 628add7220a0

Subscribe to this mod's changes

document is a command published in the GitHub repository nitinjain999/platform-skills (40 stars, last pushed 3d ago), licensed Apache-2.0. It adds 31 tokens to every session and 852 once invoked, about $0.0002 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-08-30.