vercel/vercel-plugin/queues
Claude Code and agent skill by vercel/vercel-plugin
- vendor
Checking that the SKILL.md file is still in the repository.
Vercel Queues guidance — durable topics with at-least-once delivery, independent consumer groups, retries, delays, and idempotency keys via @vercel/queue (JS) or vercel-queue (Python). Use when deferring background work, buffering traffic, fanning out events, or choosing between Queues and Workflows.
Install
npx vskill@latest install vercel/vercel-plugin/queuesSKILL.md
The same SKILL.md was published earlier as vercel/vercel-plugin/queues.
Vercel Queues
You are an expert in Vercel Queues, the durable message topics that power background work and agent events on Vercel.
What It Is
Vercel Queues (public beta) gives you durable, append-only topics. Producers publish JSON messages, and every subscribed consumer group receives every message with at-least-once delivery and automatic retries. New consumer groups can join later and replay non-expired history. Queues is the primitive under Vercel Workflows; use Queues directly when you need control over publishing, consumption, and routing.
- Topic: a named durable log of messages, created on first publish
- Consumer group: an independent subscriber that receives every message on a topic
- Delivery: at-least-once; handlers must be idempotent
- Retention: 24 hours by default, up to 7 days; delivery can be delayed up to the retention period
- Modes: push (Vercel invokes your function) or poll (your own workers pull messages from any environment)
Choose Queues or Workflows
| Need | Use | Why | |
|---|---|---|---|
| Fire-and-forget background job, fan-out, buffering | Queues | Direct publish/consume, independent consumer groups | |
| Multi-step logic with sleep, hooks, or human approval | Workflows (⤳ skill: workflow) | Durable steps and replay built on top of Queues | |
| Scheduled invocation on a cron or once at a set time | Vercel Schedules (⤳ skill: vercel-schedules); a schedule can publish to a queue topic | Time-based trigger, not message-based; beta, replaces legacy Cron Jobs |
Quickstart (Next.js App Router)
Install the SDK:
Publish from any route, Server Action, or function:
Consume with a push-mode handler. Messages are acknowledged when the handler returns and retried when it throws:
Register the consumer in vercel.json (or vercel.ts) so Vercel routes the topic to that function:
Run vercel link and vercel env pull before local development so the SDK can authenticate.
Send Options
Create a QueueClient when you need defaults, a fixed region, or multiple clients:
Consumer Options and Retries
handleCallback(handler, options) accepts:
| Option | Default | Notes | |||
|---|---|---|---|---|---|
visibilityTimeoutSeconds | 300 | How long a message stays in flight; the SDK re-extends the lease while the handler runs | |||
retry | trigger retryAfterSeconds (60s) | `(error, metadata) => { afterSeconds } \ | { acknowledge: true } \ | undefined` |
Handle poison messages by acknowledging after a delivery-count threshold:
metadata includes messageId, deliveryCount, createdAt, expiresAt, topicName, consumerGroup, and region.
For Express, Connect, or Next.js Pages Router handlers use queue.handleNodeCallback(async (message, metadata) => ...) from a QueueClient instance, which takes (req, res).
Other Runtimes and Frameworks
- Python:
vercel-queuepublishes and consumes with the same topic model, and FastAPI, Flask, and Django apps can use it; Celery and Dramatiq integrations are documented under the Python backend frameworks. - Nitro / Nuxt: declare
vercel.queues.triggersinnitro.config.tsand handle messages with thevercel:queueruntime hook;sendfrom@vercel/queueworks in any server route. - Poll mode: pull messages from your own workers in any environment when push delivery to a Vercel Function does not fit. On Vercel, run an always-on poll-mode consumer as a daemon (
⤳ skill: daemons). - Payloads: JSON by default; use
BufferTransportfor binary orStreamTransportfor large bodies when constructing aQueueClient.
Errors
@vercel/queue exports typed errors: UnauthorizedError, BadRequestError, and MessageNotFoundError. QueueEmptyError is exported but never thrown; an empty poll-mode receive returns { ok: false, reason: 'empty' }. Duplicate idempotency keys do not throw; the duplicate is silently dropped.
Common Pitfalls
- Missing trigger: a
handleCallbackroute with noexperimentalTriggersentry never receives messages. Register every consumer invercel.json/vercel.ts. - Non-idempotent handlers: delivery is at-least-once. Key side effects on
metadata.messageIdor your ownidempotencyKey. - Retrying forever: without a
retrypolicy that acknowledges poison messages or a triggermaxDeliveriescap, a permanently failing message is redelivered until it expires. - Using Queues for multi-step logic: if you need sleep, hooks, or approvals between steps, use Workflows instead of chaining topics by hand.
- Local dev without credentials: run
vercel linkandvercel env pullfirst; otherwisesend()throwsFailed to get OIDC token for local development.
References
- 📖 docs: https://vercel.com/docs/queues
- 📖 JS SDK: https://vercel.com/docs/queues/sdk
- 📖 Python SDK: https://vercel.com/docs/queues/python-sdk
- 📖 poll mode: https://vercel.com/docs/queues/poll-mode
- 📖 pricing and limits: https://vercel.com/docs/queues/pricing
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 15 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/queues/SKILL.md
Popularity
- Repository stars
- 290
- Repository forks
- 60
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vercel/vercel-plugin/queues)