nornicdb-rag-procedures

nornicdb-rag-procedures is a skill for Claude Code, Codex from orneryd/NornicDB. It costs 93 tokens per session (2,892 once invoked), scanned A, original, MIT.

A set of database procedures for building retrieval-augmented generation, or RAG, pipelines in NornicDB. RAG retrieves relevant stored information before an AI model generates an answer.

In plain words
What is it for?
Use it to retrieve documents with vector and keyword search, rerank results with a cross-encoder, and call a configured language model from Cypher.
Why use it?
It provides retrieval, full-text search, result ranking, and model calls through Cypher database queries instead of requiring separate hand-built pipeline steps.

Skill for Claude CodeCodex

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

Good fit Use it to retrieve documents with vector and keyword search, rerank results with a cross-encoder, and call a configured language model from Cypher.

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

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 nornicdb-rag-procedures

README.md
[![agentmods](https://agentmods.dev/badge/skills/orneryd/nornicdb/rag-procedures.svg)](https://agentmods.dev/skills/orneryd/nornicdb/rag-procedures)
Your own site
<a href="https://agentmods.dev/skills/orneryd/nornicdb/rag-procedures"><img src="https://agentmods.dev/badge/skills/orneryd/nornicdb/rag-procedures.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,892 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.00093 $0.02892
Opus 5 $0.00046 $0.01446
Sonnet 5 $0.00019 $0.00578
Haiku 4.5 $0.00009 $0.00289

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

Security

Grade A, and why

nornicdb-rag-procedures 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 2d 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.

docs/skills/rag-procedures.skill.md · 221 lines

How it starts

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

RAG Procedures (Cypher API)

NornicDB exposes the entire retrieval-augmented-generation pipeline as Cypher procedures. The mental model is "Cypher all the way down": write CALL db.<verb>({...}) with a map argument and YIELD the columns you want.

The four verbs

Procedure What it does Stages
db.retrieve(req) Hybrid retrieval vector + BM25, fused with RRF
db.rretrieve(req) Retrieve + rerank when reranker is configured adds cross-encoder rerank if NORNICDB_SEARCH_RERANK_ENABLED=true
db.rerank(req) Standalone rerank over user-supplied candidates cross-encoder only
db.infer(req) LLM generation calls the configured inference manager

All four take a single map argument. Most fields support both camelCase and snake_case; pick one and stick with it.

db.retrieve — hybrid retrieval

CALL db.retrieve({
  query:          'authentication patterns',   -- required
  limit:          10,                          -- default 50
  failClosed:     true,                        -- require embedding; disable BM25 fallback
  minSimilarity:  0.5,                         -- vector floor
  types:          ['Document', 'Memory'],      -- label filter; alias: labels
  filters:        {lifecycle: 'active'},       -- property filters
  candidateTarget: 50,                         -- branch depth, independent of limit
  rrfK:           60,
  vectorWeight:   1.0,
  bm25Weight:     1.0,
  minRRFScore:    0.0,
  fallbackEnabled: false,
  rerankEnabled:  false,                       -- explicit on/off
  rerankTopK:     100,
  rerankMinScore: 0.0,
  embedding:      $queryVector                 -- optional pre-computed; alias: queryEmbedding / query_embedding
})
YIELD node, score, rrf_score, vector_rank, bm25_rank, search_method, fallback_triggered
RETURN node.id, node.title, score, search_method
ORDER BY score DESC

Read the full file on GitHub · 221 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. 2d ago First seen · 221 lines · 93 tokens per session scan A c9484ae58516

Subscribe to this mod's changes

nornicdb-rag-procedures is a skill published in the GitHub repository orneryd/NornicDB (861 stars, last pushed today), licensed MIT. It adds 93 tokens to every session and 2,892 once invoked, about $0.0005 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-05.