upstash-qstash-js — Claude Code skill for QStash queues and cron
A skill for the @upstash/qstash SDK: publishing messages, queues, cron schedules, delayed delivery and webhook signature checks. Useful when you have no long-running worker.
npx skills add upstash/skills --skill upstash-qstash-js -a claude-codeWhat upstash-qstash-js does
The skill covers the TypeScript/JavaScript SDK @upstash/qstash — an HTTP message queue and task scheduler. Its files walk through publishing to endpoints and URL groups, schedules, FIFO queues with configurable parallelism, delayed delivery, callbacks, DLQ handling and deduplication. Signature verification gets its own section, built around the Receiver class, with variants for Next.js App Router, Pages Router and Edge Runtime.
Local development is covered too: the dev server starts automatically with devMode: true. A verification script for multi-region env variables ships alongside the region migration docs, and it runs without arguments. Supported platforms include Next.js, Cloudflare Workers, Deno, Node.js v18+, Vercel Edge Runtime, SvelteKit, Nuxt and SolidJS.
Tokens and signing keys belong in environment variables — the skill says so, and it's the right call. If you're chaining many steps with state and automatic retries, you want the separate @upstash/workflow package instead; this skill sticks to core messaging.
Install with npx skills add upstash/skills --skill upstash-qstash-js -a claude-code. The SDK itself is a separate step: npm install @upstash/qstash.
What it helps with
- run a background job without a long-running worker
- set up a cron job in a serverless project
- delay a message until a later time
- build a FIFO queue with bounded parallelism
- verify an incoming QStash webhook signature
Example prompts for the agent
- Publish a message to my endpoint with @upstash/qstash, body { event: "user.created" }
- Add a cron schedule for this job and configure retries on failure
- Verify the QStash webhook signature in a Next.js App Router route
How to install upstash-qstash-js
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-qstash-js -a claude-code2Manually: put the files in place
~/.claude/skills/upstash-qstash-js/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/upstash-qstash-js/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-qstash-js -a codex2Manually: put the files in place
.agents/skills/upstash-qstash-js/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-qstash-js -a cursor2Manually: put the files in place
.cursor/skills/upstash-qstash-js/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install upstash/skills upstash-qstash-js2Manually: put the files in place
.github/skills/upstash-qstash-js/SKILL.md1Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-qstash-js -a gemini-cli2Platform CLI
gemini skills install https://github.com/upstash/skills --path skills/upstash-qstash-jsManually: put the files in place
.devin/skills/upstash-qstash-js/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add upstash/skills --skill upstash-qstash-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-qstash-js
How do I install upstash-qstash-js in Claude?
Run npx skills add upstash/skills --skill upstash-qstash-js -a claude-code. The skill file lands at ~/.claude/skills/upstash-qstash-js/SKILL.md.
What does upstash-qstash-js do?
It guides the agent through writing code against the @upstash/qstash SDK: HTTP message publishing, queues, schedules, delayed delivery, callbacks, DLQ and deduplication. Webhook signature verification is covered as well.
How is this different from the QStash Workflow SDK?
This skill is about core messaging. Multi-step processes with state management and automatic retries need the separate @upstash/workflow package.
Source text
SKILL.md · MIT
---
name: upstash-qstash-js
description: Work with the @upstash/qstash TypeScript/JavaScript SDK, an HTTP-based message queue, task scheduler, and background job system for serverless and edge runtimes (Next.js, Vercel, Cloudflare Workers, Deno, Node.js). Use when publishing messages to HTTP endpoints or URL groups, running background jobs without a long-running worker process, scheduling with cron expressions, delaying messages, building FIFO queues with parallelism and flow control, configuring retries and callbacks, handling a dead letter queue (DLQ), deduplicating messages, fanning out to multiple endpoints, verifying QStash webhook signatures (Next.js App Router, Pages Router, and Edge Runtime), running a local QStash dev server, or migrating regions. Also use when the user asks for a serverless cron job, async task queue, job scheduler, delayed delivery, webhook delivery with retries, or event-driven messaging between services.
license: MIT
metadata:
author: Upstash
homepage: https://upstash.com
---
# QStash JavaScript SDK
QStash is an HTTP-based messaging and scheduling solution for serverless and edge runtimes. This skill helps you use the QStash JS SDK effectively.
## When to use this skill
Use this skill when:
- Publishing HTTP messages to endpoints or URL groups
- Creating scheduled or delayed message delivery
- Managing FIFO queues with configurable parallelism
- Verifying incoming webhook signatures from QStash
- Implementing callbacks, DLQ handling, or message deduplication
## Quick Start
### Installing the SDK
```bash
npm install @upstash/qstash
```
### Basic Publishing
```typescript
import { Client } from "@upstash/qstash";
const client = new Client({
token: process.env.QSTASH_TOKEN!,
});
const result = await client.publishJSON({
url: "https://my-api.example.com/webhook",
body: { event: "user.created", userId: "123" },
});
```
## Core Concepts
For fundamental QStash operations, see:
- [Publishing Messages](fundamentals/publishing-messages.md)
- [Schedules](fundamentals/schedules.md)
- [Queues and Flow Control](fundamentals/queues-and-flow-control.md)
- [URL Groups](fundamentals/url-groups.md)
- [Local Development](fundamentals/local-development.md) — automatic dev server via `devMode: true`
For verifying incoming messages:
- [Receiver Verification](verification/receiver.md) - Core signature verification with the Receiver class
- Platform-Specific Verifiers:
- [Next.js](verification/platform-specific/nextjs.md) - App Router, Pages Router, and Edge Runtime
For advanced features:
- [Callbacks](advanced/callbacks.md)
- [Dead Letter Queue (DLQ)](advanced/dlq.md)
- [Message Deduplication](advanced/deduplication.md)
- [Region migration & multi-region support](advanced/multi-region/summary.md)
- If needed, [multi-region env variable setup verification script](advanced/multi-region/verify-multi-region-setup.ts). Can be run without arguments
## Platform Support
QStash JS SDK works across various platforms:
- Next.js (App Router and Pages Router)
- Cloudflare Workers
- Deno
- Node.js (v18+)
- Vercel Edge Runtime
- SvelteKit, Nuxt, SolidJS, and other frameworks
> **Note on Workflow SDK:** For building complex durable workflows that chain multiple QStash messages together, consider using the separate QStash Workflow SDK (`@upstash/workflow`). The Workflow SDK empowers you to orchestrate multi-step processes with automatic state management, retries, and fault tolerance. This Skills file focuses on the core QStash messaging SDK.
## Best Practices
- Always verify incoming QStash messages using the Receiver class
- Use environment variables for tokens and signing keys
- Set appropriate retry counts and timeouts for your use case
- Use queues for ordered processing with controlled parallelism
- Implement DLQ handling for failed message recovery
© Upstash · MIT · upstash/skills