Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/humanerd-drew/opencode-drewgentnpx agentmods add skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-devWrote 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.
[](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-dev)<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-dev"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-dev/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.
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-dev"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/cloudflare-workers-local-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.08612 |
| Opus 5.5 | $0.00015 | $0.03445 |
| Sonnet 5.5 | $0.00007 | $0.01722 |
| Haiku 4.5 | $0.00004 | $0.00861 |
Grade D, and why
cloudflare-workers-local-dev scanned grade D with 3 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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
3. **Verify** with `curl -X POST http://localhost:8788/api/my-path/test -H "Content-Type: application/json" -d '{}'`. A 401 (Unauthorized) means the route is live — the auth check inside the handler is working. A 404 mea Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf .wrangler/state/v3/ Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Check the ACTUAL running system (curl the endpoints, read the files) before asserting connections How it starts
The opening of the file, as written. The whole thing — 593 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Workers Local Development
Patterns and pitfalls for local Cloudflare Workers development with D1, static assets, and multi-source integrations.
Core Principles
Understand the system before touching code
- Map the complete dependency graph first: which files import what, what data flows where, what's dead code
- Check the ACTUAL running system (curl the endpoints, read the files) before asserting connections
- Look for pre-existing architecture documents (ARCHITECTURE.md, README.md) before refactoring
- Compare original/NAS versions with working copies to find divergence points
Never reimplement what the external API already provides
- When an external API returns computed data, use it — don't recalculate
- Only compute what the external API doesn't provide
- Check the ACTUAL API response structure before coding against assumptions
D1 Local Development
SQLITE_BUSY error
Cause: Another wrangler dev instance holds a lock, or a stale .sqlite-lock file from a previous crash. Lock files exist in multiple locations (D1 metadata, Cache metadata), not just the D1 data directory.
Critical pitfall — pkill -f 'wrangler' does NOT kill the child workerd:
wrangler dev spawns a child workerd process that holds the SQLite file handle. pkill -f 'wrangler' only matches the parent wrangler.js node process, so the child workerd keeps running and keeps the DB locked. A dev:clean script that only pkill's wrangler is structurally broken — it WILL hit SQLITE_BUSY on the next start. Always match workerd too, and force-kill (-9) so the lock releases immediately:
pkill -9 -f 'wrangler' 2>/dev/null
pkill -9 -f 'workerd' 2>/dev/null
# also clear the port in case a stale process is bound:
lsof -ti:8787 2>/dev/null | xargs -r kill -9 2>/dev/null
### SQLITE_BUSY error
Cause: Another `wrangler dev` instance holds a lock, or a stale `.sqlite-lock` file from a previous crash. Lock files exist in multiple locations (D1 metadata, Cache metadata), not just the D1 data directory.
**Diagnose before fixing** — orphan `workerd` processes are the most common root cause and easy to miss:
```bash
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 593 lines · 37 tokens per session scan D af72018ae99e
cloudflare-workers-local-dev is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (3 stars, last pushed 3mo ago), licensed MIT. It adds 37 tokens to every session and 8,612 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it D with 3 findings (sends data to an external url, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
cloudflare
Use when working on Cloudflare's edge platform — wrangler.jsonc bindings, choosing between D1/KV/R2/Durable Objects/Queues, deploying a Worker or SPA via Static Assets, or designing around a Workers runtime limit. NOT generic CI/release (that is deployment), NOT Next.js framework wiring (that is nextjs), NOT DNS…
cloudflare-workers-debugging
Use when wrangler deploys silently fail or produce wrong artifacts, secrets upload as empty strings, custom domain DNS is not resolving, route assignment broke after rename, observability/tail logs are needed, D1/KV/R2 bindings are missing, OAuth scope errors block a command, cookies on a redirect are not attaching…
Cloudflare Workers & Edge AI Development
Build ultra-low-latency edge computing applications with Cloudflare Workers, Workers AI for LLM inference, V8 isolates, Durable Objects, and serverless patterns deployed across 330+ data centers worldwide.
agents-sdk
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
cloudflare-one-migrations
Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.
sandbox-migrate-to-next
Migrate Cloudflare Sandbox apps from stable @cloudflare/sandbox to @cloudflare/sandbox@next (SDK 1.0 preview). Use sandbox-next for apps already on the preview.