alicloud-ai-search-opensearch

cinience/alicloud-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-ai-search-opensearch
0 commentsdiscussion
summary

Category: provider

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 <indexTableName>&&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

how to use alicloud-ai-search-opensearch

How to use alicloud-ai-search-opensearch on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add alicloud-ai-search-opensearch
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-ai-search-opensearch

The skills CLI fetches alicloud-ai-search-opensearch from GitHub repository cinience/alicloud-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/alicloud-ai-search-opensearch

Reload or restart Cursor to activate alicloud-ai-search-opensearch. Access the skill through slash commands (e.g., /alicloud-ai-search-opensearch) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.766 reviews
  • Ama Kapoor· Dec 28, 2024

    Registry listing for alicloud-ai-search-opensearch matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ishan Rao· Dec 24, 2024

    Useful defaults in alicloud-ai-search-opensearch — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kwame Brown· Dec 20, 2024

    alicloud-ai-search-opensearch reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ama Jain· Dec 12, 2024

    I recommend alicloud-ai-search-opensearch for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Shikha Mishra· Dec 4, 2024

    alicloud-ai-search-opensearch reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Rahul Santra· Nov 23, 2024

    I recommend alicloud-ai-search-opensearch for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Meera Huang· Nov 19, 2024

    Useful defaults in alicloud-ai-search-opensearch — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Meera Park· Nov 15, 2024

    Registry listing for alicloud-ai-search-opensearch matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Meera Abebe· Nov 11, 2024

    I recommend alicloud-ai-search-opensearch for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Omar Gill· Nov 3, 2024

    alicloud-ai-search-opensearch reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 66

1 / 7