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 skills add zongzi-zongzhi/local-Rag --skill local-raggit clone --depth 1 https://github.com/zongzi-zongzhi/local-RagWrote 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.
[](https://agentmods.dev/skills/zongzi-zongzhi/local-rag/local-rag)<a href="https://agentmods.dev/skills/zongzi-zongzhi/local-rag/local-rag"><img src="https://agentmods.dev/badge/skills/zongzi-zongzhi/local-rag/local-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.
<a href="https://agentmods.dev/skills/zongzi-zongzhi/local-rag/local-rag"><img src="https://agentmods.dev/badge/skills/zongzi-zongzhi/local-rag/local-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00082 | $0.03399 |
| Opus 5 | $0.00041 | $0.01699 |
| Sonnet 5 | $0.00016 | $0.00680 |
| Haiku 4.5 | $0.00008 | $0.00340 |
Grade A, and why
local-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 12d 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 — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.
local-Rag Skills
Tools
| MCP Tool | CLI Equivalent | Use When |
|---|---|---|
ingest_file |
npx local-rag ingest <path> [--visual] |
Local files (PDF, DOCX, TXT, MD). CLI for bulk/directory. PDF visual mode: see Visual content (PDFs). |
ingest_data |
鈥? | Raw content (HTML, text) with source URL |
query_documents |
npx local-rag query <text> |
Semantic + keyword hybrid search |
delete_file |
npx local-rag delete <path> |
Remove ingested content |
list_files |
npx local-rag list |
File ingestion status |
status |
npx local-rag status |
Database stats |
read_chunk_neighbors |
npx local-rag read-neighbors |
Read N chunks adjacent to a known chunkIndex (context expansion; call after query_documents or grep) |
Workflow
- For search requests, formulate a focused hybrid query, choose
limitby intent, then filter results by score AND topical relevance. - When a retrieved hit lacks enough surrounding context for a grounded answer, expand only that chunk via
read_chunk_neighbors. - For ingestion, choose
ingest_filefor local files andingest_datafor raw/web content. - For PDFs, ask once about ingest mode unless the current request already specifies one (text-only, visual fast, or visual quality). See decision protocol in Ingestion.
Search: Core Rules
Hybrid search combines vector (semantic) and keyword (BM25).
Score Interpretation
Lower = better match. Use this to filter noise.
| Score | Action |
|---|---|
| < 0.3 | Use directly |
| 0.3-0.5 | Include if mentions same concept/entity |
| 0.5-0.7 | Include only if directly relevant to the question |
| > 0.7 | Skip unless no better results |
Limit Selection
| Intent | Limit |
|---|---|
| Specific answer (function, error) | 5 |
| General understanding | 10 |
| Comprehensive survey | 20 |
Query Formulation
| Situation | Why Transform | Action |
|---|---|---|
| Specific term mentioned | Keyword search needs exact match | KEEP term |
| Vague query | Vector search needs semantic signal | ADD context |
| Error stack or code block | Long text dilutes relevance | EXTRACT core keywords |
| Multiple distinct topics | Single query conflates results | SPLIT queries |
| Few/poor results | Term mismatch | EXPAND (see below) |
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.
- 12d ago First seen · 254 lines · 0 tokens per session scan A e0822394adb4
local-rag is a skill published in the GitHub repository zongzi-zongzhi/local-Rag (0 stars, last pushed 3mo ago), licensed MIT. It adds 82 tokens to every session and 3,399 once invoked, about $0.0004 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 skills, from other repositories
markitdown
Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
llamaindex
Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…
azure-ai
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
kb-retriever
A retrieval and question-answering assistant for a local folder of documents, including Markdown, text, PDFs, and spreadsheets.
bailian-kb
A command-line manager for Alibaba Cloud Bailian knowledge bases, which are collections of documents prepared for search and question answering. It handles the stored documents, search services, text chunks, and data-centre files rather than everyday searches.
azure-ai-contentunderstanding-py
Multimodal AI service that extracts semantic content from documents, video, audio, and image files for RAG and automated workflows.