web-add

A command for downloading a documentation or other web source into a local Markdown index so it can be searched later. It accepts built-in aliases, HTTPS URLs, or a custom name plus URL.

In plain words
What is it for?
Use `/web-add react`, `/web-add https://example.com`, or `/web-add example https://example.com` to add a source for later `/web-search` queries.
Why use it?
It gives your coding agent a local, searchable copy of the web content you want to use, instead of relying on an unconfigured source.

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/web-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 951 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.00951
Opus 5 $0.00020 $0.00476
Sonnet 5 $0.00008 $0.00190
Haiku 4.5 $0.00004 $0.00095

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

Security

Grade A, and why

web-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/web-add.md · 56 lines

How it starts

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

Add a web source to this session

The user wants to add a source to docpull's local Markdown index so it's searchable later via /web-search (or directly via the grep_docs MCP tool). This command is the web/source-facing name for the older /docs-add workflow.

User input: $ARGUMENTS

How to handle the input

Inspect $ARGUMENTS:

  1. Empty or missing. Reply with a one-line usage hint and stop: Usage: /web-add <alias>, /web-add <https-url>, or /web-add <name> <https-url>. Run /web-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 /web-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.com -> fastapi; https://nextjs.org/docs -> nextjs; https://example.com/blog -> example.
    • If the derived name already appears in list_sources(), tell the user and suggest the explicit /web-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. Do not pass force=true without explicit user consent.
    • Then call ensure_docs(source=<name>) to fetch.

Read the full file on GitHub · 56 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 · 56 lines · 41 tokens per session scan A 5d0c17dfeb3f

Subscribe to this mod's changes

web-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 951 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.