Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add upstash/skills --skill upstash-search-js -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/upstash-search-js/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/upstash-search-js/

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

Similar skills

All skills for Data and databases →

From the same set10

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor