rag-audit-collections

rag-audit-collections is a command for Claude Code from codingthefuturewithai/rag-retriever. It costs 0 tokens per session (509 once invoked), scanned A, original, MIT.

A command for reviewing vector-store collections, which are searchable stores of document fragments used by a RAG retriever. It checks their contents, search results, metadata, usage, duplicates, outdated information, and possible contradictions.

In plain words
What is it for?
Use it to list collections, examine document counts and metadata, run sample searches, assess answer quality, and identify collections that need attention. It requires the RAG Retriever MCP server.
Why use it?
It helps reveal whether stored knowledge is complete, current, well organized, and producing relevant answers. This reduces the need to inspect every collection manually.

Command for Claude Code

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 commands/codingthefuturewithai/rag-retriever/rag-audit-collections
Clone the repo
git clone --depth 1 https://github.com/codingthefuturewithai/rag-retriever

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-audit-collections

README.md
[![agentmods](https://agentmods.dev/badge/commands/codingthefuturewithai/rag-retriever/rag-audit-collections.svg)](https://agentmods.dev/commands/codingthefuturewithai/rag-retriever/rag-audit-collections)
Your own site
<a href="https://agentmods.dev/commands/codingthefuturewithai/rag-retriever/rag-audit-collections"><img src="https://agentmods.dev/badge/commands/codingthefuturewithai/rag-retriever/rag-audit-collections.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 509 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.00509
Opus 5 $0.00000 $0.00254
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured 5d ago against content hash 2707cd170834, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

rag-audit-collections 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 5d 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.

.claude/commands/rag-audit-collections.md · 58 lines

How it starts

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

Audit RAG Retriever Collections

Review and validate the current state of all vector store collections.

Prerequisites

This command requires the RAG Retriever MCP server to be configured in your Claude Code setup. The server provides access to vector store collections for analysis and validation.

Implementation Approach

This command uses direct implementation as it involves comprehensive analysis of existing collections.

Your Task

  1. Collection Inventory

    • Use list_collections to get complete inventory
    • Analyze document counts and metadata for each collection
    • Identify collections that may need attention
  2. Content Quality Assessment

    • Perform sample searches in each collection using known topics
    • Evaluate result quality and relevance - are answers accurate and complete?
    • Test for contradictory information - do different results conflict?
    • Check for potential duplicates or outdated content
    • Assess metadata richness and accuracy
    • AI Quality Review: Use AI to evaluate sample content for accuracy, completeness, and currency
  3. Usage Analysis

    • Identify most and least used collections
    • Evaluate collection organization and naming
    • Check for overlapping content across collections
  4. Health Check

    • Verify all collections are accessible
    • Check for any technical issues or corruption
    • Validate search functionality across collections
  5. Quality Assessment Workflow

    • For each collection, search for 3-5 known topics and verify accuracy
    • Check relevance scores - collections with consistently low scores (< 0.3) need attention
    • Look for contradictory information within collections
    • Identify outdated content that should be removed or updated
    • Test cross-collection searches to find duplicate or conflicting information
  6. Recommendations

    • Suggest collections that need updating or re-indexing
    • Recommend consolidation of similar collections
    • Identify gaps in knowledge coverage
    • Propose new collections for missing topic areas
    • Flag quality issues: Highlight collections with poor, outdated, or contradictory content

Read the full file on GitHub · 58 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. 5d ago First seen · 58 lines · 0 tokens per session scan A 2707cd170834

Subscribe to this mod's changes

rag-audit-collections is a command published in the GitHub repository codingthefuturewithai/rag-retriever (27 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 509 tokens. 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-08-30.