haiku-rag

haiku-rag is a skill for Claude Code from ggozad/haiku.rag. It costs 76 tokens per session (917 once invoked), scanned A, original, MIT.

A connection to a personal document knowledge base that agents can search, read, and analyse. It includes instructions for finding relevant passages, reading full documents or sections, and running calculations on the stored material.

In plain words
What is it for?
It is for searching personal documents, checking facts, citing stored information, answering questions about images, and computing over document data.
Why use it?
It helps answer questions from the user's own documents instead of relying only on memory, and makes it clear when those documents contain nothing relevant.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the haiku-rag plugin — 1 skill, 1 MCP server shipped together

Good fit It is for searching personal documents, checking facts, citing stored information, answering questions about images, and computing over document data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ggozad/haiku.rag/haiku-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 ggozad/haiku.rag --skill haiku-rag
Clone the repo
git clone --depth 1 https://github.com/ggozad/haiku.rag

Made for: Claude Code.

Or install haiku-rag, the plugin that ships this one along with the rest of its 1 skill, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ggozad/haiku.rag/haiku-rag/github.svg)](https://agentmods.dev/skills/ggozad/haiku.rag/haiku-rag)
Your own site
<a href="https://agentmods.dev/skills/ggozad/haiku.rag/haiku-rag"><img src="https://agentmods.dev/badge/skills/ggozad/haiku.rag/haiku-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 haiku-rag

Your own site · 80×15
<a href="https://agentmods.dev/skills/ggozad/haiku.rag/haiku-rag"><img src="https://agentmods.dev/badge/skills/ggozad/haiku.rag/haiku-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 917 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.00076 $0.00917
Opus 5 $0.00038 $0.00458
Sonnet 5 $0.00015 $0.00183
Haiku 4.5 $0.00008 $0.00092

Measured 2d ago against content hash 8eb18b207f7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

haiku-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 2d 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.

plugins/haiku-rag/skills/haiku-rag/SKILL.md · 78 lines

How it starts

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

Working with the knowledge base

Check the knowledge base before answering from memory whenever the question could be about the user's documents. Say so when it has nothing relevant.

Find

search_documents is the first call. Results come best first with the document title, section headings, the matched chunk's metadata when it has any, and the passage in its section. Pictures in the results arrive as images: answer figure questions from them. filter restricts which documents are searched, limit how many results come back. If it misses, rephrase once or narrow with a filter before concluding the material is not there. When the question is about an image rather than words and the server offers search_documents_by_image, it takes the image as the query.

Read

Every search result shows its Document ID (and Collection when there are several); pass them to the read tools. get_document returns a document's whole text in reading order. For a long one, get_document_outline gives the heading tree with page numbers and get_document_section the text of one section, subsections included.

Compute

execute_code runs a Python program on the server over the same documents. Under /documents/{id}/ each has metadata.json, content.txt, items.jsonl, chunks.jsonl and toc.json, and the program can await search(query) and await list_documents(). Write code when the answer is a count, an aggregate, a comparison across many documents, a lookup by document or chunk metadata, or a pattern over whole documents: whatever search cannot rank. Each call is one program and variables do not carry over, so gather, compute and print a compact result in the same program. filter and sources select the documents it sees. For a known document's structure read its toc.json first; search() ranks across every document. Map a title or URI to an id with one list_documents() call rather than reading every metadata.json; the files carry no source, so over several collections group by its rows. Answer and cite from what it printed.

Read the full file on GitHub · 78 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. 2d ago First seen · 78 lines · 76 tokens per session scan A 8eb18b207f7d

Subscribe to this mod's changes

haiku-rag is a skill published in the GitHub repository ggozad/haiku.rag (606 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 917 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-09-08.

Related

Other skills, from other repositories

hybrid-rag

Use when creating, updating, or querying a local Hybrid RAG database from PRISMA JSON metadata or PDF documents in a folder. Triggered by prisma-review (after Fase 4) or educational-pilot-design (to query evidence). Hybrid RAG combines dense vector search (sentence-transformers) and sparse retrieval — native FTS via…

giovannifrontera/academic-research-prisma-wiki-rag · 96 tokens

graph-retrieval

Exposes graph-based retrieval as a tool capability via querygraph. Reads normalized graph store files, builds a query-relevant subgraph, and returns LLM-friendly semantic triples with replayable evidence metadata.

study8677/repobrain · 46 tokens

knowledge-layer

High-level deployment wrapper over RepoBrain core with graph-first knowledge injection and all-file support. Exposes refreshfilesystem and askfilesystem for building and querying the knowledge graph.

study8677/repobrain · 42 tokens

opik-evaluate

Build an LLM evaluation and run it against your app, returning an experiment with scores. Covers datasets, LLM judges, RAG evaluation, synthetic data, error analysis, and validating evaluators against human labels. Use when the user wants to measure or improve AI product quality, or asks about evals, judges, or…

comet-ml/opik-mcp · 73 tokens

basemind-documents

Semantic + full-text search over documents and the web via basemind's RAG store — PDFs, Office, HTML, email, images (OCR), plus scraped/crawled web pages, with cross-encoder reranking, keyword and named-entity (NER) filters, and per-document summaries. Reach for it whenever the user asks to "search the docs / PDFs"…

Goldziher/basemind · 107 tokens

local-rag-search

Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking. Use this skill when you need to search the web for current information, research topics across multiple sources, or gather context from the internet without using external APIs. This skill teaches effective use of…

nkapila6/mcp-local-rag · 80 tokens