docs-rag

docs-rag is a skill for Claude Code from andreaselmi/docs-rag-mcp. It costs 95 tokens per session (1,409 once invoked), scanned A, original, MIT.

A local search tool for finding relevant information in markdown documents such as specs, architecture decisions, and decision logs. It uses meaning-based search and marks outdated documents so the agent can prefer current information.

In plain words
What is it for?
Use it to search a substantial collection of project notes when exact code searches are not enough, then re-index the notes after editing them.
Why use it?
It reduces the risk of relying on an old decision or guessing from a weak search match. The documents and embeddings stay on the local machine.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PROJECT_DIR} variable. Also seen: mentions Claude Code.

Good fit Use it to search a substantial collection of project notes when exact code searches are not enough, then re-index the notes after editing them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andreaselmi/docs-rag-mcp/docs-rag
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.

Any agent
npx skills add andreaselmi/docs-rag-mcp --skill docs-rag
Clone the repo
git clone --depth 1 https://github.com/andreaselmi/docs-rag-mcp

Made for: Claude Code.

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 docs-rag

README.md
[![agentmods](https://agentmods.dev/badge/skills/andreaselmi/docs-rag-mcp/docs-rag/github.svg)](https://agentmods.dev/skills/andreaselmi/docs-rag-mcp/docs-rag)
Your own site
<a href="https://agentmods.dev/skills/andreaselmi/docs-rag-mcp/docs-rag"><img src="https://agentmods.dev/badge/skills/andreaselmi/docs-rag-mcp/docs-rag/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docs-rag

Your own site · 80×15
<a href="https://agentmods.dev/skills/andreaselmi/docs-rag-mcp/docs-rag"><img src="https://agentmods.dev/badge/skills/andreaselmi/docs-rag-mcp/docs-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,409 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.00095 $0.01409
Opus 5.5 $0.00038 $0.00564
Sonnet 5.5 $0.00019 $0.00282
Haiku 4.5 $0.00010 $0.00141

Measured yesterday against content hash 42c08cc8ef02, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docs-rag 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.

skills/docs-rag/SKILL.md · 79 lines

How it starts

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

docs-rag

Overview

docs-rag-mcp is a local MCP server (Ollama embeddings, SQLite, nothing leaves the machine) exposing one tool, search_notes, over a folder of markdown. Its point is not better recall but truth freshness: superseded docs are hidden, weak matches are refused instead of guessed, and every hit says why it was returned.

Your job with it: use what it returns as the current truth only when it says so, keep the lifecycle frontmatter honest when decisions change, and re-index after editing.

When NOT to use

  • Exact symbols, function names, error codes in code: grep is faster.
  • A handful of docs: just read them.

Setup

Not installed or not connected? Follow references/setup.md exactly. Do not guess env vars or config keys: the server reads a config.json produced by docs-rag init or docs-rag scaffold, nothing else. The default embedding model is bge-m3, and the thresholds are tuned for it.

Reading results

Label Meaning How to weigh it
[semantic 0.712] matched by meaning, cosine score Already passed minScore and the relative cutoff, so it's relevant. Still read the section before quoting it.
[both 0.712] matched by meaning and rare exact terms Strongest signal.
[exact match] matched only on a rare literal term (error code, acronym) No score on purpose. Reliable for that identifier, otherwise weak.
[draft] status: draft doc Not settled. Say so when you use it.
[2026-01-14] doc date Judge freshness.
[superseded → path] / [archived] historical doc (only shown with searchAll) Never use as the current answer. Open the successor path.

No relevant results (best score X, threshold Y) means nothing in the docs answers this. That is an answer, not a malfunction. Do not lower thresholds or invent an answer. Instead:

  1. Retry once with the words the docs would use (synonyms, the feature's name).
  2. Check the code or ask the user.
  3. Use searchAll: true in two cases only:
    • Historical question ("what did we decide before?", "why did we change X?"). The hits are the answer, labelled as history.
    • Current question, and the message says default-excluded content had candidates. Retry with searchAll: true only to find the pointer. From a [superseded → path] hit, take the path, open that successor doc and answer from it. If the successor is itself superseded, follow the chain. Never answer from the superseded body. If the hits are only [archived] with no successor, say the docs hold only historical material on this.

Read the full file on GitHub · 79 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 79 lines · 95 tokens per session scan A 42c08cc8ef02

Subscribe to this mod's changes

docs-rag is a skill published in the GitHub repository andreaselmi/docs-rag-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 95 tokens to every session and 1,409 once invoked, about $0.0004 per session on Opus 5.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-10-20.

Related

Other skills, from other repositories

siyuan-plugin-development

Official frontend plugin development workflow. After the user explicitly opts in, clarify missing requirements, confirm a short plan, implement in a managed copy, verify, and package. Installation and activation require separate authorization.

siyuan-note/siyuan · 46 tokens

my-wiki

A skill for managing a local Markdown knowledge vault that stores captured webpages, PDFs, Office files, notes, images, folders, and ZIP files. It links preserved source material, called References, to durable topic pages, called Concepts.

NimaChu/my-wiki · 51 tokens

obsidian-vault-workflow

Use this skill when a user asks an agent to inspect, organize, summarize, or update an Obsidian vault through this MCP server.

aka-kika/kika-obsidian-mcp · 0 tokens

release-note-captain

Use this skill when a project is finished, shipped, deployed, published, or released and the user wants a release note created or updated in Obsidian. It covers collecting release facts, choosing the note path, writing a concise release summary, updating existing notes safely, and preserving follow-up actions.

aka-kika/kika-obsidian-mcp · 66 tokens

vault-summarize

Use when the user asks to summarize, digest, or get an overview of a folder, project, or set of notes in their markdown vault — runs the vault's batched map-reduce recipe so note bodies stay out of the retained conversation context.

pvliesdonk/markdown-vault-mcp · 55 tokens

vault-workflow

Use when the user asks you to search, read, or reason about notes in their markdown vault — guides when to use which vault tool and how to chain them for good results.

pvliesdonk/markdown-vault-mcp · 40 tokens