rag-governance

rag-governance is a skill for Claude Code, Codex, Cursor from vpeetla-ai/react-agent-pattern. It costs 54 tokens per session (292 once invoked), scanned A, a copy of rag-governance, MIT.

A set of rules and implementation guidance for retrieval-augmented generation (RAG), where an AI answers using searched documents. It covers access checks, combined keyword and meaning-based search, result reordering, citations, and human review for sensitive results.

In plain words
What is it for?
Use it when building or tuning enterprise document search, connecting a Qdrant database, setting retrieval parameters, or testing that restricted passages are not returned.
Why use it?
It helps prevent answers from using documents a person should not see and makes it possible to trace answers back to source passages.

Skill for Claude CodeCodexCursor

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.

agentmods
npx agentmods add skills/vpeetla-ai/react-agent-pattern/rag-governance
Any agent
npx skills add vpeetla-ai/react-agent-pattern --skill rag-governance
Clone the repo
git clone --depth 1 https://github.com/vpeetla-ai/react-agent-pattern

Made for: Claude Code, Codex, Cursor.

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-governance

README.md
[![agentmods](https://agentmods.dev/badge/skills/vpeetla-ai/react-agent-pattern/rag-governance.svg)](https://agentmods.dev/skills/vpeetla-ai/react-agent-pattern/rag-governance)
Your own site
<a href="https://agentmods.dev/skills/vpeetla-ai/react-agent-pattern/rag-governance"><img src="https://agentmods.dev/badge/skills/vpeetla-ai/react-agent-pattern/rag-governance.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% 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 $0.00054 $0.00292
Opus 5 $0.00027 $0.00146
Sonnet 5 $0.00011 $0.00058
Haiku 4.5 $0.00005 $0.00029

Measured 4d ago against content hash 4cd65b7adc6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

Origin

This is a copy

100% identical to rag-governance — 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.

.cursor/skills/rag-governance/SKILL.md · 42 lines

What it actually says

RAG Governance

Principles

  1. Access before ranking — filter by tenant/role before vector search
  2. Citations required — every answer cites chunk IDs
  3. HITL for sensitive — low confidence or PII-tagged chunks → gateway pause

Hybrid retrieval

query → embed → vector + BM25 → merge (hybrid_alpha) → rerank → top_k

VAP strategy adapter

  • enterprise_rag strategy in venkat-ai-platform delegates to Enterprise RAG API
  • Env: ENTERPRISE_RAG_API_URL

LoopForge tuning (ODAEU)

  • top_k, hybrid_alpha, rerank_threshold versioned in RAG config tree
  • Lessons stored when eval fails

Reference

  • enterprise_rag_platform — Qdrant adapter, OTLP export
  • loop-engine-agent-platform/src/loop_engine/rag/

Tests

  • Golden queries with expected chunk IDs
  • Access denial: user without role gets empty retrieval, not leaked chunks
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. 4d ago First seen · 42 lines · 54 tokens per session scan A 4cd65b7adc6f

Subscribe to this mod's changes

rag-governance is a skill published in the GitHub repository vpeetla-ai/react-agent-pattern (2 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 292 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to rag-governance, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

rag-governance

Implement access-aware RAG in Enterprise RAG or VAP: hybrid retrieval, rerank, citations, AegisAI HITL for sensitive chunks. Use when tuning retrieval, adding Qdrant adapter, or wiring enterpriseragplatform.

vpeetla-ai/multi-agent-system-pattern · 54 tokens

tdd-agent-loops

Test-driven development for agent systems: red-green-refactor on graphs, mocked LLM fixtures, pytest-asyncio, trace assertions. Use when adding agent nodes, fixing loop bugs, or building pattern repos.

vpeetla-ai/multi-agent-system-pattern · 48 tokens

governed-ai-stack

Maps tasks to the vpeetla-ai 6-layer reference stack (VAP, AegisAI, Enterprise RAG, AegisLoop, Content Factory, LoopForge). Use when choosing which repo to change, designing integrations, or explaining architecture.

vpeetla-ai/multi-agent-system-pattern · 59 tokens

loop-engineering

Implement ODAEU harness loops, RAG evolve tuning, and procedural memory in LoopForge or similar systems. Use when building self-improving agents, eval gates, MCP tool bridges, or RAG version trees.

vpeetla-ai/multi-agent-system-pattern · 48 tokens

cuml-machine-learning

Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.

langchain-ai/deepagents · 43 tokens

rag-knowledge

RAG domain knowledge — architecture, component routing, rules, and reference tables. Use when working on any file under rag/.

redhat-community-ai-tools/UnifAI · 29 tokens