A skill your agent uses when building knowledge bases, ingesting documents, running semantic search, or adding LLM-synthesized Q&A over private content with Butterbase RAG

MITAuto-check passedAI & LLM Engineering

Install RAG Dev

skills CLI
$ npx skills add butterbase-ai/butterbase-skills --skill rag-dev -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install butterbase-ai/butterbase-skills rag-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rag-dev .claude/skills/rag-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rag-dev
GitHub stars
534
Token cost
~2.1k tokens
SKILL.md length
631 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building knowledge bases, ingesting documents, running semantic search, or adding LLM-synthesized Q&A over private content with Butterbase RAG

  • Works in 7 steps: The mental model → End-to-end workflow → Listing and cleanup → …
  • Building knowledge bases
  • SKILL.md covers 1. The mental model, 2. End-to-end workflow, 3. Listing and cleanup and 4. Choosing chunk size and…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

RAG Dev is an agent skill from butterbase-ai/butterbase-skills. Use when building knowledge bases, ingesting documents, running semantic search, or adding LLM-synthesized Q&A over private content with Butterbase RAG

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Retrieval-augmented generation and Knowledge bases. The repository describes itself as: Plugin for Butterbase.ai. The licence is MIT.

When your agent uses it

  • Building knowledge bases
  • Ingesting documents
  • Running semantic search
  • Adding LLM-synthesized Q&A over private content with Butterbase RAG

Example prompts

  • “/rag-dev”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. The mental model
  2. End-to-end workflow
  3. Listing and cleanup
  4. Choosing chunk size and overlap
  5. Metadata-driven filtering
  6. Common patterns
  7. Errors and pitfalls

What it can do on your machine

Read from SKILL.md and the folder at commit aa8ae69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

RAG Dev loads about 2.1k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 631 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from butterbase-ai/butterbase-skills at commit aa8ae69, republished under its MIT licence (© butterbase-ai). 631 words, ~2,136 tokens.

