About qstash-js
A skill for developers using the QStash JavaScript SDK to publish and schedule HTTP messages, manage queues, and handle delivery verification and failures. It covers core messaging operations across documented JavaScript runtimes.
Key features
- 01Publish messages to endpoints and URL groups
- 02Schedule or delay message delivery
- 03Manage FIFO queues and parallelism
- 04Verify webhook signatures
- 05Handle callbacks, DLQs, and deduplication
Use cases
- 01Schedule HTTP messages for later delivery
- 02Process ordered messages with controlled parallelism
- 03Verify incoming QStash webhooks
- 04Recover failed deliveries through a DLQ
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ upstash/ qstash-js --skill qstash-jsAfter installing, type/qstash-jsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
advanced/callbacks.mddeduplication.mddlq.mdadvanced/multi-region.md/summary.mdverify-multi-region-setup.tsfundamentals/publishing-messages.mdqueues-and-flow-control.mdschedules.mdurl-groups.mdverification/receiver.mdverification/platform-specific/nextjs.mdDetails
From the project READMEQStash 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
npm install @upstash/qstash
Basic Publishing
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:
For verifying incoming messages:
- Receiver Verification - Core signature verification with the Receiver class
- Platform-Specific Verifiers:
- Next.js - App Router, Pages Router, and Edge Runtime
For advanced features:
- Callbacks
- Dead Letter Queue (DLQ)
- Message Deduplication
- Region migration & multi-region support
- If needed, multi-region env variable setup verification script. 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