# Cloudflare Workers Pitfalls Review (D1, OpenNext, Fetch)

> Cloudflare Workers Pitfalls Review (D1, OpenNext, Fetch) is a paid API for AI agents from api.aiskills402.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-27).

Returns a SKILL.md guide identifying production pitfalls in Cloudflare Workers code — covering D1 query limits, OpenNext edge runtime issues, fetch self-loop errors (1042), and wrangler config gotchas.

## Facts

- Endpoint: GET https://api.aiskills402.com/v1/skills/workers-pitfalls-review/file?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cloudflare-workers-pitfalls-review-d1-opennext-fetch-0bb31a6f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YsHy_B-xfECQ618fhiH3i

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cloudflare-workers-pitfalls-review-d1-opennext-fetch-0bb31a6f
```

Example prompt: Can you review my Cloudflare Worker and D1 queries for production pitfalls — things like fetch self-loop errors, D1 parameter limits over 100, LIKE patterns hitting the 50-byte cap, or OpenNext edge runtime issues that only break in production?

## When to prefer this

Choose this endpoint when an AI agent or developer needs a ready-made, tested reference guide for Cloudflare Workers production pitfalls — particularly D1 query limits, OpenNext edge runtime issues, and fetch self-loop errors — rather than generic code review. It is especially useful before deploying Workers with D1 at scale, or when debugging prod-only failures that pass local tests. The one-time payment model (with redownload token) makes it cost-effective for repeated agent use.

## Known failure modes

- Payment not settled — 402 response if USDC payment via x402 is not confirmed
- Network timeout reaching api.aiskills402.com
- Invalid HTTP method — only GET and HEAD are accepted
- Empty or malformed input object returns validation error
- Service unavailability on provider side returns 5xx

## How this service works

Cloudflare Workers Review: D1, OpenNext, Fetch — Reviews pasted Cloudflare Workers code and configuration (a Worker, a Next.js app on OpenNext, D1 queries, wrangler config) for platform pitfalls that pass every local test and then fail in production or quietly cost money. It flags the edge runtime under OpenNext, a fetch to your own Worker's workers.dev address (error 1042), D1 queries that bind more than 100 parameters as data grows, LIKE patterns over D1's 50-byte limit, reading rowsAffected …

## Output

Returns a SKILL.md file (UTF-8 text) containing a curated, tested guide of Cloudflare Workers production pitfalls — covering D1 parameter binding limits (100+), LIKE pattern length limits (50 bytes), fetch to own workers.dev causing error 1042, OpenNext edge runtime incompatibilities, rowsAffected gotchas, and wrangler config issues. Also includes metadata: skill name, version, SHA256 hash of the file, and a redownload token/URL for future access without repaying.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "file": {
   "name": "SKILL.md",
   "content": "<the SKILL.md file>",
   "encoding": "utf-8"
  },
  "name": "Cloudflare Workers Review: D1, OpenNext, Fetch",
  "skill": "workers-pitfalls-review",
  "sha256": "<sha256 of SKILL.md>",
  "receipt": {
   "tx": "0x<settlement transaction>",
   "settled": true
  },
  "version": "1.0.0",
  "redownload": {
   "url": "<api>/v1/purchases/<token>",
   "token": "<64 hex chars>"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cloudflare-workers-pitfalls-review-d1-opennext-fetch-0bb31a6f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aiskills402.com](https://www.zero.xyz/host/api.aiskills402.com/llms.txt)
