upstash-vector-js — Claude Code skill: @upstash/vector SDK
A skill that teaches your agent the @upstash/vector TypeScript SDK: upserting embeddings, similarity search, RAG and semantic caching.
npx skills add upstash/skills --skill upstash-vector-js -a claude-codeWhat upstash-vector-js does
This skill covers @upstash/vector, a serverless vector database for embeddings and semantic search. Your agent gets working code patterns: connecting an index with a url and token, upserting vectors, querying with topK, fetching and deleting records. The bundle includes an SDK method reference (delete, fetch, info, query, range, reset, resumable-query, upsert) plus separate files on namespaces, index structure and metadata filtering.
Indexes come in three flavours: dense, sparse and hybrid. Bring your own embeddings and upsert them directly, or push raw text and let the built-in embedding model compute the vector. Namespaces help when one index holds data for several projects or clients, and metadata filters cut results server-side. Long result sets go through resumable-query.
You need UPSTASH_VECTOR_REST_URL and UPSTASH_VECTOR_REST_TOKEN before anything runs — new Index() throws without them. The skill targets TypeScript and JavaScript, so Python projects get nothing from it.
What it helps with
- upsert embeddings into an index and query them later
- wire a RAG pipeline on top of a vector store
- pick between dense, sparse and hybrid indexes
- split tenants into namespaces instead of separate indexes
- filter results by metadata server-side
Example prompts for the agent
- Connect @upstash/vector and upsert this array of vectors with metadata
- Run a similarity search and return the 5 closest matches
- Organize the data into namespaces per client
How to install upstash-vector-js
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-vector-js -a claude-code2Manually: put the files in place
~/.claude/skills/upstash-vector-js/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/upstash-vector-js/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-vector-js -a codex2Manually: put the files in place
.agents/skills/upstash-vector-js/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-vector-js -a cursor2Manually: put the files in place
.cursor/skills/upstash-vector-js/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install upstash/skills upstash-vector-js2Manually: put the files in place
.github/skills/upstash-vector-js/SKILL.md1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-vector-js -a gemini-cli2Platform CLI
gemini skills install https://github.com/upstash/skills --path skills/upstash-vector-jsManually: put the files in place
.devin/skills/upstash-vector-js/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-vector-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-vector-js
How do I install upstash-vector-js in Claude?
Run npx skills add upstash/skills --skill upstash-vector-js -a claude-code. The skill lands at ~/.claude/skills/upstash-vector-js/SKILL.md.
What does upstash-vector-js do?
It gives your agent a reference for the @upstash/vector SDK: upserting and deleting vectors, similarity search, metadata filters, namespaces and resumable queries.
What do I need before using it?
An Upstash Vector index plus the UPSTASH_VECTOR_REST_URL and UPSTASH_VECTOR_REST_TOKEN environment variables that the Index constructor reads.
Source text
SKILL.md · MIT
---
name: upstash-vector-js
description: Work with the @upstash/vector TypeScript/JavaScript SDK, a serverless vector database for embeddings, similarity search, semantic search, and RAG (retrieval-augmented generation). Use when upserting, querying, fetching, ranging, or deleting vectors, upserting raw text against an index with a built-in embedding model, choosing dense, sparse, or hybrid indexes, filtering by metadata, organizing data with namespaces, running resumable queries, or connecting Upstash Vector to an AI or LLM application. Also use when the user asks for a vector store, vector search, nearest-neighbor or kNN search, embeddings storage, semantic cache, recommendations or similarity features, or a hosted vector index that needs no infrastructure.
license: MIT
metadata:
author: Upstash
homepage: https://upstash.com
---
# Vector Documentation Skill
## Quick Start
Vector is a high‑performance vector database for storing, querying, and managing vector embeddings.
Basic workflow:
- Install the Vector TS SDK.
- Connect to a Vector instance.
- Upsert vectors, query them, and manage namespaces.
Example (TypeScript):
```ts
import { Index } from "@upstash/vector";
const index = new Index({
url: process.env.UPSTASH_VECTOR_REST_URL!,
token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
});
await index.upsert([{ id: "1", vector: [0.1, 0.2], metadata: { tag: "example" } }]);
const results = await index.query({
vector: [0.1, 0.2],
topK: 5,
});
```
For full usage, refer to the linked skill files below.
## Other Skill Files
### TS SDK Reference
- `sdk-methods`: Explains SDK commands: delete, fetch, info, query, range, reset, resumable-query, upsert
### Features
- `features/namespaces`: Explains namespaces and dataset organization.
- `features/index-structure`: Covers hybrid and sparse index structures.
- `features/filtering-and-metadata`: Details metadata storage and server-side filtering.
Use these files for deeper guidance on SDK usage, advanced configurations, algorithms, and integrations.
© Upstash · MIT · upstash/skills