cloudflare-workers:debug

cloudflare-workers:debug is a command for coding agents from secondsky/claude-skills. It costs 31 tokens per session (2,383 once invoked), scanned A, original, MIT.

An interactive debugging workflow for Cloudflare Workers, which are server-side programs running on Cloudflare’s network. It helps investigate deployment, build, runtime, binding, authentication, and performance problems.

In plain words
What is it for?
Use it to diagnose failed deployments, Worker crashes, HTTP 500 errors, bundling failures, login issues, slow requests, and problems with services such as D1 or KV.
Why use it?
It turns a vague error or slow response into a specific problem category and a sequence of possible fixes.

Command

Part of the cloudflare-workers plugin — 10 skills, 5 commands, 3 agents shipped together

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.

agentmods
npx agentmods add commands/secondsky/claude-skills/workers-debug
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Or install cloudflare-workers, the plugin that ships this one along with the rest of its 10 skills, 5 commands, 3 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 cloudflare-workers:debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/secondsky/claude-skills/workers-debug.svg)](https://agentmods.dev/commands/secondsky/claude-skills/workers-debug)
Your own site
<a href="https://agentmods.dev/commands/secondsky/claude-skills/workers-debug"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/workers-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,383 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.02383
Opus 5 $0.00015 $0.01192
Sonnet 5 $0.00006 $0.00477
Haiku 4.5 $0.00003 $0.00238

Measured yesterday against content hash b78db88936cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-workers:debug 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 yesterday.

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-workers/commands/workers-debug.md · 377 lines

How it starts

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

Workers Debug Command

Interactive debugging assistant for diagnosing and fixing Cloudflare Workers issues.

Execution Workflow

Phase 1: Error Category Identification

Use AskUserQuestion to understand the problem type:

Question: "What type of issue are you experiencing?"

  • Options:
    • Deployment Error (wrangler deploy fails)
    • Runtime Error (worker crashes or returns 500)
    • Performance Issue (slow responses, timeouts)
    • Build Error (bundling or compilation fails)
    • Binding Error (D1, KV, R2, DO not working)
    • Authentication Error (wrangler login issues)

Phase 2: Specific Error Details

Based on category, ask follow-up questions:

If Deployment Error:

  • "What error message did you receive?"
  • "Does wrangler whoami work?"
  • "Are you deploying to a zone-scoped worker or workers.dev?"

If Runtime Error:

  • "What's the exact error message or status code?"
  • "Does this happen on all requests or specific routes?"
  • "Are you using any bindings (D1, KV, R2, DO)?"

If Performance Issue:

  • "What's the expected vs. actual response time?"
  • "When did the slowness start?"
  • "Is this affecting all routes or specific endpoints?"

If Build Error:

  • "What's the build error message?"
  • "What bundler are you using (Vite, Webpack, esbuild)?"
  • "Did you recently add dependencies?"

If Binding Error:

  • "Which binding is failing (D1, KV, R2, DO, Queue)?"
  • "What's the error message?"
  • "Is the binding configured in wrangler.jsonc?"

If Authentication Error:

  • "What command are you running?"
  • "Have you run wrangler login recently?"
  • "Are you using API tokens or OAuth?"

Phase 3: Investigation - Read Relevant Files

Based on error category, read files to diagnose:

For ALL categories:

  1. Read wrangler.jsonc or wrangler.toml
  2. Check package.json for dependencies
  3. Look for recent git changes: git log -5 --oneline

For Deployment Errors: 4. Check wrangler whoami output 5. Check routes configuration 6. Look for compatibility flags

Read the full file on GitHub · 377 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. yesterday First seen · 377 lines · 31 tokens per session scan A b78db88936cd

Subscribe to this mod's changes

cloudflare-workers:debug is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 2,383 once invoked, about $0.0002 per session on Opus 5. 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.