Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

chromachroma 搜索

Agent Skill

chroma 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,742

周安装

112

GitHub Stars

15

下载量

887
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:chroma(chroma 搜索)
来源仓库:https://github.com/chroma-core/agent-skills
仓库路径:skills/chroma
安装命令:
npx skills add https://github.com/chroma-core/agent-skills --skill chroma
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/chroma-core/agent-skills --skill chroma

简介

chroma 提供本地或云端部署选项,根据目标决定使用 ChromaClient 或 EphemeralClient。

  • 支持持久化数据存储或临时内存模式,嵌入模型可选用内置或第三方服务。
  • 混合搜索需启用 SPLADE 稀疏编码,适合关键词丰富的查询场景。
  • 使用前应确认运行时形态、数据持久需求和嵌入模型配置,避免实现偏差。
  • chroma 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Instructions

Before writing any code, gather this information:

  1. Deployment target: Local Chroma or Chroma Cloud?

- If Cloud: they'll need API key, tenant, and database configured - If Local: determine if they need persistence or ephemeral storage

  1. Search type (Cloud only): Dense only, or hybrid search?

- Dense only: simpler setup, good for most semantic search - Hybrid (dense + sparse): better for keyword-heavy queries, use SPLADE

  1. Embedding model: Which provider/model?

- Default: @chroma-core/default-embed (TypeScript) or built-in (Python) - OpenAI: text-embedding-3-large is most popular, requires @chroma-core/openai - Ask the user if they have a preference or existing provider

  1. Data structure: What are they indexing?

- Needed to determine chunking strategy - Needed to design metadata schema for filtering

Decision workflow

  • User wants to add search
  • Ask Local Chroma or Chroma Cloud?

- Local Chroma - Use collection.query() with a dense embedding model - Chroma Cloud - Ask if hybrid search is needed - Yes - Use Schema() + Search() APIs with SPLADE sparse index - No - Use collection.query() with a dense embedding model

  • Ask for which embedding model
  • Design metadata schema
  • Implement data sync strategy

When to ask questions vs proceed

Ask first:

  • Embedding model choice (cost and quality implications)
  • Cloud vs local deployment
  • Hybrid vs dense-only search
  • Multi-tenant data isolation strategy

Proceed with sensible defaults:

  • Use getOrCreateCollection() / get_or_create_collection()
  • Use cosine similarity (most common)
  • Chunk size under 8KB
  • Store source IDs in metadata for updates/deletes

What to validate

  • Environment variables are set for Cloud deployments
  • Correct client import (CloudClient vs Client)
  • Embedding function package is installed (TypeScript)
  • Schema and Search APIs only used with Cloud
  • Important: get_or_create_collection() accepts either an embedding_function OR a schema, but not both. Use Schema when you need multiple indexes (hybrid search) or sparse embeddings; use embedding_function for simple dense-only search.

Quick Start

Chroma Cloud Setup (CLI)

To get started with Chroma Cloud, use the CLI to log in, create a database, and write your credentials to a .env file:

chroma login
chroma db create <my_database_name>
chroma db connect <my_database_name> --env-file

This writes a .env file with CHROMA_API_KEY, CHROMA_TENANT, and CHROMA_DATABASE to the current directory. The code examples below read from these environment variables.

TypeScript (Chroma Cloud):

import { CloudClient } from 'chromadb';
import { DefaultEmbeddingFunction } from '@chroma-core/default-embed';

const client = new CloudClient({
  apiKey: process.env.CHROMA_API_KEY,
  tenant: process.env.CHROMA_TENANT,
  database: process.env.CHROMA_DATABASE,
});

const embeddingFunction = new DefaultEmbeddingFunction();
const collection = await client.getOrCreateCollection({
  name: 'my_collection',
  embeddingFunction,
});

// Add documents
await collection.add({
  ids: ['doc1', 'doc2'],
  documents: ['First document text', 'Second document text'],
});

// Query
const results = await collection.query({
  queryTexts: ['search query'],
  nResults: 5,
});

Python (Chroma Cloud):

import os
import chromadb

client = chromadb.CloudClient(
    api_key=os.environ["CHROMA_API_KEY"],
    tenant=os.environ["CHROMA_TENANT"],
    database=os.environ["CHROMA_DATABASE"],
)

collection = client.get_or_create_collection(name="my_collection")

