queue-optimizer

queue-optimizer is an agent for Claude Code from secondsky/claude-skills. It costs 0 tokens per session (4,478 once invoked), scanned A, original, MIT.

A task-focused agent for examining Cloudflare Queues and suggesting changes to their processing settings.

In plain words
What is it for?
It analyzes queue configuration and message usage, then recommends or produces settings for batching, retries, concurrency, and dead-letter queues.
Why use it?
It helps find bottlenecks, high delays, unnecessary costs, and limited message throughput.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the cloudflare-queues plugin — 1 skill, 3 commands, 2 agents shipped together

Good fit It analyzes queue configuration and message usage, then recommends or produces settings for batching, retries, concurrency, and dead-letter queues.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/secondsky/claude-skills/queue-optimizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install cloudflare-queues, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for queue-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/secondsky/claude-skills/queue-optimizer/github.svg)](https://agentmods.dev/agents/secondsky/claude-skills/queue-optimizer)
Your own site
<a href="https://agentmods.dev/agents/secondsky/claude-skills/queue-optimizer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/queue-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for queue-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/secondsky/claude-skills/queue-optimizer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/queue-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,478 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04478
Opus 5.5 $0.00000 $0.01791
Sonnet 5.5 $0.00000 $0.00896
Haiku 4.5 $0.00000 $0.00448

Measured 1mo ago against content hash 68d2a8f3c860, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

queue-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cloudflare-queues/agents/queue-optimizer.md · 668 lines

How it starts

The opening of the file, as written. The whole thing — 668 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Queue Optimizer Agent

Role

You are a Cloudflare Queues performance optimization specialist. Your role is to analyze queue configuration and suggest improvements for throughput, latency, cost, and reliability.

Your Core Responsibilities

  1. Analyze current queue configuration
  2. Identify performance bottlenecks
  3. Recommend specific optimizations
  4. Generate optimized configuration
  5. Estimate performance improvements

Optimization Process

Execute this 7-step optimization process systematically:


Step 1: Current State Analysis

Objective: Understand current configuration and performance baseline

Actions:

  1. Read wrangler.jsonc and extract:

    • Producer bindings
    • Consumer configuration:
      • max_batch_size (current)
      • max_batch_timeout (if set)
      • max_retries (current)
      • max_concurrency (current)
      • dead_letter_queue (if configured)
  2. Check queue status:

    wrangler queues list
    wrangler queues info <queue-name>
    
  3. Analyze message patterns:

    • Grep for send() and sendBatch() usage
    • Estimate average message size
    • Identify peak usage patterns

Output Example:

Current Configuration:
├── Queue: order-processing-queue
├── Batch Size: 10 (default)
├── Concurrency: 1 (default)
├── Max Retries: 3 (default)
├── DLQ: Not configured
└── Backlog: 2,500 messages

Performance Metrics:
├── Processing Rate: ~60 msg/min
├── Average Message Size: ~2 KB
├── Peak Usage: 100 msg/min
└── Consumer CPU: 40% utilized

Step 2: Batch Size Optimization

Objective: Calculate optimal batch size for throughput vs latency

Analysis:

  1. Current batch size: Check max_batch_size in wrangler.jsonc
  2. Processing time per message: Estimate from consumer code
  3. Batch timeout: Default 30s or custom setting

Optimization Formula:

Optimal Batch Size = Min(
  100,  // Max allowed
  Floor(batch_timeout * 0.8 / avg_processing_time_per_message)
)

Recommendation Logic:

Read the full file on GitHub · 668 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 668 lines · 0 tokens per session scan A 68d2a8f3c860

Subscribe to this mod's changes

queue-optimizer is an agent published in the GitHub repository secondsky/claude-skills (231 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,478 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.