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.
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configsWrote 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/commands/matt-dionis/claude-code-configs/ai-rag-setup)<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-rag-setup"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/ai-rag-setup.svg" alt="Measured on agentmods" 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.00012 | $0.01648 |
| Opus 5 | $0.00006 | $0.00824 |
| Sonnet 5 | $0.00002 | $0.00330 |
| Haiku 4.5 | $0.00001 | $0.00165 |
Grade A, and why
ai-rag-setup 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 4d 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 — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Set up RAG (Retrieval-Augmented Generation) System
Create a comprehensive RAG implementation with embeddings, vector storage, and retrieval: $ARGUMENTS
Current Project Analysis
Existing database setup: !find . -name "*schema*" -o -name "*migration*" -o -name "drizzle.config.*" | head -5
Vector database configuration: !grep -r "vector\|embedding" . --include="*.ts" --include="*.sql" | head -5
AI SDK integration: !grep -r "embed\|embedMany" . --include="*.ts" | head -5
RAG Implementation Types
Basic RAG: Simple query → retrieve → generate pipeline Advanced RAG: Multi-query, re-ranking, hybrid search, filtering Conversational RAG: Context-aware retrieval with chat history Agentic RAG: Tool-based retrieval with dynamic knowledge access
Your Task
- Analyze current data infrastructure and vector storage capabilities
- Design embedding and chunking strategy for optimal retrieval
- Set up vector database with proper indexing and search
- Implement embedding pipeline with batch processing
- Create retrieval system with similarity search and ranking
- Build RAG generation pipeline with context injection
- Add evaluation metrics for retrieval and generation quality
- Implement comprehensive testing for all RAG components
Implementation Requirements
Data Processing Pipeline
- Document ingestion and preprocessing
- Intelligent chunking strategies (sentence, semantic, sliding window)
- Metadata extraction and enrichment
- Batch embedding generation with rate limiting
- Deduplication and quality filtering
Vector Storage and Search
- Database setup (PostgreSQL + pgvector, Pinecone, Supabase, etc.)
- Proper indexing (HNSW, IVFFlat) for performance
- Similarity search with filtering and ranking
- Hybrid search combining vector and text search
- Metadata filtering and faceted search
RAG Generation
- Context selection and ranking
- Prompt engineering for RAG scenarios
- Context window management
- Response grounding and source attribution
- Quality control and relevance scoring
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.
- 4d ago First seen · 253 lines · 12 tokens per session scan A 7d555a3876b9
ai-rag-setup is a command published in the GitHub repository Matt-Dionis/claude-code-configs (624 stars, last pushed 1y ago), licensed MIT. It adds 12 tokens to every session and 1,648 once invoked, about $0.0001 per session on Opus 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-09-03.
Other commands, from other repositories
ingest
Manually add knowledge to the Weaviate store.
tune-vector-index
Recommend and generate optimized HNSW or IVFFlat index configuration given row count and query latency target. Outputs DROP + CREATE INDEX SQL with tuned parameters, EXPLAIN ANALYZE template, and pgvector-specific query-time settings (efsearch, probes).
laravel-vector-search
Add semantic/vector search with pgvector (Laravel 13+); use the laravel:vector-search skill exactly as written.
vector-search
Generate Oracle Database 23ai Vector Search implementation.
vector.batch_exists
Check existence for multiple vector keys.
vector.batch_upsert
Upsert multiple vectors in one itemwise batch.