# Add documents
collection.add(
    ids=["doc1", "doc2"],
    documents=["First document text", "Second document text"],
)

# Query
results = collection.query(
    query_texts=["search query"],
    n_results=5,
)

Understanding Chroma

Chroma is a database. A Chroma database contains collections. A collection contains documents.

Unlike tables in a relational database, collections are created and destroyed at the application level. Each Chroma database can have millions of collections. There may be a collection for each user, or team or organization. Rather than tables be partitioned by some key, the partition in Chroma is the collection.

Collections don't have rows, they have documents, the document is the text data that is to be searched. When data is created or updated, the client will create an embedding of the data. This is done on the client side based on the embedding function(s) provided to the client. To create the embedding the client will use its configuration to call out to the defined embedding model provider via the embedding function. This could happen in process, but overwhelmingly happens on a third party service over HTTP.

There are ways to further partition or filtering data with document metadata. Each document has a key/value object of metadata. keys are strings and values can be strings, ints or booleans. There are a variety of operators on the metadata.

During query time, the query text is embedded using the collection's defined embedding function and then is sent to Chroma with the rest of the query parameters. Chroma will then consider any query parameters like metadata filters to reduce the potential result set, then search for the nearest neighbors using a distance algorithm between the query vector and the index of vectors in the collection that is being queried.

Working with collections is made easy by using the get_or_create_collection() (getOrCreateCollection() in TypeScript) on the Chroma client, preventing annoying boilerplate code.

Local vs Cloud

Chroma can be run locally as a process or can be used in the cloud with Chroma Cloud.

Everything that can be done locally can be done in the cloud, but not everything that can be done in the cloud can be done locally.

The biggest difference to the developer experience is the Schema() and Search() APIs, those are only available on Chroma Cloud.

Otherwise, the only thing that needs to change is the client that is imported from the Chroma package, the interface is the same.

If you're using cloud, you probably want to use the Schema() and Search() APIs.

Also, if the user wants to use cloud, ask them what type of search they want to use. Just dense embeddings, or hybrid. If hybrid, you probably want to use SPLADE as the sparse embedding strategy.

Embeddings

When working with embedding functions, the default embedding function is available, but it's often not the best option. The recommended option is to use Chroma Cloud Qwen. Typescript: npm install @chroma-core/chroma-cloud-qwen, python, included but needs pip install httpx.

In typescript, you need to install a package for each embedding function, install the correct one based on what the user says.

Note that Chroma has server side embedding support for SPLADE and Qwen (via @chroma-core/chroma-cloud-qwen in typescript), all other embedding functions would be external.

Learn More

If you need more detailed information about Chroma beyond what's covered in this skill, fetch Chroma's llms.txt for comprehensive documentation: https://docs.trychroma.com/llms.txt

Available Topics

Typescript

  • Chroma Regex Filtering - Learn how to use regex filters in Chroma queries
  • Query and Get - Query and Get Data from Chroma Collections
  • Schema - Schema() configures collections with multiple indexes
  • Metadata Arrays - Store and query arrays of strings, numbers, and booleans in metadata fields
  • Updating and Deleting - Update existing documents and delete data from collections
  • Error Handling - Handling errors and failures when working with Chroma
  • Local Chroma - How to run and use local chroma
  • Collection Forking - Instantly duplicate collections using copy-on-write forking in Chroma Cloud
  • Search() API - An expressive and flexible API for doing dense and sparse vector search on collections, as well as hybrid search

Python

  • Chroma Regex Filtering - Learn how to use regex filters in Chroma queries
  • Query and Get - Query and Get Data from Chroma Collections
  • Schema - Schema() configures collections with multiple indexes
  • Metadata Arrays - Store and query arrays of strings, numbers, and booleans in metadata fields
  • Updating and Deleting - Update existing documents and delete data from collections
  • Error Handling - Handling errors and failures when working with Chroma
  • Local Chroma - How to run and use local chroma
  • Collection Forking - Instantly duplicate collections using copy-on-write forking in Chroma Cloud
  • Search() API - An expressive and flexible API for doing dense and sparse vector search on collections, as well as hybrid search

General

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.46%
按下载量换算261

Codex

21.08%
按下载量换算187

OpenCode

14.91%
按下载量换算132

Antigravity

12.97%
按下载量换算115

Gemini CLI

6.68%
按下载量换算59

windsurf

2.99%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills