rag

rag is a skill for Claude Code, Codex from tpierrain/kenjaku. It costs 137 tokens per session (1,229 once invoked), scanned A, original, Apache-2.0.

A front door for checking a RAG search index. RAG, or retrieval-augmented generation, lets an assistant find relevant notes before answering; this skill reports whether that index and its live watcher are working.

In plain words
What is it for?
Use it to see indexed documents and chunks, note types, watcher activity, the embedding engine, schema versions, and to request re-indexing.
Why use it?
It gives the index status directly from the search server instead of making up counts or health information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to see indexed documents and chunks, note types, watcher activity, the embedding engine, schema versions, and to request re-indexing.

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

Made for: Claude Code, Codex.

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 rag

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tpierrain/kenjaku/rag"><img src="https://agentmods.dev/badge/skills/tpierrain/kenjaku/rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,229 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00137 $0.01229
Opus 5.5 $0.00055 $0.00492
Sonnet 5.5 $0.00027 $0.00246
Haiku 4.5 $0.00014 $0.00123

Measured 1mo ago against content hash 174a63434cce, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

engine-skills/rag/SKILL.md · 73 lines

How it starts

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

rag — the front door to your index

The engine already knows all of this. This skill exists for one reason: it wears the name people reach for. An owner of a RAG-backed brain types /rag before anything else, and until this skill existed the host answered "Unknown command: /rag. Did you mean /run?" — pointing at an unrelated built-in. Nothing was broken; the door had no sign on it.

Principle

Report the status, never compute it. Every number below comes from a tool the vault-rag server already exposes. This skill routes and translates — it does not derive, estimate, or infer. A figure that no tool returned does not get said (the repo's don't pretend rule, turned inward).

Procedure

1. "Where is my index at?" → vault_stats

Call the vault_stats tool of the vault-rag MCP server and relay what it returns. It already carries everything the question is about:

  • Documents / chunks indexed, and the breakdown by note type.
  • Watcher liveness — whether the live-update watcher is running, and what it last did.
  • Embedder identity — which engine vectorizes the notes (fully-local, Ollama, or an API), plus the daily quota when the provider has one (an API); a local embedder has none, and none is displayed.
  • Engine + index-schema versions, and whether the index was built against the running one.

Then say it in the owner's words, briefly. The useful translation, not a gloss of every line:

  • Documents = your notes. Chunks = the passages they were cut into; search works on those, so a rising chunk count on a stable document count simply means notes grew.
  • The watcher running = a note saved in Obsidian is searchable within seconds, with nothing to run by hand. If it is not running, the index has stopped following the notes, so a search can answer from what they said days ago. Say that plainly, then announce the catch-up and run it (step 3) — a 🟡 (ADR 0043): it spends compute and touches no note, so it is not something the owner has to authorise. Close on the veto, in their language: "Say stop if you'd rather I didn't — otherwise I'll go ahead." No question mark, no "shall I".
  • A stale index (embedder changed, or schema moved) = search is gated until a re-index; the engine says so itself and offers the re-index. Relay the offer, do not pre-empt it.

Read the full file on GitHub · 73 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. 1mo ago Changed · +4 lines 174a63434cce
  2. 1mo ago First seen · 69 lines · 137 tokens per session scan A 8dbf992b7bde

Subscribe to this mod's changes

rag is a skill published in the GitHub repository tpierrain/kenjaku (92 stars, last pushed 25d ago), licensed Apache-2.0. It adds 137 tokens to every session and 1,229 once invoked, about $0.0005 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-08-30.