onto-doc

onto-doc is a command for Claude Code from vakovalskii/ontoship. It costs 70 tokens per session (622 once invoked), scanned A, original, MIT.

A command that builds or rebuilds a repository's entire knowledge base: organised documentation covering services, technical references, operating procedures, decisions, and entry points.

In plain words
What is it for?
Use it to survey a repository, create documentation for its components and cross-cutting topics, and rebuild only selected areas when needed.
Why use it?
It turns scattered code and existing notes into a searchable documentation structure. It also checks coverage, links documents to source code, and validates the resulting index and map.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ontoship plugin — 3 skills, 5 commands shipped together

Good fit Use it to survey a repository, create documentation for its components and cross-cutting topics, and rebuild only selected areas when needed.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add vakovalskii/ontoship
Claude Code
/plugin install ontoship

Made for: Claude Code.

Or install ontoship, the plugin that ships this one along with the rest of its 3 skills, 5 commands.

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 onto-doc

README.md
[![agentmods](https://agentmods.dev/badge/commands/vakovalskii/ontoship/onto-doc.svg)](https://agentmods.dev/commands/vakovalskii/ontoship/onto-doc)
Your own site
<a href="https://agentmods.dev/commands/vakovalskii/ontoship/onto-doc"><img src="https://agentmods.dev/badge/commands/vakovalskii/ontoship/onto-doc.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 622 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.
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.00070 $0.00622
Opus 5 $0.00035 $0.00311
Sonnet 5 $0.00014 $0.00124
Haiku 4.5 $0.00007 $0.00062

Measured 8d ago against content hash adffb43a0b48, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

onto-doc 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 8d 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/onto-doc.md · 43 lines

What it actually says

Build (or rebuild) the whole OntoShip KB for this repository by fanning out curator agents.

Scope hint: $ARGUMENTS — empty = whole repo; or a subset (e.g. services/api services/billing, or "only reference docs").

Plan

  1. Survey the repo — map top-level dirs, services/modules, entry points, build/deploy files, and existing docs. Check current coverage: python3 ${CLAUDE_PLUGIN_ROOT}/skills/kb-search/gitmark.py stat.

  2. Decompose into doc areas — one unit of work per area:

    • each service/component → docs/services/<svc>/README.md (node_type: service)
    • cross-cutting specs (architecture, billing, limits, security) → docs/reference/ (reference)
    • operational procedures → docs/ops/ (runbook / gotcha)
    • architectural decisions → docs/decisions/ (decision)
  3. Dispatch curators (fan-out) — for each area spawn a subagent (Task) that follows the kb-curate skill on that slice only:

    • search first (don't duplicate); pick node_type + correct folder;
    • write frontmatter (node_type, title, service, status: active, updated);
    • add ≥1 typed link to the code it documents (documents:[src/…] / implemented_by);
    • add a line to the folder README.md index. Run independent areas in parallel; keep each agent scoped to its area to avoid collisions.
  4. Entry point + indexes — ensure CLAUDE.md / AGENTS.md exists as the entry point, docs/README.md is the master index, and every folder has a README index.

  5. Verify & derivepython3 ${CLAUDE_PLUGIN_ROOT}/skills/kb-search/gitmark.py lint (fix broken links / orphans / missing frontmatter), then ... gitmark.py index, then ... gitmark.py map -o docs-map.html.

  6. Report — how many docs created/updated, KB coverage before→after, lint result, and the map path. List any areas that need a human decision.

Principle: md+git is the source of truth; derived (index, graph) is regenerated. Never duplicate — edit existing docs. Keep curator agents scoped so they don't fight over files.

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. 8d ago First seen · 43 lines · 70 tokens per session scan A adffb43a0b48

Subscribe to this mod's changes

onto-doc is a command published in the GitHub repository vakovalskii/ontoship (77 stars, last pushed 12d ago), licensed MIT. It adds 70 tokens to every session and 622 once invoked, about $0.0003 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.