← 返回 Skills 市场
cinience

Alicloud Ai Search Opensearch

作者 cinience · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ⚠ suspicious
1154
总下载
0
收藏
2
当前安装
4
版本数
在 OpenClaw 中安装
/install alicloud-ai-search-opensearch
功能描述
Use OpenSearch vector search edition via the Python SDK (ha3engine) to push documents and run HA/SQL searches. Ideal for RAG and vector retrieval pipelines i...
使用说明 (SKILL.md)

Category: provider

OpenSearch Vector Search Edition

Use the ha3engine SDK to push documents and execute HA/SQL searches. This skill focuses on API/SDK usage only (no console steps).

Prerequisites

  • Install SDK (recommended in a venv to avoid PEP 668 limits):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud-ha3engine
  • Provide connection config via environment variables:
    • OPENSEARCH_ENDPOINT (API domain)
    • OPENSEARCH_INSTANCE_ID
    • OPENSEARCH_USERNAME
    • OPENSEARCH_PASSWORD
    • OPENSEARCH_DATASOURCE (data source name)
    • OPENSEARCH_PK_FIELD (primary key field name)

Quickstart (push + search)

import os
from alibabacloud_ha3engine import models, client
from Tea.exceptions import TeaException, RetryError

cfg = models.Config(
    endpoint=os.getenv("OPENSEARCH_ENDPOINT"),
    instance_id=os.getenv("OPENSEARCH_INSTANCE_ID"),
    protocol="http",
    access_user_name=os.getenv("OPENSEARCH_USERNAME"),
    access_pass_word=os.getenv("OPENSEARCH_PASSWORD"),
)
ha3 = client.Client(cfg)

def push_docs():
    data_source = os.getenv("OPENSEARCH_DATASOURCE")
    pk_field = os.getenv("OPENSEARCH_PK_FIELD", "id")

    documents = [
        {"fields": {"id": 1, "title": "hello", "content": "world"}, "cmd": "add"},
        {"fields": {"id": 2, "title": "faq", "content": "vector search"}, "cmd": "add"},
    ]
    req = models.PushDocumentsRequestModel({}, documents)
    return ha3.push_documents(data_source, pk_field, req)


def search_ha():
    # HA query example. Replace cluster/table names as needed.
    query_str = (
        "config=hit:5,format:json,qrs_chain:search"
        "&&query=title:hello"
        "&&cluster=general"
    )
    ha_query = models.SearchQuery(query=query_str)
    req = models.SearchRequestModel({}, ha_query)
    return ha3.search(req)

try:
    print(push_docs().body)
    print(search_ha())
except (TeaException, RetryError) as e:
    print(e)

Script quickstart

python skills/ai/search/alicloud-ai-search-opensearch/scripts/quickstart.py

Environment variables:

  • OPENSEARCH_ENDPOINT
  • OPENSEARCH_INSTANCE_ID
  • OPENSEARCH_USERNAME
  • OPENSEARCH_PASSWORD
  • OPENSEARCH_DATASOURCE
  • OPENSEARCH_PK_FIELD (optional, default id)
  • OPENSEARCH_CLUSTER (optional, default general)

Optional args: --cluster, --hit, --query.

SQL-style search

from alibabacloud_ha3engine import models

sql = "select * from \x3CindexTableName>&&kvpair=trace:INFO;formatType:json"
sql_query = models.SearchQuery(sql=sql)
req = models.SearchRequestModel({}, sql_query)
resp = ha3.search(req)
print(resp)

Notes for Claude Code/Codex

  • Use push_documents for add/delete updates.
  • Large query strings (>30KB) should use the RESTful search API.
  • HA queries are fast and flexible for vector + keyword retrieval; SQL is helpful for structured data.

Error handling

  • Auth errors: verify username/password and instance access.
  • 4xx on push: check schema fields and pk_field alignment.
  • 5xx: retry with backoff.

Validation

mkdir -p output/alicloud-ai-search-opensearch
for f in skills/ai/search/alicloud-ai-search-opensearch/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-ai-search-opensearch/validate.txt

Pass criteria: command exits 0 and output/alicloud-ai-search-opensearch/validate.txt is generated.

