/core:indexingfrom core
Use when user needs to create collections, indexes in Milvus. Triggers on: indexing, collection, create index, HNSW, IVF, schema, Milvus collection, vector storage.
Ships in core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create Collections and indexes in Milvus.
| Data Scale | Recommended Index | Features |
|---|---|---|
| <1M | HNSW | High precision, high memory |
| 1M-10M | IVF_FLAT | Balanced |
| >10M | IVF_PQ | Compressed storage |
| Need exact | FLAT | Brute force search |
from pymilvus import MilvusClient, DataType
# Connect (use local file or remote server)
client = MilvusClient(uri="./milvus.db") # Local file
# client = MilvusClient(uri="http://localhost:19530") # Docker/Server
# Create schema
schema = client.create_schema(auto_id=True, enable_dynamic_field=True)
schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
schema.add_field(field_name="text", datatype=DataType.VARCHAR, max_length=65535)
schema.add_field(field_name="embedding", datatype=DataType.FLOAT_VECTOR, dim=1024)
# Prepare index params
index_params = client.prepare_index_params()
index_params.add_index(field_name="embedding", index_type="HNSW", metric_type="COSINE", params={"M": 16, "efConstruction": 256})
# Create collection with schema and index
client.create_collection(collection_name="my_collection", schema=schema, index_params=index_params)
HNSW (Recommended, <1M data)
index_params = client.prepare_index_params()
index_params.add_index(
field_name="embedding",
index_type="HNSW",
metric_type="COSINE", # or L2, IP
params={"M": 16, "efConstruction": 256}
)
IVF_FLAT (1M-10M)
index_params = client.prepare_index_params()
index_params.add_index(
field_name="embedding",
index_type="IVF_FLAT",
metric_type="L2",
params={"nlist": 1024}
)
IVF_PQ (>10M, memory efficient)
index_params = client.prepare_index_params()
index_params.add_index(
field_name="embedding",
index_type="IVF_PQ",
metric_type="L2",
params={"nlist": 1024, "m": 8, "nbits": 8}
)
# Create partitions
client.create_partition(collection_name="my_collection", partition_name="2024_01")
client.create_partition(collection_name="my_collection", partition_name="2024_02")
# Insert with partition
client.insert(collection_name="my_collection", data=data, partition_name="2024_01")
# Search with partition
client.search(collection_name="my_collection", data=query_embedding, partition_names=["2024_01"], limit=10)
# Add scalar index to index_params (speeds up filtering)
index_params = client.prepare_index_params()
index_params.add_index(field_name="embedding", index_type="HNSW", metric_type="COSINE")
index_params.add_index(field_name="category", index_type="AUTOINDEX") # Scalar index
| Type | Use Case | Notes |
|---|---|---|
| COSINE | Text similarity | Normalized vectors |
| L2 | Euclidean distance | General purpose |
| IP | Inner product | Recommendation systems |
After index creation:
core:data-ingestionWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zilliztech/milvus-marketplace --plugin core7 skills in this plugin
/chunkingUse when user needs to split documents into chunks for RAG or search. Triggers on: chunking, split, chunk size, text splitter, token limit, overlap./embeddingUse when user needs to convert text/images to vectors. Triggers on: embedding, vectorize, encode, text-to-vector, model selection, sentence-transformers, OpenAI embeddings, BGE, CLIP./local-setupUse when user needs to set up Milvus locally. Triggers on: local setup, install milvus, docker, docker-compose, dev environment, milvus standalone, milvus lite.Other plugins' skills for the same job