yzma-duckdb-rag: Skill for Claude Code

.agents/skills/ydrag/SKILL.md

ydrag is a skill for Claude Code, Codex from innomon/yzma-duckdb-rag. It costs 0 tokens per session (646 once invoked), scanned A, original, MIT.

A local document-search system written in Go. It turns text into searchable numerical representations, stores them in DuckDB, can read PDFs, and exposes its operations to coding agents through MCP.

In plain words
What is it for?
Adding, listing, deleting, and searching documents; importing PDF text; and running the search service for an MCP-connected agent.
Why use it?
It lets an agent search stored documents by meaning instead of relying only on exact words, while keeping the data local.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is innomon/yzma-duckdb-rag's own configuration. It tells Claude Code and Codex how to work on yzma-duckdb-rag itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything yzma-duckdb-rag configures →

Reuse

Borrowing it

Nothing to install: this file belongs to innomon/yzma-duckdb-rag. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/innomon/yzma-duckdb-rag/master/.agents/skills/ydrag/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/innomon/yzma-duckdb-rag

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 ydrag

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/innomon/yzma-duckdb-rag/ydrag"><img src="https://agentmods.dev/badge/skills/innomon/yzma-duckdb-rag/ydrag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 646 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.00000 $0.00646
Opus 5 $0.00000 $0.00323
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00065

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

Security

Grade A, and why

ydrag 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 10d 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.

.agents/skills/ydrag/SKILL.md · 71 lines

How it starts

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

ydrag Skill

A Retrieval-Augmented Generation (RAG) system implemented in Go using YZMA (llama.cpp) for local embeddings and DuckDB as a vector database.

Capabilities

  • Local Embeddings: Generates vector embeddings for text using GGUF models via llama.cpp.
  • Vector Search: Performs similarity search using DuckDB's array_cosine_similarity.
  • Document Management: Add, list, and delete documents with persistent storage.
  • MCP Server: Exposes RAG operations as Model Context Protocol (MCP) tools.
  • PDF Support: Extract text from PDF files for ingestion.

Core Components

  • rag.go: Core RAG logic including embedding generation and DuckDB operations.
  • mcp_server.go: MCP server implementation and tool definitions.
  • main.go: CLI entry point and orchestration.

Usage Guide

CLI Commands

The ydrag binary supports several subcommands:

  • add <id> <content>: Add a document to the knowledge base.
  • query <text> [--top-k <n>]: Search for documents similar to the input text.
  • list: List all stored documents.
  • delete <id>: Remove a document by its ID.
  • serve: Start the MCP server.

MCP Tools

When running in serve mode, the following tools are available to AI assistants:

  • add_document(id, content): Ingests text into the RAG system.
  • query_documents(query, top_k): Searches for relevant context.
  • list_documents(): Shows all ingested documents.
  • delete_document(id): Removes context from the system.

Configuration

YDRAG can be configured via config.yaml, environment variables, or CLI flags.

For detailed instructions on downloading and setting up embedding models (like EmbeddingGemma), refer to MODEL.md.

Key Environment Variables

  • YDRAG_MODEL: Path to the GGUF embedding model.
  • YZMA_LIB: Path to the libllama shared library (required).
  • YDRAG_DB_PATH: Path to the DuckDB database file (default: rag.db).
  • YDRAG_TRANSPORT: MCP transport type (stdio, sse, or streamable-http).

Read the full file on GitHub · 71 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. 10d ago First seen · 71 lines · 0 tokens per session scan A d3f4a96ce720

Subscribe to this mod's changes

ydrag is a skill published in the GitHub repository innomon/yzma-duckdb-rag (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 646 tokens. 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.