docs-add

A command that downloads a web page or documentation source and makes its Markdown text searchable during the current session.

In plain words
What is it for?
Use it to add built-in documentation sources, HTTPS pages, or named web sources before looking up specific information.
Why use it?
It keeps you from repeatedly opening and scanning the same documentation. You can add sources once, then search them later.

Command

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/raintree-technology/docpull/docs-add
Clone the repo
git clone --depth 1 https://github.com/raintree-technology/docpull
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 949 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.00041 $0.00949
Opus 5 $0.00020 $0.00475
Sonnet 5 $0.00008 $0.00190
Haiku 4.5 $0.00004 $0.00095

Measured yesterday against content hash a8a0e3bef6eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-add 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 yesterday.

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.

plugin/commands/docs-add.md · 58 lines

How it starts

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

Add a source to this session

Compatibility alias: prefer /web-add for new web-source workflows.

The user wants to add a source to docpull's local Markdown index so it's searchable later via /docs-search (or directly via the grep_docs MCP tool).

User input: $ARGUMENTS

How to handle the input

Inspect $ARGUMENTS:

  1. Empty or missing. Reply with a one-line usage hint and stop: Usage: /docs-add <alias>, /docs-add <https-url>, or /docs-add <name> <https-url>. Run /docs-list to see what's already cached.

  2. One token, no URL scheme (e.g. react, fastapi).

    • Treat as a built-in alias. Call ensure_docs(source="<alias>"). The default rag profile is right for most cases — only override if the user mentioned a specific profile.
    • If the alias is unknown, the tool will return an error listing available aliases. In that case call list_sources() and suggest the closest match by edit distance, or recommend running /docs-add <name> <url> with the source URL.
  3. One token, an HTTPS URL (starts with https://).

    • Call list_sources() first so you can detect both built-in aliases and user-defined aliases, including sources that have not been fetched yet.
    • Auto-derive an alias name from the hostname:
      1. Take the hostname.
      2. Strip a leading docs. or www. if present.
      3. Take the first dot-separated label.
      4. Lowercase it.
      5. Examples: https://docs.fastapi.tiangolo.comfastapi; https://nextjs.org/docsnextjs; https://example.com/apiexample.
    • If the derived name already appears in list_sources(), tell the user and suggest the explicit /docs-add <name> <url> form so they pick a unique name. Do not call add_source for a derived name that already exists.
    • Otherwise call add_source(name=<derived>, url=<url>) to register, then ensure_docs(source=<derived>) to fetch.
  4. Two tokens, second is an HTTPS URL (<name> <url>).

    • Validate the name is a sensible alias (alnum + _ . -, ≤128 chars). If not, ask for a cleaner name.
    • Call add_source(name=<name>, url=<url>). This intentionally updates an existing user-defined alias with the same name. If it returns "is a builtin source", tell the user that add_source refuses to shadow builtins by default (the agent shouldn't pass force=true here without explicit user consent).
    • Then call ensure_docs(source=<name>) to fetch.

Read the full file on GitHub · 58 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. yesterday First seen · 58 lines · 41 tokens per session scan A a8a0e3bef6eb

Subscribe to this mod's changes

docs-add is a command published in the GitHub repository raintree-technology/docpull (25 stars, last pushed 5d ago), licensed MIT. It adds 41 tokens to every session and 949 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.