Best use case
ChromaDB is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
## Overview
Teams using ChromaDB should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/chromadb/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ChromaDB Compares
| Feature / Agent | ChromaDB | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
## Overview
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ChromaDB
## Overview
ChromaDB is an open-source vector database for storing, searching, and managing embeddings. It provides a simple API for document ingestion, semantic similarity search, and metadata filtering, supporting both Python and JavaScript/TypeScript clients with embedded, server, and cloud deployment options.
## Instructions
- When initializing, use `get_or_create_collection` for idempotent collection setup, choose `PersistentClient` for development and `HttpClient` for production server connections.
- When adding documents, batch `add()` calls in chunks of 5,000 documents, always store source metadata (filename, URL, page number) for RAG citations, and use `upsert()` for incremental updates to avoid duplicates.
- When querying, use `collection.query(query_texts=..., n_results=...)` for text-based search, combine metadata `where` filters to narrow results before semantic search, and set `n_results` based on the LLM's context window (5-10 for most RAG pipelines).
- When choosing embeddings, use the default Sentence Transformers for local development without API keys, OpenAI or Cohere embedding functions for production, or pass pre-computed vectors directly.
- When filtering metadata, use operators like `$eq`, `$gt`, `$in` with `$and`/`$or` logical operators, and combine with `where_document` for content-based filtering alongside semantic similarity.
- When deploying, use the embedded `PersistentClient` for single-node applications, Docker for server mode, or Chroma Cloud for managed hosting with multi-tenancy support.
- When tuning performance, configure HNSW parameters (`hnsw:M`, `hnsw:construction_ef`, `hnsw:search_ef`) for the quality-speed tradeoff and choose `cosine` distance for normalized embeddings (OpenAI, Cohere).
## Examples
### Example 1: Build a document Q&A pipeline
**User request:** "Set up a RAG pipeline with ChromaDB for answering questions about our docs"
**Actions:**
1. Load documents and split into chunks with metadata (source, page)
2. Create a collection with OpenAI embedding function
3. Batch-add document chunks with `upsert()` for idempotent ingestion
4. Query with `collection.query()` and pass retrieved chunks as context to the LLM
**Output:** A semantic search pipeline that retrieves relevant document chunks for LLM-powered Q&A.
### Example 2: Add filtered semantic search to an application
**User request:** "Implement product search that combines text similarity with category filters"
**Actions:**
1. Create a collection with product descriptions and category metadata
2. Implement search combining `query_texts` with `where={"category": "electronics"}`
3. Return results with distances for relevance ranking
4. Add price range filtering with `$gte` and `$lte` operators
**Output:** A filtered semantic search that narrows by metadata before ranking by text similarity.
## Guidelines
- Use `get_or_create_collection` for idempotent collection initialization; it is safe for restarts.
- Batch `add()` calls in chunks of 5,000 documents to manage memory usage.
- Always store source metadata (filename, URL, page number); it is essential for RAG citations.
- Use `upsert()` for incremental updates to avoid duplicate documents when re-ingesting.
- Set `n_results` based on the LLM's context window: 5-10 results for most RAG pipelines.
- Use metadata filtering to narrow results before semantic search to reduce noise.
- Choose `cosine` distance for normalized embeddings (OpenAI, Cohere) and `l2` for unnormalized.Related Skills
Daily Logs
Record the user's daily activities, progress, decisions, and learnings in a structured, chronological format.
Socratic Method: The Dialectic Engine
This skill transforms Claude into a Socratic agent — a cognitive partner who guides
Sokratische Methode: Die Dialektik-Maschine
Dieser Skill verwandelt Claude in einen sokratischen Agenten — einen kognitiven Partner, der Nutzende durch systematisches Fragen zur Wissensentdeckung führt, anstatt direkt zu instruieren.
College Football Data (CFB)
Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.
College Basketball Data (CBB)
Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.
Betting Analysis
Before writing queries, consult `references/api-reference.md` for odds formats, command parameters, and key concepts.
Research Proposal Generator
Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.
Paper Slide Deck Generator
Transform academic papers and content into professional slide deck images with automatic figure extraction.
Medical Imaging AI Literature Review Skill
Write comprehensive literature reviews following a systematic 7-phase workflow.
Meeting Briefing Skill
You are a meeting preparation assistant for an in-house legal team. You gather context from connected sources, prepare structured briefings for meetings with legal relevance, and help track action items that arise from meetings.
Canned Responses Skill
You are a response template assistant for an in-house legal team. You help manage, customize, and generate templated responses for common legal inquiries, and you identify when a situation should NOT use a templated response and instead requires individualized attention.
Copywriting
## Purpose