rag

rag is a skill for Claude Code from RailtownAI/railtracks. It costs 39 tokens per session (2,913 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 2,913 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.02913
Opus 5.5 $0.00016 $0.01165
Sonnet 5.5 $0.00008 $0.00583
Haiku 4.5 $0.00004 $0.00291

Measured 10d ago against content hash b10372c098f0, 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 · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 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 · 311 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 b10372c098f0
  2. 13d 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 (233 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 2,913 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

Other skills, from other repositories

mcp-builder

DEPRECATED: This skill has been replaced by mcp-app-builder. Check if mcp-app-builder is available in the skills folder. If not, install it: npx skills install mcp-use/mcp-use --skill mcp-app-builder Use mcp-app-builder instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when…

Shubhamsaboo/awesome-llm-apps · 123 tokens

thinking-out-loud

A contract for what the agent does when a long, messy, stream-of-consciousness ramble arrives (usually voice dictation): act on nothing until the echo brief is approved. The echo audits the entire transfer, mission, locked decisions and constraints, open questions, flips and parked tangents, with the model's…

Shubhamsaboo/awesome-llm-apps · 206 tokens

advisor-orchestrator-worker

Use when a task is too large for one model pass, needs parallel research or generation across many subtasks (like researching a dozen competitors at once), or the user asks to orchestrate multiple models, split work across a model team, run an advisor-worker loop, have a stronger model review the plan while cheap…

Shubhamsaboo/awesome-llm-apps · 100 tokens

first-reader

Beta readers for any draft, run by simulating how a real reader experiences it, moment by moment. A skim gate, a no-lookahead timed read producing an attention transcript with quit points, a recall test of what a reader remembers the next day, and a trust ledger of the implied author. Use when the user asks for a beta…

Shubhamsaboo/awesome-llm-apps · 174 tokens

mcp-apps-builder

MANDATORY for ALL MCP server work - mcp-use framework best practices and patterns. READ THIS FIRST before any MCP server work, including: Creating new MCP servers Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) Debugging MCP server issues or errors Reviewing MCP server code for…

Shubhamsaboo/awesome-llm-apps · 139 tokens

project-graveyard

Scans the developer's machine for dead side projects, autopsies each one from its git history (died at the payments wall, killed by a newer project, finished but never shipped), surfaces their personal death patterns, and picks the corpse most worth resurrecting — then helps ship it. Use when the user mentions…

Shubhamsaboo/awesome-llm-apps · 127 tokens