neuron-rag

neuron-rag is a skill for Claude Code, Codex from neuron-core/neuron-laravel. It costs 127 tokens per session (5,431 once invoked), scanned A, a copy of neuron-rag, MIT.

A guide to retrieval-augmented generation, or RAG: answering a question by first finding relevant documents and then giving those documents to an AI model. It covers embeddings, which turn text into searchable numeric representations, and vector stores, which search them.

In plain words
What is it for?
Use it to build document search, knowledge bases, semantic search, and chat systems that retrieve relevant information before generating an answer.
Why use it?
It helps an AI answer using your documents instead of relying only on its general training. Retrieval, filtering, and re-ranking can also limit the context passed to the model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build document search, knowledge bases, semantic search, and chat systems that retrieve relevant information before generating an answer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neuron-core/neuron-laravel/neuron-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 neuron-core/neuron-laravel --skill neuron-rag
Clone the repo
git clone --depth 1 https://github.com/neuron-core/neuron-laravel

Made for: Claude Code, Codex.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/neuron-core/neuron-laravel/neuron-rag"><img src="https://agentmods.dev/badge/skills/neuron-core/neuron-laravel/neuron-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,431 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 91% copy Near-identical to another mod 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.00127 $0.05431
Opus 5.5 $0.00051 $0.02172
Sonnet 5.5 $0.00025 $0.01086
Haiku 4.5 $0.00013 $0.00543

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

Security

Grade A, and why

neuron-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 1mo 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.

Origin

This is a copy

91% identical to neuron-rag — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

resources/boost/skills/neuron-rag/SKILL.md · 523 lines

How it starts

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

Neuron AI RAG

This skill helps you implement Retrieval-Augmented Generation (RAG) in Neuron AI. RAG extends Agent — it inherits everything an agent can do (chat, stream, structured output, tools, persistence, thread identity) and replaces the entry chain with retrieval:

AgentStartEvent → PreProcessNode → RetrievalNode → PostProcessNode → InstructionsNode → inference
  1. Pre-process the user question (query rewriting/expansion)
  2. Retrieve relevant documents from the vector store
  3. Post-process (re-rank, filter by score)
  4. Send the documents with the question, as context of the turn, and run the normal inference

The documents are not added to the instructions and not stored in the chat history. They reach the model in the question's own message, after the question, inside <EXTRA-CONTEXT> tags:

system   <your instructions>
user     <the question>
         <EXTRA-CONTEXT> ...retrieved documents... </EXTRA-CONTEXT>

Write instructions that fit this position, such as "answer from the context that follows the question". When nothing is retrieved, the question is sent alone. Because the instructions no longer change with each question, they and the conversation can be cached: see "Turn context" in the neuron-agent skill.

Core Components

  1. Embeddings provider — converts text to vectors (EmbeddingsProviderInterface)
  2. Vector store — stores and searches document embeddings (VectorStoreInterface)
  3. Retrieval strategy — how a query becomes a document list (RetrievalInterface)
  4. Pre/post processors — query transformation and result re-ranking/filtering
use NeuronAI\Providers\AIProviderInterface;
use NeuronAI\Providers\Anthropic\Anthropic;
use NeuronAI\RAG\Embeddings\EmbeddingsProviderInterface;
use NeuronAI\RAG\Embeddings\OpenAIEmbeddingsProvider;
use NeuronAI\RAG\RAG;
use NeuronAI\RAG\VectorStore\PineconeVectorStore;
use NeuronAI\RAG\VectorStore\VectorStoreInterface;

class MyChatBot extends RAG
{
    protected function provider(): AIProviderInterface
    {
        return new Anthropic(
            key: $_ENV['ANTHROPIC_API_KEY'],
            model: 'ANTHROPIC_MODEL',
        );
    }

    protected function embeddings(): EmbeddingsProviderInterface
    {
        return new OpenAIEmbeddingsProvider(
            key: $_ENV['OPENAI_API_KEY'],
            model: 'OPENAI_EMBEDDING_MODEL',
        );
    }

    protected function vectorStore(): VectorStoreInterface
    {
        return new PineconeVectorStore(
            key: $_ENV['PINECONE_API_KEY'],
            indexUrl: $_ENV['PINECONE_INDEX_URL'],
        );
    }
}

Read the full file on GitHub · 523 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. 1mo ago Changed · +12 lines 49eb7ff798c6
  2. 2mo ago First seen · 511 lines · 127 tokens per session scan A c4c6f9d01689

Subscribe to this mod's changes

neuron-rag is a skill published in the GitHub repository neuron-core/neuron-laravel (124 stars, last pushed 12d ago), licensed MIT. It adds 127 tokens to every session and 5,431 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to neuron-rag, differing in 0 lines, and is treated as a copy.

Related

neuron-rag compared with skills from other repositories

neuron-rag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
neuron-ragneuron-core/neuron-laravelSkill12412d agoMITA127Claude Code, Codex
neuron-ragneuron-core/neuron-aiSkill2.2k2d agoMITA127Claude Code, Codex
huf_knowledge_skilltridz-dev/hufSkill129todayAGPL-3.0B82Claude Code, Codex
agent-v3-memory-specialistruvnet/rufloSkill83ktodayMITA25Claude Code
embeddingsruvnet/rufloSkill83ktodayMITA62Claude Code
unified-llm-apiPrism-Shadow/penguin-harnessSkill3.4ktodayApache-2.0A43Claude Code, Codex
neuron-agentneuron-core/neuron-aiSkill2.2k2d agoMITA48Claude Code, Codex