opensearch-vector-search

opensearch-vector-search is a skill for Claude Code, Codex from ibm-self-serve-assets/building-blocks. It costs 93 tokens per session (1,330 once invoked), scanned A, original, Apache-2.0.

A guide for building vector search services with IBM watsonx.data OpenSearch, IBM watsonx.ai embedding models, and IBM Cloud Object Storage. Vector search finds documents by meaning, while keyword search matches written terms.

In plain words
What is it for?
Use it to turn natural-language search requirements into Python 3.12 FastAPI services that ingest documents, create embeddings, build OpenSearch indexes, and perform vector, keyword, or hybrid searches.
Why use it?
It brings document ingestion, meaning-based search, keyword search, and combined search into one defined workflow. It also covers index design, document chunking, authentication, and performance tuning.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to turn natural-language search requirements into Python 3.12 FastAPI services that ingest documents, create embeddings, build OpenSearch indexes, and perform vector, keyword, or hybrid searches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ibm-self-serve-assets/building-blocks --skill opensearch-vector-search
Clone the repo
git clone --depth 1 https://github.com/ibm-self-serve-assets/building-blocks

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opensearch-vector-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search/github.svg)](https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search)
Your own site
<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opensearch-vector-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/opensearch-vector-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,330 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.01330
Opus 5 $0.00046 $0.00665
Sonnet 5 $0.00019 $0.00266
Haiku 4.5 $0.00009 $0.00133

Measured 11d ago against content hash 01ea3a4d23d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

opensearch-vector-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ibm-bob/skills/opensearch-vector-search/SKILL.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

IBM watsonx.data OpenSearch Vector Search Builder

Purpose

This skill defines the complete workflow for building IBM watsonx.data OpenSearch vector search applications using IBM watsonx.ai embeddings and IBM Cloud Object Storage as the document source. Generates deployable Python 3.12 FastAPI services.

IBM Cloud Product Coverage

IBM Cloud Product Usage
IBM watsonx.data (OpenSearch) k-NN vector index, BM25 full-text search, hybrid search
IBM watsonx.ai Embedding generation: ibm/slate-125m-english-rtrvr, ibm/slate-30m-english-rtrvr
IBM Cloud Object Storage Document source bucket with ibm-cos-sdk download
IBM Cloud IAM POST /identity/token (apikey grant) for watsonx.ai auth

Objective

Transform natural language vector search requirements into deployable services that:

  • Create optimised k-NN indexes in IBM watsonx.data OpenSearch
  • Generate embeddings using IBM watsonx.ai models
  • Ingest documents from IBM COS with chunking via unstructured
  • Perform vector, keyword, and hybrid search
  • Follow Python 3.12 best practices with Pydantic v2

Rules

  • Always use ibm_watsonx_ai.foundation_models.Embeddings for IBM embeddings
  • IBM watsonx.ai base URL: https://us-south.ml.cloud.ibm.com (or configured region)
  • Use opensearch-py with SSL/TLS for watsonx.data managed OpenSearch
  • Default embedding model: ibm/slate-125m-english-rtrvr (dim=768)
  • Wrap IBM COS calls with ibm-cos-sdk (IAM OAuth, not HMAC)

Scope

  • IBM watsonx.data OpenSearch k-NN index creation and management
  • IBM watsonx.ai embedding generation for ingestion and query
  • Document ingestion from IBM COS using unstructured
  • k-NN vector search, BM25 keyword search, hybrid search
  • Score normalisation and result reranking

Procedure

Phase 1: IBM watsonx.ai Embeddings

from ibm_watsonx_ai import APIClient, Credentials
from ibm_watsonx_ai.foundation_models import Embeddings

embedder = Embeddings(
    model_id="ibm/slate-125m-english-rtrvr",   # dim=768
    credentials=Credentials(url="https://us-south.ml.cloud.ibm.com", api_key=IBM_API_KEY),
    project_id=WATSONX_PROJECT_ID,
)
vectors = embedder.embed_documents(["text chunk 1", "text chunk 2"])

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 155 lines · 93 tokens per session scan A 01ea3a4d23d9

Subscribe to this mod's changes

opensearch-vector-search is a skill published in the GitHub repository ibm-self-serve-assets/building-blocks (24 stars, last pushed 2d ago), licensed Apache-2.0. It adds 93 tokens to every session and 1,330 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.