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.
npx agentmods add skills/richfrem/agent-plugins-skills/vector-db-cleanupnpx skills add richfrem/agent-plugins-skills --skill vector-db-cleanupgit clone --depth 1 https://github.com/richfrem/agent-plugins-skillsWrote 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/skills/richfrem/agent-plugins-skills/vector-db-cleanup)<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/vector-db-cleanup"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/vector-db-cleanup.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.00115 | $0.00505 |
| Opus 5 | $0.00057 | $0.00253 |
| Sonnet 5 | $0.00023 | $0.00101 |
| Haiku 4.5 | $0.00012 | $0.00051 |
Grade A, and why
vector-db-cleanup 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.
What it actually says
Dependencies
This skill requires the chromadb and langchain packages defined in the plugin root.
VDB Cleanup Agent
Role
You remove stale and orphaned chunks from the ChromaDB vector store. A chunk is stale when its source file no longer exists on disk. Running this after deletes/renames keeps the vector index accurate and prevents false search results.
This is a write (delete) operation.
When to Run
- After deleting or renaming files that were previously ingested.
- After a major refactor that moved directories.
- When
query.pyreturns results pointing to non-existent files. - Periodically as housekeeping to maintain index health.
Execution Mode
This skill defaults to In-Process mode for zero-latency direct disk access. No background server is required.
Execution Protocol
1. Identify Search Profile
Verify available profiles in .agent/learning/vector_profiles.json. The default profile is usually wiki.
2. Run Cleanup
Note: The --profile flag is mandatory to ensure the correct collection and disk paths are loaded.
python ./scripts/cleanup.py --profile wiki
3. Verify Store Integrity (Optional)
Run the consistency check to verify that remaining facts are still supported.
python ./scripts/vector_consistency_check.py --profile wiki --topic .agent/learning/
Rules
- Profile Sovereignty: Always pass
--profileto ensure the correct semantic space is pruned. - API Integrity: NEVER attempt to delete chunks from the database SQLite files directly. Always use
cleanup.py. - Transparency: State which profile was cleaned and how many chunks were removed.
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/resources/architecture_sequence.mmd 53 B
- assets/resources/deployment_model.mmd 48 B
- assets/resources/rag_design_choices.md 50 B
- assets/resources/stabilizers/README.md 53 B
- assets/resources/stabilizers/vector_consistency_check.md 71 B
- evals/evals.json 935 B
- evals/results.tsv 172 B
- requirements.in 21 B
- requirements.txt 22 B
- scripts/cleanup.py 27 B runs code
- scripts/init.py 24 B runs code
- scripts/query.py 25 B runs code
- scripts/vector_config.py 33 B runs code
- scripts/vector_consistency_check.py 44 B runs code
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.
- 2d ago First seen · 67 lines · 115 tokens per session scan A e72502782151
vector-db-cleanup is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed yesterday), licensed MIT. It adds 115 tokens to every session and 505 once invoked, about $0.0006 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-03.
Other skills, from other repositories
embeddings
Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.
pgvector-semantic-search
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…
postgres-hybrid-text-search
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…
cloudflare-vectorize
Cloudflare Vectorize vector database for semantic search and RAG. Use for vector indexes, embeddings, similarity search, or encountering dimension mismatches, filter errors.
AgentDB Vector Search
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.
laravel-vector-search
Use when implementing semantic/vector search in Laravel 13 with PostgreSQL + pgvector.