Skip to content
Back to skills

Alicloud Ai Search Milvus

ASecurity

Use AliCloud Milvus (serverless) with PyMilvus to create collections, insert vectors, and run filtered similarity search. Optimized for Claude Code/Codex vector retrieval flows.

  • 21 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
ai-agentspythongobashapi

Works with

  • claude code
  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill alicloud-ai-search-milvus --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Alicloud Ai Search Milvus?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Alicloud Ai Search Milvus
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-alicloud-ai-search-milvus/badge)](https://www.skillsdirectory.com/skills/modbender-alicloud-ai-search-milvus)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: alicloud-ai-search-milvus
description: Use AliCloud Milvus (serverless) with PyMilvus to create collections, insert vectors, and run filtered similarity search. Optimized for Claude Code/Codex vector retrieval flows.
---

Category: provider

# AliCloud Milvus (Serverless) via PyMilvus

This skill uses standard PyMilvus APIs to connect to AliCloud Milvus and run vector search.

## Prerequisites

- Install SDK (recommended in a venv to avoid PEP 668 limits):

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pymilvus
```
- Provide connection via environment variables:
  - `MILVUS_URI` (e.g. `http://<host>:19530`)
  - `MILVUS_TOKEN` (`<username>:<password>`)
  - `MILVUS_DB` (default: `default`)

## Quickstart (Python)

```python
import os
from pymilvus import MilvusClient

client = MilvusClient(
    uri=os.getenv("MILVUS_URI"),
    token=os.getenv("MILVUS_TOKEN"),
    db_name=os.getenv("MILVUS_DB", "default"),
)

# 1) Create a collection
client.create_collection(
    collection_name="docs",
    dimension=768,
)

# 2) Insert data
items = [
    {"id": 1, "vector": [0.01] * 768, "source": "kb", "chunk": 0},
    {"id": 2, "vector": [0.02] * 768, "source": "kb", "chunk": 1},
]
client.insert(collection_name="docs", data=items)

# 3) Search
query_vectors = [[0.01] * 768]
res = client.search(
    collection_name="docs",
    data=query_vectors,
    limit=5,
    filter='source == "kb" and chunk >= 0',
    output_fields=["source", "chunk"],
)
print(res)
```

## Script quickstart

```bash
python skills/ai/search/alicloud-ai-search-milvus/scripts/quickstart.py
```

Environment variables:

- `MILVUS_URI`
- `MILVUS_TOKEN`
- `MILVUS_DB` (optional)
- `MILVUS_COLLECTION` (optional)
- `MILVUS_DIMENSION` (optional)

Optional args: `--collection`, `--dimension`, `--limit`, `--filter`.

## Notes for Claude Code/Codex

- Insert is async; wait a few seconds before searching newly inserted data.
- Keep vector `dimension` aligned with your embedding model.
- Use filters to enforce tenant scoping or dataset partitions.

## Error handling

- Auth errors: check `MILVUS_TOKEN` and instance permissions.
- Dimension mismatch: ensure all vectors match collection dimension.
- Network errors: verify VPC/public access settings on the instance.

## References

- PyMilvus `MilvusClient` examples for AliCloud Milvus

- Source list: `references/sources.md`

Files in this skill

  • SKILL.md2.4 KB
  • agents/openai.yaml223 B
  • references/sources.md110 B
  • scripts/quickstart.py1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.