skillfed

wrangler

Wrangler skill guides you through Cloudflare's command-line tool for deploying Workers and managing associated services like KV, R2, D1, and Queues. It covers deployment workflows, account routing, secrets handling, and common pitfalls to avoid when working with Wrangler 4.

Wrangler skill provides CLI guidance for deploying and managing Cloudflare Workers and related services.

AI-generated summary based on this skill's SKILL.md

6,476 537 MIT updated by steipete

Install

steipete/agent-scripts/wrangler · repository language: Shell

git clone https://github.com/steipete/agent-scripts
cp -r agent-scripts/skills/wrangler ~/.claude/skills/wrangler
npx skillfed install steipete/agent-scripts/wrangler

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I deploy with wrangler to Cloudflare?

Wrangler deploys your Worker code to Cloudflare using the `wrangler deploy` command. First, authenticate with `wrangler login`, configure your `wrangler.toml` with your account ID and worker name, then run `wrangler deploy` from your project root. Wrangler will upload your code and any bound resources (KV, R2, D1, Queues) to Cloudflare's edge network.

What are the main Wrangler CLI commands for managing resources?

Wrangler provides commands for each resource type: `wrangler kv` for key-value storage, `wrangler r2` for object storage, `wrangler d1` for databases, and `wrangler queues` for message queues. Use `wrangler tail` to stream live worker logs, `wrangler secret` to manage secrets, and `wrangler whoami` to verify your account identity. Each command has subcommands for create, list, delete, and other operations.

How do I configure secrets and bindings in Wrangler?

Wrangler secrets and bindings are configured in your `wrangler.toml` file or via CLI commands. Use `wrangler secret put KEY` to add environment secrets interactively. Bindings are declared in `wrangler.toml` under `[env.production]` or similar sections, specifying resource type, namespace ID, and other metadata. Secrets remain encrypted and are injected at runtime; bindings expose resource handles to your Worker code.

How can I stream and filter worker logs with the tail command?

Wrangler's `wrangler tail` command streams live logs from your deployed Worker. Run `wrangler tail` to see all logs, or use `--format json` for structured output. You can filter by status, message content, or sampling rate using flags like `--status error` or `--sampling-rate 0.1`. The tail command is useful for debugging production issues and monitoring Worker behavior in real time.

What does wrangler account routing do and how is it configured?

Wrangler account routing allows you to manage which Cloudflare account and zone your Worker is deployed to. Configure it in `wrangler.toml` by setting `account_id` and `route` fields, or use `wrangler publish` with environment-specific settings. This is essential when managing multiple accounts or deploying to different zones with a single codebase.

How do I verify my account identity and resolve Wrangler config conflicts?

Use `wrangler whoami` to verify your authenticated account and email. Config conflicts typically arise from mismatched `account_id` values or missing `wrangler.toml` settings. Run `wrangler login` to re-authenticate, check your `wrangler.toml` for typos, and ensure environment-specific configs override defaults correctly. Clear your local auth cache if needed with `wrangler logout`.

SKILL.md

rendered from the published skill — quoted content, verbatim

Wrangler

Use for Cloudflare Wrangler CLI work: deploys, tails, KV/R2/D1/Queues/Workers, secrets, bindings, and account routing.

Defaults

  • Retrieval first for flags/config: wrangler --help, subcommand --help, local node_modules/wrangler/config-schema.json, then Cloudflare docs.
  • Prefer repo wrapper: npm exec --yes --package wrangler -- wrangler ... unless repo has its own script.
  • wrangler whoami before account-sensitive work.
  • ReleaseBar prod account: Steipete@gmail.com's Account / de09342a728de2c25c85cc6b34d68739.
  • OpenClaw projects: use OpenClaw account / 91b59577e757131d68d55a471fe32aca. Ask if unsure.

Pitfalls

  • Do not invent flags from memory. Wrangler 4 removed/changed some old flags; confirm with --help.
  • wrangler kv key list has no --limit; use --prefix and filter locally.
  • Run Wrangler KV/list/get/admin reads serially when workerd/local storage starts up; parallel runs can hit SQLite SQLITE_BUSY.
  • wrangler tail --sampling-rate must be >0 and <1; use 0.999 for near-full sampling, not 1.
  • Stop tails you start. Use a PTY

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
skills/wrangler/SKILL.md
skills/wrangler/agents/openai.yaml

Related skills

Tags

cli-tool deployment-automation key-value-store cloudflare-ecosystem worker-management infrastructure-as-code log-streaming secret-management account-management