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.
curl -O https://raw.githubusercontent.com/innomon/yzma-duckdb-rag/master/.agents/skills/ydrag/SKILL.mdgit clone --depth 1 https://github.com/innomon/yzma-duckdb-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/innomon/yzma-duckdb-rag/ydrag)<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.
<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>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.00000 | $0.00646 |
| Opus 5 | $0.00000 | $0.00323 |
| Sonnet 5 | $0.00000 | $0.00129 |
| Haiku 4.5 | $0.00000 | $0.00065 |
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.
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 thelibllamashared library (required).YDRAG_DB_PATH: Path to the DuckDB database file (default:rag.db).YDRAG_TRANSPORT: MCP transport type (stdio,sse, orstreamable-http).
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.
- 10d ago First seen · 71 lines · 0 tokens per session scan A d3f4a96ce720
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.
Other skills, from other repositories
repo-rag-builder
A tool that builds a layered RAG knowledge base for Go or Python backends. RAG lets an AI retrieve relevant project documents and code instead of relying only on its general training.
ax-go-gen
Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.
ax-go-llm
Use when writing Go code with github.com/ax-llm/ax/packages/go for using the generated Ax package, factory functions, package docs, examples, and API reference.
ax-go-audio
Use when writing Go code with github.com/ax-llm/ax/packages/go for audio input/output, OpenAI Responses audio mapping, realtime event folding, and generated package audio examples.
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.
developing-genkit-go
Develop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working with Genkit Go code involving generation, prompts, streaming, tool calling, or model providers.