Borrowing it
Nothing to install: this file belongs to codingthefuturewithai/rag-retriever. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/codingthefuturewithai/rag-retriever/main/.claude/commands/rag-manage-collections.mdgit clone --depth 1 https://github.com/codingthefuturewithai/rag-retrieverWrote 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.
[](https://agentmods.dev/commands/codingthefuturewithai/rag-retriever/rag-manage-collections)<a href="https://agentmods.dev/commands/codingthefuturewithai/rag-retriever/rag-manage-collections"><img src="https://agentmods.dev/badge/commands/codingthefuturewithai/rag-retriever/rag-manage-collections.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00973 |
| Opus 5 | $0.00000 | $0.00487 |
| Sonnet 5 | $0.00000 | $0.00195 |
| Haiku 4.5 | $0.00000 | $0.00097 |
Grade A, and why
rag-manage-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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Manage RAG Retriever Collections
Administrative collection operations including deletion, cleanup, and maintenance tasks.
Prerequisites
This command requires both CLI access and MCP server configuration. Administrative operations use the CLI while status checking uses MCP tools.
Arguments
Use $ARGUMENTS to specify management operation:
- "list" - Show all collections with detailed analysis
- "delete COLLECTION_NAME" - Delete specific collection
- "clean" - Delete entire vector store (nuclear option)
- "health" - Assess collection health and quality
Examples:
- "list" - Show all collections
- "delete old_docs" - Delete specific collection
- "clean" - Delete entire vector store
- "health python_docs" - Check specific collection health
Implementation Approach
This command uses direct implementation combining MCP tools for analysis and CLI guidance for administrative actions.
Your Task
1. Parse Arguments
- Extract operation type from $ARGUMENTS
- Identify target collection name if specified
- Provide guidance on available operations if unclear
2. Collection Management Operations
List Collections (Enhanced)
- Use
list_collections()to get current state - Analyze collection sizes, dates, and metadata
- Identify potential issues or maintenance needs
- Recommend collection organization improvements
Delete Specific Collection
- IMPORTANT: This requires CLI access, not MCP
- Use
list_collections()to verify collection exists - Provide exact CLI command:
rag-retriever --clean --collection COLLECTION_NAME - Explain that this is irreversible
- Suggest verification steps after deletion
Clean Entire Vector Store
- CRITICAL: This deletes ALL data permanently
- Use
list_collections()to show what will be deleted - Provide exact CLI command:
rag-retriever --clean - Require explicit confirmation from user
- Explain recovery options (re-indexing from sources)
Health Assessment
- Use
vector_search()to test collection functionality - Check for common issues (empty results, low scores)
- Identify collections needing maintenance
- Recommend improvement actions
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.
- 7d ago First seen · 144 lines · 0 tokens per session scan A a1f66292c9cd
rag-manage-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 973 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.
Other commands, from other repositories
querying
Query documents from a search index using type-safe filters with support for pagination, sorting, field selection, scoring, and highlighting. Count matching documents efficiently without returning results.
agent
Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.
ingest
Manually add knowledge to the Weaviate store.
inference.embed
Embed one or more texts into vectors.
vector.batch_exists
Check existence for multiple vector keys.
vector.batch_upsert
Upsert multiple vectors in one itemwise batch.