docs-remove

A command for removing a user-defined source alias from sources.yaml, with an option to keep its cached Markdown files. A source alias is a short name used to refer to stored documentation.

In plain words
What is it for?
Use it as /docs-remove with a source name, optionally adding --keep-cache when the cached Markdown should remain.
Why use it?
It removes unwanted source entries and, by default, clears their cached documentation so stale files do not remain.

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-remove
Clone the repo
git clone --depth 1 https://github.com/raintree-technology/docpull
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 472 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.00472
Opus 5 $0.00008 $0.00236
Sonnet 5 $0.00003 $0.00094
Haiku 4.5 $0.00002 $0.00047

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

Security

Grade C, and why

docs-remove scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Don't run `rm -rf` via Bash; the MCP tool's `delete_cache=true` does the safe path-validated deletion.
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugin/commands/docs-remove.md · 45 lines

What it actually says

Remove a source

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

The user wants to remove a previously-added source. By default this also deletes cached Markdown to free disk and avoid stale answers.

User input: $ARGUMENTS

How to handle the input

Parse $ARGUMENTS as:

  • First token = source alias (the alias to remove).
  • Optional --keep-cache flag = remove the alias from the user registry but leave the cached .md files on disk.

If empty: reply Usage: /docs-remove <source> [--keep-cache]. Run /docs-list to see what's cached. and stop.

Workflow

  1. Default (no flag): remove alias AND delete cache. Call remove_source(name=<source>, delete_cache=true). The MCP tool refuses to remove builtins (react, nextjs, etc.) — pass that error through to the user with the suggestion in step 3.

  2. --keep-cache flag: remove alias only. Call remove_source(name=<source>, delete_cache=false). The cached Markdown stays; /docs-search <source> will keep working until the user runs this without the flag.

  3. If the tool returns "is a builtin source": Tell the user that builtins can't be removed but they can be shadowed with a custom URL via /docs-add (or by editing sources.yaml directly).

  4. If the tool returns the no-op response (no user source AND no cache to delete): tell the user there was nothing to remove. Don't error.

Output

One line: confirm what was removed (alias only, cache only, both, or nothing). The MCP tool's response is already specific — relay it.

Don't

  • Don't run rm -rf via Bash; the MCP tool's delete_cache=true does the safe path-validated deletion.
  • Don't call this on builtins thinking force will help — there's no force flag for removal by design.
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 · 45 lines · 16 tokens per session scan C 2f58c89b2c8f

Subscribe to this mod's changes

docs-remove is a command published in the GitHub repository raintree-technology/docpull (25 stars, last pushed 5d ago), licensed MIT. It adds 16 tokens to every session and 472 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.