Output And Evidence

  • Save artifacts, command outputs, and API response summaries under output/alicloud-ai-search-opensearch/.
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.

Workflow

  1. Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
  2. Run one minimal read-only query first to verify connectivity and permissions.
  3. Execute the target operation with explicit parameters and bounded scope.
  4. Verify results and save output/evidence files.

References

  • SDK package: alibabacloud-ha3engine

  • Demos: data push and HA/SQL search demos in OpenSearch docs

  • Source list: references/sources.md

安全使用建议
This skill legitimately needs Alibaba Cloud OpenSearch credentials (endpoint, instance id, username/password, datasource) even though the registry metadata omits them — that inconsistency is the main red flag. Before installing: 1) Only provide credentials with the minimal permissions needed (prefer a read-only account for testing); 2) Run the skill in an isolated environment (venv, limited network) and review outputs written to output/alicloud-ai-search-opensearch/ because API responses may include sensitive identifiers or content; 3) Verify the alibabacloud-ha3engine package source and pin its version; 4) Correctly populate registry/automation with the required env var declarations or refuse to install until metadata matches the SKILL.md. If you cannot confirm the origin of this skill or cannot limit credentials, treat it as higher risk.
功能分析
Type: OpenClaw Skill Name: alicloud-ai-search-opensearch Version: 1.0.3 The skill bundle provides legitimate functionality for interacting with Alibaba Cloud OpenSearch using the official 'alibabacloud-ha3engine' SDK. The code in SKILL.md and scripts/quickstart.py follows standard practices for cloud API integration, including credential management via environment variables and basic error handling, with no evidence of malicious intent or data exfiltration.
能力评估
Purpose & Capability
The code and SKILL.md align with the stated purpose: they use the alibabacloud-ha3engine SDK to push documents and run HA/SQL searches on OpenSearch. However, the registry metadata lists no required environment variables or primary credential while the SKILL.md and script clearly require multiple OpenSearch credentials (endpoint, instance id, username/password, datasource, etc.). That mismatch is unexpected and should be corrected.
Instruction Scope
The runtime instructions stay within the stated purpose: install the SDK, set OpenSearch env vars, push/search, and save outputs. They do not request unrelated system files or broad context gathering. Note: the examples print API responses and instruct saving evidence files (which may include IDs, responses, or sensitive content).
Install Mechanism
There is no automated install spec (instruction-only). The SKILL.md recommends installing the official pip package alibabacloud-ha3engine in a venv, which is a reasonable approach and lower risk than arbitrary downloads.
Credentials
The env vars required by the SKILL.md (OPENSEARCH_ENDPOINT, OPENSEARCH_INSTANCE_ID, OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD, OPENSEARCH_DATASOURCE, optional PK_FIELD/CLUSTER) are proportionate to the skill's function. The concern is that the skill metadata did not declare any required env vars or primary credential — this inconsistency could confuse permission/secret handling and automation that relies on the registry metadata.
Persistence & Privilege
always is false and the skill does not request persistent or system‑wide privileges. It does not attempt to modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alicloud-ai-search-opensearch
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alicloud-ai-search-opensearch 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
batch publish from alicloud-skills on 2026-03-11
v1.0.2
batch publish from alicloud-skills on 2026-02-13
v1.0.1
Initial ClawHub publish for Alibaba Cloud skills with agents metadata.
v1.0.0
Initial ClawHub publish for Alibaba Cloud skills with agents metadata.
元数据
Slug alicloud-ai-search-opensearch
版本 1.0.3
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 4
常见问题

Alicloud Ai Search Opensearch 是什么?

Use OpenSearch vector search edition via the Python SDK (ha3engine) to push documents and run HA/SQL searches. Ideal for RAG and vector retrieval pipelines i... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1154 次。

如何安装 Alicloud Ai Search Opensearch?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alicloud-ai-search-opensearch」即可一键安装,无需额外配置。

Alicloud Ai Search Opensearch 是免费的吗?

是的,Alicloud Ai Search Opensearch 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alicloud Ai Search Opensearch 支持哪些平台?

Alicloud Ai Search Opensearch 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alicloud Ai Search Opensearch?

由 cinience(@cinience)开发并维护,当前版本 v1.0.3。

💬 留言讨论