xiaohongshu
xiaohongshu
chroma-client
ChromaDB vector database client for storing and retrieving text embeddings with hybrid search (dense + sparse). Use for RAG operations, contextual retrieval, and similarity search in clinical notes.
Full skill instructions
This skill provides a Python wrapper for ChromaDB's REST API, enabling vector storage and hybrid search capabilities. It supports automatic embedding generation and BM25-based sparse retrieval for improved citation accuracy.
Use this skill when you need to:
IMPORTANT: This skill has its own isolated virtual environment (.venv) managed by uv. Do NOT use system Python.
Initialize the skill's environment:
# From the skill directory
cd .agent/skills/chroma-client
uv sync # Creates .venv and installs dependencies from pyproject.toml
Dependencies are in pyproject.toml:
chromadb - Vector database clientCRITICAL: Always use uv run to execute code with this skill's .venv, NOT system Python.
# From .agent/skills/chroma-client/ directory
# Run with: uv run python -c "..."
from chroma_client import ChromaClient
# Initialize (uses CHROMA_HOST env var by default)
client = ChromaClient(
host="localhost", # Default from CHROMA_HOST
port=8000 # Default port
)
# Create or get existing collection
collection = client.create_collection(
collection_name="clinical_note_session_123",
metadata={"session_id": "123", "note_type": "cardiology"}
)
# Chunks are automatically embedded by ChromaDB
chunks = [
"Patient presents with chest pain radiating to left arm...",
"History of hypertension for 10 years...",
"Physical exam reveals elevated BP 150/95..."
]
client.add_chunks(
collection_name="clinical_note_session_123",
chunks=chunks,
metadatas=[
{"start_offset": 0, "end_offset": 60},
{"start_offset": 60, "end_offset": 110},
{"start_offset": 110, "end_offset": 165}
],
ids=["chunk_0", "chunk_1", "chunk_2"] # Optional, auto-generated if None
)
# Semantic search with embedding similarity
results = client.query(
collection_name="clinical_note_session_123",
query_text="cardiovascular symptoms",
n_results=5,
where={"note_type": "cardiology"} # Optional metadata filter
)
# Access results
for doc, metadata, distance in zip(
results["documents"],
results["metadatas"],
results["distances"]
):
print(f"Document: {doc}")
print(f"Offset: {metadata['start_offset']}-{metadata['end_offset']}")
print(f"Distance: {distance}")
# Clear collection after processing (HIPAA compliance)
client.clear_collection("clinical_note_session_123")
if client.check_health():
print("ChromaDB server is healthy")
else:
print("ChromaDB server unavailable")
Environment Variables:
CHROMA_HOST: Server URL (default: http://localhost:8000)Parameters:
collection_name: Unique identifier for the collectionn_results: Number of results to return (default: 5)where: Metadata filter dictionary (optional)note_session_{uuid})contextual-chunking skill)Typical workflow:
contextual-chunking skill to prepare chunkscitation-extraction skill to validate alignmentsSee chroma_client.py for the full Python implementation.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience