rag

rag is a skill for Claude Code from RailtownAI/railtracks. It costs 39 tokens per session (3,139 once invoked), scanned A, original, MIT.

A retrieval-augmented generation (RAG) pipeline built with the Railtracks framework. RAG searches stored document passages and gives the relevant passages to an AI model when answering a question.

In plain words
What is it for?
Use it to ingest text, CSV, JSON, or PDF sources and search them for relevant content. It supports question-answering systems that need information from a document collection.
Why use it?
It provides a defined path for loading documents, splitting them into pieces, turning them into searchable representations, storing them, and retrieving matching passages.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to ingest text, CSV, JSON, or PDF sources and search them for relevant content. It supports question-answering systems that need information from a document collection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/railtownai/railtracks/rag
Install

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.

Any agent
npx skills add RailtownAI/railtracks --skill rag
Clone the repo
git clone --depth 1 https://github.com/RailtownAI/railtracks

Made for: Claude Code.

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 rag

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/railtownai/railtracks/rag"><img src="https://agentmods.dev/badge/skills/railtownai/railtracks/rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,139 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.00039 $0.03139
Opus 5.5 $0.00016 $0.01256
Sonnet 5.5 $0.00008 $0.00628
Haiku 4.5 $0.00004 $0.00314

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

Security

Grade A, and why

rag 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.

packages/railtracks/src/railtracks/cli/skills/rag/SKILL.md · 319 lines

How it starts

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

Build a Railtracks RAG Pipeline

The user wants to build a retrieval-augmented generation (RAG) pipeline using the railtracks framework: $ARGUMENTS

How railtracks retrieval works

The pipeline has two paths:

Write path (ingestion): Loader → Chunker → Embedder → VectorStore Read path (retrieval): query → Embedder → VectorStore.search → RetrievalResult

RetrievalRuntime orchestrates both paths. It takes a chunker, embedder, and store at construction time, then exposes ingest_all() / ingest() for writes and retrieve() for reads.

Core data flow

Stage Input Output
Loader source (file, URL, dataset) Document
Chunker Document Chunk
Embedder Chunk.content EmbeddedChunk
Store EmbeddedChunk stored StoreEntry
Retrieve query string RetrievalResult (ranked RetrievedChunk list)

Component reference

Loaders

from railtracks.retrieval.loaders import (
    TextLoader,  # .txt / .md files
    CSVLoader,  # rows → documents; content_columns, id_column, ignore_columns
    JSONLoader,  # .json / .jsonl files
    PyPDFLoader,  # PDF file or folder; breakdown_strategy="page" (default), "paragraph", or "document"
    HuggingFaceDatasetLoader,  # HF Hub datasets; pass dataset_name, split, content_columns
    LangChainLoaderAdapter,  # wrap any LangChain document loader
)

Chunkers

from railtracks.retrieval.chunking import (
    RecursiveCharacterChunker,  # general text; chunk_size (chars), overlap
    MarkdownHeaderChunker,  # heading-aware splits for .md content
    SentenceChunker,  # sentence windows; chunk_size (# sentences), overlap
    SemanticChunker,  # embedding-driven breakpoints; variable chunk size
    FixedTokenChunker,  # hard token budget; chunk_size (tokens), overlap
)

Embedders

from railtracks.retrieval.embedding import (
    OpenAIEmbedding,  # default model: "text-embedding-3-small"
    AzureEmbedding,  # Azure OpenAI routing
    OllamaEmbedding,  # local dev; model, api_base
    LiteLLMEmbedding,  # any LiteLLM-supported provider
)

Read the full file on GitHub · 319 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 Changed b33d1ecc29d1
  2. 19d ago Changed · +7 lines 7e596b8069e7
  3. 25d ago Changed · +1 lines a428f9243eab
  4. 1mo ago Changed b10372c098f0
  5. 1mo ago First seen · 311 lines · 39 tokens per session scan A fb1f537f14ba

Subscribe to this mod's changes

rag is a skill published in the GitHub repository RailtownAI/railtracks (235 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 3,139 once invoked, about $0.0002 per session on Opus 5.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-10-03.

Related

rag compared with skills from other repositories

rag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ragRailtownAI/railtracksSkill235yesterdayMITA39Claude Code
mcp-builderShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A123Claude Code, Codex
thinking-out-loudShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A206Claude Code, Codex
advisor-orchestrator-workerShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0C100Claude Code, Codex
rag-techniques-contribution-guidelinesNirDiamant/RAG_TechniquesSkill31k28d agononeA111Claude Code, Codex
first-readerShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A174Claude Code, Codex
mcp-apps-builderShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A139Claude Code, Codex