Skip to content
Development
Command

/queue-setup

Interactive wizard to set up Cloudflare Queues with queue creation, producer/consumer binding configuration, and Dead Letter Queue setup. Use when user wants to create first queue or add queues to existing Worker.

From plugin
secondsky-claude-skills
20466 skills46 agents66 commands
Install
$ npx -y skills add secondsky/claude-skills --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/queue-setup

Context preview

What this command does when you run it.

Interactive wizard to set up Cloudflare Queues with queue creation, producer/consumer binding configuration, and Dead Letter Queue setup. Use when user wants to create first queue or add queues to existing Worker.

Command definition

queue-setup.md
name: cloudflare-queues:setup
description: Interactive wizard to set up Cloudflare Queues with queue creation, producer/consumer binding configuration, and Dead Letter Queue setup. Use when user wants to create first queue or add queues to existing Worker.

Queue Setup Wizard

Overview

Interactive wizard for complete Cloudflare Queues setup: create queue, configure producer/consumer bindings, set up DLQ, and provide example code.

Prerequisites

Check before starting:

  • Cloudflare account with wrangler authenticated (`wrangler whoami`)
  • Existing Worker project or willingness to create one
  • Write access to wrangler.jsonc/wrangler.toml

Steps

Step 1: Gather Requirements

Use AskUserQuestion to collect setup preferences.

**Question 1: Queue Name**

  • Header: "Queue Name"
  • Question: "What should the queue be named?"
  • multiSelect: false
  • Options:
  • Label: "Descriptive name (e.g., order-processing)"

Description: "Describes what the queue processes"

  • Label: "Environment-specific (e.g., prod-notifications)"

Description: "Includes environment in the name"

  • Store user response as: `queueName`
  • If user provides custom text, validate: alphanumeric + hyphens only

**Question 2: Queue Purpose**

  • Header: "Purpose"
  • Question: "What will this queue be used for?"
  • multiSelect: false
  • Options:
  • Label: "Producer only (send messages from Worker)"

Description: "Worker will send messages to queue, consumed elsewhere"

  • Label: "Consumer only (process messages in Worker)"

Description: "Worker will process messages from queue"

  • Label: "Both producer and consumer (Recommended)"

Description: "Worker will both send and process messages"

  • Store as: `queuePurpose`

**Question 3: Consumer Settings** (if purpose includes consumer)

  • Header: "Consumer"
  • Question: "Which consumer settings?"
  • multiSelect: false
  • Options:
  • Label: "Standard (batch: 10, retries: 3, concurrency: 1) (Recommended)"

Description: "Balanced settings for most use cases"

  • Label: "High throughput (batch: 50, retries: 1, concurrency: 5)"

Description: "Fast processing for high-volume queues"

  • Label: "Low latency (batch: 1, retries: 3, concurrency: 1)"

Description: "Minimal delay for time-sensitive messages"

  • Label: "Custom (I'll specify)"

Description: "Provide your own batch size, retries, concurrency"

  • Store as: `consumerSettings`
  • If "Custom" selected, ask follow-up for batch_size, max_retries, max_concurrency

**Question 4: Dead Letter Queue**

  • Header: "DLQ"
  • Question: "Enable Dead Letter Queue for failed messages?"
  • multiSelect: false
  • Options:
  • Label: "Yes - Recommended for production"

Description: "Captures failed messages after max retries"

  • Label: "No - Skip for now"

Description: "Can add later if needed"

  • Store as: `enableDLQ`

---

Step 2: Create Queue

Execute wrangler command based on user inputs:

# Create main queue
wrangler queues create <queueName>

**Capture output**: Extract queue creation confirmation

**Error Handling**:

  • If "not authenticated" → Run `wrangler login` first, then retry
  • If "queue already exists" → Ask user:
  • Use existing queue?
  • Choose different name?
  • If "limit reached" → Check free tier limit (10 queues), suggest:
  • Upgrade to Workers Paid ($5/month) → unlimited queues
  • Delete unused queues: `wrangler queues list` then `wrangler queues delete <name>`
  • Consolidate into fewer queues

**Verify creation**:

wrangler queues list

---

Step 3: Create Dead Letter Queue (if enabled)

If `enableDLQ` is true:

# Create DLQ
wrangler queues create <queueName>-dlq

**Verify**:

wrangler queues list

---

Step 4: Configure Producer Binding (if needed)

If `queuePurpose` includes "Producer":

Check if wrangler.jsonc or wrangler.toml exists:

if [ -f "wrangler.jsonc" ]; then
  CONFIG_FILE="wrangler.jsonc"
elif [ -f "wrangler.toml" ]; then
  CONFIG_FILE="wrangler.toml"
else
  # Ask user which format to create
  CONFIG_FILE="wrangler.jsonc"  # Default to JSON
fi

**Add Producer Configuration**:

**If wrangler.jsonc**: Use Edit tool to add to `queues.producers` array (or create array if doesn't exist):

{
  "queues": {
    "producers": [
      {
        "binding": "<QUEUE_BINDING>",  // e.g., "ORDER_QUEUE"
        "queue": "<queueName>"          // e.g., "order-processing"
      }
    ]
  }
}

**Binding name suggestion**: Convert queue name to SCREAMING_SNAKE_CASE

  • Example: "order-processing" → "ORDER_QUEUE"
  • Example: "notifications" → "NOTIFICATIONS"

**If wrangler.toml**:

[[queues.producers]]
binding = "<QUEUE_BINDING>"
queue = "<queueName>"

**Verify**:

# Show configuration to user
cat wrangler.jsonc | grep -A 10 "queues"

---

Step 5: Configure Consumer Binding (if needed)

If `queuePurpose` includes "Consumer":

**Add Consumer Configuration** based on `consumerSettings`:

**Standard settings** (batch: 10, retries: 3, concurrency: 1):

{
  "queues": {
    "consumers": [
      {
        "queue": "<queueName>",
        "max_batch_size": 10,
        "max_retries": 3,
        "max_concurrency": 1,
        "dead_letter_queue": "<queueName>-dlq"  // If DLQ enabled
      }
    ]
  }
}

**High throughput settings** (batch: 50, retries: 1, concurrency: 5):

{
  "queues": {
    "consumers": [
      {
        "queue": "<queueName>",
        "max_batch_size": 50,
        "max_retries": 1,
        "max_concurrency": 5,
        "dead_letter_queue": "<queueName>-dlq"  // If DLQ enabled
      }
    ]
  }
}

**Low latency settings** (batch: 1, retries: 3, concurrency: 1):

{
  "queues": {
    "consumers": [
      {
        "queue": "<queueName>",
        "max_batch_size": 1,
        "max_retries": 3,
        "max_concurrency": 1,
        "dead_letter_queue": "<queueName>-dlq"  // If DLQ enabled
      }
    ]
  }
}

**Custom settings**: Use user-provided values

**Om

Read more
Ships withsecondsky-claude-skills

142 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).

Get the whole plugin, auto-invoked
Stats
204
Stars
0
Views
30
Forks
Active
Maintenance
TypeScript
Language
MIT
License
1h ago
Last commit
9mo ago
Created

Repo: secondsky/claude-skills