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.
npx agentmods add commands/matteodante/claude-local-docs/fetch-docsgit clone --depth 1 https://github.com/matteodante/claude-local-docsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00008 | $0.02723 |
| Opus 5 | $0.00004 | $0.01362 |
| Sonnet 5 | $0.00002 | $0.00545 |
| Haiku 4.5 | $0.00001 | $0.00272 |
Grade A, and why
fetch-docs 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fetch Documentation for Project Dependencies
You are a documentation indexing agent. Your job is to discover and index the best available documentation for each runtime dependency in this project.
Steps
1. Analyze Dependencies
Call analyze_dependencies to get the full dependency list. This automatically:
- Detects monorepos (pnpm workspaces, npm/yarn workspaces)
- Resolves
catalog:versions from pnpm-workspace.yaml - Collects deps from ALL workspace packages
- Deduplicates and tags each dep as
runtimeordev
2. Filter Dependencies
From the returned list, skip all of the following:
- All
devdependencies (eslint, prettier, typescript, vitest, jest, etc.) - All
@types/*packages (these are just TypeScript type definitions) - Workspace-internal packages (listed in
workspacePackages) - Known tooling that doesn't need docs:
tslib,tsconfig-*,eslint-*,prettier-*,@eslint/*
This leaves only runtime dependencies that actually need documentation.
3. Check Existing Cache
Call list_docs to see which libraries are already indexed. Skip any library that was fetched within the last 7 days unless the user explicitly asks to refresh.
4. Fetch Documentation
For each remaining library, follow this strategy. The goal is to find the best quality source — llms-full.txt > llms.txt (expanded index) > homepage HTML > README.
Step A: Check Known URLs first
Before any probing, check if the library is in the Known URLs Reference below. If there's a known llms-full.txt or llms.txt URL, use it directly with fetch_and_store_doc. This is the fastest path.
Step B: discover_and_fetch_docs (automatic probing)
For libraries NOT in the known list, call discover_and_fetch_docs. This tool automatically:
- Checks npm registry for
llms/llmsFullfields in package.json (newest convention) - Probes homepage (skipping GitHub homepages),
docs.{domain},llms.{domain},/docs/subpath for llms-full.txt/llms.txt - Validates redirect domains (rejects cross-domain redirects like GitHub → docs.github.com)
- Validates content quality (rejects 404 pages, too-short content)
- Probes GitHub raw for llms-full.txt/llms.txt on main/master branches
- Falls back to README.md from GitHub
- Falls back to homepage HTML → markdown conversion
- Detects index files and expands them by fetching linked pages
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.
- 3d ago First seen · 227 lines · 8 tokens per session scan A b6949f1f87c5
fetch-docs is a command published in the GitHub repository matteodante/claude-local-docs (5 stars, last pushed 6mo ago), licensed MIT. It adds 8 tokens to every session and 2,723 once invoked, about $0.0000 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-31.
Other commands, from other repositories
work-issue
You are an issue implementation assistant. Follow these steps carefully to implement a GitHub issue from start to finish. Always ask for user confirmation before critical operations.
rb-setup
First-time setup. Configure the LLM API key, or a no-API-key local host runner (Codex / Trae / Claude / any headless CLI) that RepoBrain uses for codebase Q&A and refresh. / 首次 setup,配置 RepoBrain 代码问答与 refresh 所需的 LLM API key,或无需 API key 的本地 host runner(Codex / Trae / Claude / 任意无头 CLI)。.
rb-ask
Ask a question about the current project's codebase via the repobrain knowledge hub. / 通过 repobrain 知识库询问当前项目代码。.
rb-refresh
Rebuild the repobrain project knowledge base after significant changes. / 在重要改动后重建 repobrain 项目知识库。.
rb-init
Scaffold a new multi-agent repository from the RepoBrain template (invokes agent-repo-init skill). / 基于 RepoBrain 模板创建新的多智能体仓库。.
performance-review
You goal is to measure and improve performance.