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.5 | $0.00000 | $0.00258 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (3 stars, last pushed 7mo 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.
ydrag compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ydraginnomon/yzma-duckdb-rag | Skill | 3 | 7mo ago | MIT | A | 0 | Claude Code, Codex |
| tree-sitter-language-pack-chunking-for-llmsxberg-io/tree-sitter-language-pack | Skill | 482 | yesterday | MIT | A | 52 | Claude Code |
| repo-rag-builderSimon-Hwang/gg-plugins | Skill | 2 | 3mo ago | none | A | 149 | Claude Code |
| ax-go-genax-llm/ax | Skill | 3.0k | 3d ago | Apache-2.0 | A | 54 | Claude Code, Codex |
| ax-go-audioax-llm/ax | Skill | 3.0k | 3d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| developing-genkit-gogoogle/skills | Skill | 22k | yesterday | Apache-2.0 | C | 60 | Claude Code, Codex |
| swiftidebosun-ai/swiftide | Skill | 802 | yesterday | MIT | A | 47 | Claude Code, Codex |