upstash-search-js — Claude Code skill: @upstash/search setup
A skill that walks your agent through the @upstash/search TypeScript SDK: indexes, documents, keyword, semantic and hybrid queries. Useful when an app needs search.
npx skills add upstash/skills --skill upstash-search-js -a claude-codeWhat upstash-search-js does
This skill documents the @upstash/search TypeScript SDK — a serverless full-text and semantic search database with built-in reranking. Your agent gets working code patterns instead of guessing at the API.
Two reference files ship with it. sdk-overview covers every SDK command: upsert, search, fetch, delete, range, reset, info. quick-start runs the whole path from creating a database to reading results, and explains why content is searchable while metadata is filterable. Filter syntax and common pitfalls live there too.
You need UPSTASH_SEARCH_REST_URL and UPSTASH_SEARCH_REST_TOKEN in your environment, plus the SDK itself via npm install @upstash/search. The client constructor takes both values, so set them before asking the agent to write search code — otherwise you get a runtime error on the first call.
What it helps with
- add site search without running a cluster
- create an index and load documents into it
- split fields into searchable content and filterable metadata
- run a semantic query with reranking
- paginate results with range
Example prompts for the agent
- add docs search with @upstash/search, index named docs
- set up hybrid search over products filtered by category
- show me how to delete a document and reset the index
How to install upstash-search-js
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-search-js -a claude-code2Manually: put the files in place
~/.claude/skills/upstash-search-js/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/upstash-search-js/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-search-js -a codex2Manually: put the files in place
.agents/skills/upstash-search-js/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-search-js -a cursor2Manually: put the files in place
.cursor/skills/upstash-search-js/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install upstash/skills upstash-search-js2Manually: put the files in place
.github/skills/upstash-search-js/SKILL.md1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-search-js -a gemini-cli2Platform CLI
gemini skills install https://github.com/upstash/skills --path skills/upstash-search-jsManually: put the files in place
.devin/skills/upstash-search-js/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-search-js -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about upstash-search-js
How do I install upstash-search-js in Claude?
Run npx skills add upstash/skills --skill upstash-search-js -a claude-code. The skill lands at ~/.claude/skills/upstash-search-js/SKILL.md.
What does upstash-search-js do?
It feeds your agent the TypeScript SDK docs for @upstash/search: creating an index, upserting documents, keyword, semantic and hybrid queries, filters and pagination.
What do I need before using it?
The @upstash/search package installed, plus UPSTASH_SEARCH_REST_URL and UPSTASH_SEARCH_REST_TOKEN set in your environment.
Source text
SKILL.md · MIT
---
name: upstash-search-js
description: Work with the @upstash/search TypeScript/JavaScript SDK, a serverless full-text and semantic search database with built-in reranking. Use when adding search to an app or site, creating a search index, upserting documents with searchable content and filterable metadata, running keyword, semantic, or hybrid search queries, reranking results, filtering with SQL-like or structured filter syntax, paginating with range, fetching or deleting documents, resetting an index, or checking index info. Also use when the user asks for site search, product, document, or knowledge-base search, or a managed search service that needs no cluster to run.
license: MIT
metadata:
author: Upstash
homepage: https://upstash.com
---
# Upstash Search Documentation
## Quick Start
Install the TS SDK:
```
npm install @upstash/search
```
Create a client and perform a simple upsert + search:
```
import { Search } from "@upstash/search";
const client = new Search({ url: process.env.UPSTASH_SEARCH_REST_URL, token: process.env.UPSTASH_SEARCH_REST_TOKEN });
const index = client.index("my-index");
await index.upsert({ id: "1", content: { text: "hello world" } });
const results = await index.search({ query: "hello" });
```
Basic steps:
- Create an index
- Insert or update documents
- Run searches or filtered queries
## Other Skill Files
### sdk-overview
Provides detailed documentation for all TypeScript SDK commands. Includes:
- delete: Deleting documents
- fetch: Retrieving a document
- info: Index info
- range: Range queries
- reset: Clearing an index
- search: Search queries
- upsert: Adding/updating documents
- getting-started: Setup steps for the SDK
### quick-start
Provides a fast, end-to-end workflow for creating a Search database, adding documents, and querying them. Covers essential concepts including:
- Creating a database and storing credentials
- Adding documents with content and metadata
- Understanding content vs metadata (searchability and filterability)
- Performing searches with optional reranking
- Filtering syntax with SQL-like or structured filters
- Common pitfalls and best practices
© Upstash · MIT · upstash/skills