Download SKILL.mdSave it as .claude/skills/rag-dev/SKILL.md (or your agent's skills folder).
name
rag-dev
description
Use when building knowledge bases, ingesting documents, running semantic search, or adding LLM-synthesized Q&A over private content with Butterbase RAG

Butterbase RAG (Retrieval-Augmented Generation)

Two tools cover the entire RAG surface:

  • manage_rag_content — collections, document ingestion, status polling, deletion
  • rag_query — semantic search, optional LLM synthesis

Documents are ingested asynchronously: text or files become embeddings stored in pgvector, and queries do a similarity search at runtime.


1. The mental model

Collection                        Documents                     Chunks
──────────                       ──────────                     ──────
"product-faq" ──────────────►   doc_1 (PDF) ───────────►       chunk 1, 2, 3...
                                doc_2 (text) ──────────►       chunk 4, 5...
                                doc_3 (markdown) ──────►       chunk 6...

A collection holds documents; a document is split into chunks and embedded; rag_query searches by cosine similarity across chunks within a collection.

chunk_size and chunk_overlap are set once at collection creation and immutable — to change them, delete and recreate the collection.


2. End-to-end workflow

┌────────────────────────────────────────────┐
│ 1. create_collection (once per knowledge)  │
├────────────────────────────────────────────┤
│ 2. ingest_document (text OR storage_object)│
├────────────────────────────────────────────┤
│ 3. poll get_document_status until "ready"  │
├────────────────────────────────────────────┤
│ 4. rag_query (with or without synthesis)   │
└────────────────────────────────────────────┘
Step 1 — create the collection
js
manage_rag_content({
  app_id: "app_abc123",
  action: "create_collection",
  name: "product-faq",
  description: "Customer-facing product knowledge",
  chunk_size: 512,         // optional, default 512 tokens
  chunk_overlap: 50,       // optional, default 50 tokens
  access_mode: "shared"    // optional: "private" | "shared" | "custom"
})
access_modeWho can query
private (default)Only the app owner / service key
sharedAny authenticated end-user with a valid JWT
customRespects RLS policies — for fine-grained control
Step 2a — ingest raw text
js
manage_rag_content({
  app_id: "app_abc123",
  action: "ingest_document",
  collection: "product-faq",
  text: "Our return policy is 30 days from purchase...",
  filename: "return-policy.txt",          // optional, for display
  metadata: { category: "returns", tier: "all" }   // filter later in rag_query
})
// → { document_id: "doc_xyz", status: "pending" }
Step 2b — ingest an uploaded file

Files come from manage_storage first. Two-step:

js
// 1. Upload the file via the storage skill — get an object_id
const { object_id } = await uploadPdfViaStorage(...);

// 2. Hand that object_id to RAG ingestion
manage_rag_content({
  app_id: "app_abc123",
  action: "ingest_document",
  collection: "product-faq",
  storage_object_id: object_id,
  filename: "manual.pdf",
  metadata: { product: "v3" }
})

Supported file types: PDF, TXT, Markdown, CSV, HTML, DOCX, XLSX, PPTX.

Step 3 — poll until ready

Ingestion is fire-and-forget. The document moves through pending → processing → ready (or failed). Poll:

js
manage_rag_content({
  app_id: "app_abc123",
  action: "get_document_status",
  collection: "product-faq",
  document_id: "doc_xyz"
})
// → { id, filename, status: "processing", processedAt, errorMessage? }

Recommended cadence: poll every 2–5 seconds for the first minute, back off after that. Bigger files (large PDFs, XLSX) take longer.

Step 4 — query

Two modes: raw retrieval (just chunks back) or synthesized (LLM answer + sources).

Raw retrieval
js
rag_query({
  app_id: "app_abc123",
  collection: "product-faq",
  query: "How long do I have to return an item?",
  top_k: 5,                  // default 5, max 20
  threshold: 0.7,            // optional similarity floor (0..1)
  filter: { category: "returns" }    // optional metadata filter
})
// → { chunks: [{ text, score, document_id, metadata }, ...] }
Synthesized answer
js
rag_query({
  app_id: "app_abc123",
  collection: "product-faq",
  query: "How long do I have to return an item?",
  synthesize: true,
  model: "anthropic/claude-haiku-4.5"   // default
})
// → { answer, chunks, model }

synthesize: true runs the retrieved chunks through an LLM and returns a grounded answer. chunks is still included so you can show citations.


3. Listing and cleanup

js
manage_rag_content({ app_id, action: "list_collections" })
manage_rag_content({ app_id, action: "get_collection", name: "product-faq" })
manage_rag_content({ app_id, action: "list_documents", collection: "product-faq" })
manage_rag_content({ app_id, action: "delete_document", collection: "product-faq", document_id: "doc_xyz" })
manage_rag_content({ app_id, action: "delete_collection", name: "product-faq" })

get_collection returns { name, description, accessMode, chunkSize, chunkOverlap, createdAt, documentCount: { pending, processing, ready, failed } } — handy for a dashboard view.

Both delete_document and delete_collection are irreversible and remove embeddings. To replace a document, delete then re-ingest.


4. Choosing chunk size and overlap

Use caseSuggested chunk_sizechunk_overlap
Q&A over short FAQs / docs256–51250
Long-form documentation, manuals512–1024100
Code or structured content1024–20480–50
Conversational logs / transcripts25650

Larger chunks preserve more context but reduce retrieval granularity (you may pull in irrelevant nearby content). Overlap prevents semantic splits at boundaries from losing meaning. You can't change these without recreating the collection — pick them deliberately the first time.


5. Metadata-driven filtering

Anything you pass in metadata at ingest time is available as a filter at query time. Use it to scope queries:

js
// at ingest:
metadata: { product: "v3", region: "EU", language: "en" }

// at query:
filter: { product: "v3", language: "en" }

Filters are exact-match key/value. There's no full-text search beyond chunk content; design your metadata schema to match how you'll segment queries.


Show full SKILL.md (242 more words)Show less

6. Common patterns

Customer-support bot
  1. Create support-kb (access_mode: shared).
  2. Ingest your help-center articles (markdown) and product PDFs.
  3. From a serverless function: rag_query with synthesize: true, return the answer + top 3 chunks as citations.
Per-tenant knowledge base
  1. Create one collection per tenant (access_mode: "custom").
  2. Tag every document with metadata: { tenant_id }.
  3. Query with filter: { tenant_id: ctx.user.tenant_id } from a function.
  4. Use RLS on the wrapping table to gate which tenant a user can query.
Versioned docs

Tag with metadata: { version: "v3" }. Query with filter: { version: "v3" }. To deprecate v2, delete just those documents — no need to rebuild the collection.


7. Errors and pitfalls

ErrorCause
RESOURCE_NOT_FOUNDApp / collection / document doesn't exist
VALIDATION_DUPLICATE_NAMECollection name already taken
VALIDATION_ERRORingest_document with neither text nor storage_object_id
COLLECTION_EMPTYrag_query against a collection with no ready docs

Pitfalls:

  • Polling too aggressively wastes quota; backoff after the first minute.
  • chunk_size / chunk_overlap are immutable — get them right up front.
  • synthesize: true adds LLM latency + cost. For low-latency UX, do raw retrieval and synthesize on the frontend asynchronously.
  • Metadata is exact-match only — no LIKE, no ranges. Pre-bucket continuous values (e.g. tier: "free" | "pro") before ingesting.
  • File ingestion requires prior upload to manage_storage; you cannot stream raw bytes into ingest_document.
  • A failed document stays in the collection with status: "failed" and an errorMessage. Delete and re-ingest to retry.

If a docs/butterbase/00-state.md exists in the working directory, prefer invoking via /butterbase-skills:journey-rag so the journey orchestrator stays in sync.

© butterbase-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/rag-dev of butterbase-ai/butterbase-skills.

Open the folder on GitHubat commit aa8ae69

Compare with similar skills

RAG Dev next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

RAG Dev compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
RAG Dev this skillbutterbase-ai/butterbase-skills534—~2.1kAutomated safety check: PassMIT
Blockify Integrationiternal-technologies-partners/blockify-agentic-data-optimization316—~6.2kAutomated safety check: NotesCustom licence
RAG Check Firstlyonzin/knowledge-rag290—~1.4kAutomated safety check: PassMIT
Agentsop Difyagentsope/SkillAlchemy459—~5.4kAutomated safety check: NotesMIT
Penguin SDKPrism-Shadow/penguin-harness2.5k—~11kAutomated safety check: PassApache-2.0
Sc QAopen-edge-platform/edge-ai-suites140—~2.3kAutomated safety check: PassApache-2.0

Similar skills

  • Blockify Integration

    iternal-technologies-partners/blockify-agentic-data-optimization

    Process documents with Blockify API to create optimized IdeaBlocks for RAG.

    316 GitHub stars~6.2k tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check: notes
  • RAG Check First

    lyonzin/knowledge-rag

    Before answering any technical question, code request, architecture decision, or factual claim, call searchknowledge to check the local corpus.

    290 GitHub stars~1.4k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Agentsop Dify

    agentsope/SkillAlchemy

    SOP for building LLM applications on Dify — visual workflow + chatflow + agent + RAG knowledge base + plugin marketplace + observability, self-hostable.

    459 GitHub stars~5.4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Penguin SDK

    Prism-Shadow/penguin-harness

    A skill your agent uses whenever the user wants to build an agent application — their own program with an embedded agent, such as an AI app, an agentic app or a RAG app.

    2.5k GitHub stars~11k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Sc QA

    open-edge-platform/edge-ai-suites

    Ask a natural-language question against indexed content via the Content Search RAG Q&A endpoint.

    140 GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • RAG Assistant

    Atmosphere/atmosphere

    Knowledge base assistant that retrieves and cites documents from a curated index.

    3.8k GitHub stars~504 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from butterbase-ai/butterbase-skills

All 39 skills in this repo
  • AI

    butterbase-ai/butterbase-skills

    A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

    534 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Auth Setup

    butterbase-ai/butterbase-skills

    A skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys

    534 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Build App

    butterbase-ai/butterbase-skills

    A skill your agent uses when building a new Butterbase app from scratch, creating a full-stack application, or when the user asks to set up a complete backend with database, auth, and deployment

    534 GitHub stars~4.9k tokensUpdated 3 days ago
    Auto-check passed
  • Contributing

    butterbase-ai/butterbase-skills

    A skill your agent uses when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture

    534 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Debug Rls

    butterbase-ai/butterbase-skills

    A skill your agent uses when users report access denied errors, see wrong data, RLS policies are not working, or when troubleshooting Row-Level Security issues in Butterbase

    534 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Deploy Frontend

    butterbase-ai/butterbase-skills

    A skill your agent uses when deploying a frontend (React, Next.js, or static HTML) to a live URL on Butterbase, or when troubleshooting deployment issues like MIME type errors or blank pages

    534 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed

Questions about RAG Dev

What does RAG Dev do?

A skill your agent uses when building knowledge bases, ingesting documents, running semantic search, or adding LLM-synthesized Q&A over private content with Butterbase RAG. RAG Dev is an agent skill from butterbase-ai/butterbase-skills.

When should I use RAG Dev?

RAG Dev fits situations like: building knowledge bases; ingesting documents; running semantic search; adding LLM-synthesized Q&A over private content with Butterbase RAG.

How do I install RAG Dev in Claude Code?

Run `npx skills add butterbase-ai/butterbase-skills --skill rag-dev -a claude-code`. Or copy the skill folder (skills/rag-dev in butterbase-ai/butterbase-skills) into .claude/skills/rag-dev in your project. Claude Code loads it when a task matches its description.

How do I install RAG Dev in Codex?

Run `npx skills add butterbase-ai/butterbase-skills --skill rag-dev -a codex`. Or copy the skill folder (skills/rag-dev in butterbase-ai/butterbase-skills) into .agents/skills/rag-dev in your project. Codex loads it when a task matches its description.

Can I use RAG Dev in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add butterbase-ai/butterbase-skills --skill rag-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rag-dev, .gemini/skills/rag-dev, .github/skills/rag-dev and .opencode/skills/rag-dev in your project.

What does RAG Dev need to run?

SKILL.md names no scripts, command-line tools or credentials: RAG Dev is instructions for the agent only.

Does RAG Dev access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is RAG Dev safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does RAG Dev use?

RAG Dev is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does RAG Dev use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to RAG Dev?

Skills that share tags, products or a category with RAG Dev: Blockify Integration (iternal-technologies-partners/blockify-agentic-data-optimization, 316 stars), RAG Check First (lyonzin/knowledge-rag, 290 stars), Agentsop Dify (agentsope/SkillAlchemy, 459 stars) and Penguin SDK (Prism-Shadow/penguin-harness, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains RAG Dev?

butterbase-ai (a GitHub organization) maintains it in butterbase-ai/butterbase-skills, which has 534 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 5, 2026.

Source: butterbase-ai/butterbase-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.