Agent skill · AI & Agents

cloudflare-workers-ai

Run LLMs and AI models on Cloudflare's GPU network with Workers AI. Includes Llama 4, Gemma 3, Mistral 3.1, Flux images, BGE embeddings, streaming, and AI Gateway. Handles 2025 breaking changes. Prevents 7 documented errors. Use when: implementing LLM inference, images, RAG, or troubleshooting AI_ERROR, rate limits, max_tokens, BGE pooling, context window, neuron billing, Miniflare AI binding, NSFW filter, num_steps.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill cloudflare-workers-ai-brendadeeznuts1111-tier-1380-omega --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 21 KB
Bundled scripts: none
Path: skills/ai-llm/cloudflare-workers-ai-brendadeeznuts1111-tier-1380-omega/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Runs LLMs and AI models on Cloudflare's GPU network using Workers AI. Supports models such as Llama 4, Gemma 3, Mistral 3.1, and features like Flux image generation, BGE embeddings, streaming, and AI Gateway. Aims to handle 2025 breaking changes and prevent 7 documented errors. Used for implementing LLM inference, images, RAG, or troubleshooting AI_ERROR, rate limits, max_tokens, BGE pooling, context window, neuron billing, Miniflare AI binding, NSFW filter, and num_steps.

How it works

Includes a Quick Start snippet showing how to bind AI in wrangler.jsonc and how to run a model with streaming enabled, returning a text/event-stream. The API usage is described as env.AI.run(model, inputs, options), with optional gateway settings. The knowledge base provides several code examples for embedding generation, RAG workflow, image generation, and handling per-request cache control via AI Gateway headers. It documents model selection, including 2025 updates (new models, context window and pooling changes, per-model pricing, and adapters). It lists common patterns for RAG and structured output, and outlines per-request cache control through headers like cf-aig-cache-ttl, cf-aig-skip-cache, and cf-aig-cache-key.

When to use it

Use when implementing LLM inference, image generation, RAG workflows, or troubleshooting related AI errors (AI_ERROR, rate limits, max_tokens, BGE pooling, context window, neuron billing, Miniflare AI binding, NSFW filter, num_steps).

What it can touch

Env.AI.run interacts with the AI models and may be used with gateway options. The API reference shows inputs and an optional gateway object (e.g., { gateway: { id: string; skipCache?: boolean } }). Per-request cache control is achieved via HTTP headers in a fetch to the AI gateway endpoint, including cf-aig-cache-ttl, cf-aig-skip-cache, and cf-aig-cache-key.

Caveats

License is MIT. Known issues and preventive patterns are documented (context window tokenization, neuron consumption, local dev tooling, NSFW filter false positives, required num_steps for image generation, Zod compatibility notes). The skill emphasizes using streaming for text generation to avoid worker timeouts and to reduce in-memory buffering. It also notes platform changes such as token-based context windows and new per-model capabilities in 2025.

From the SKILL.md

# Cloudflare Workers AI **Status**: Production Ready ✅ **Last Updated**: 2026-01-21 **Dependencies**: cloudflare-worker-base (for Worker setup) **Latest Versions**: wrangler@4.58.0, @cloudflare/workers-types@4.20260109.0, workers-ai-provider@3.0.2 **Recent Updates (2025)**: - **April 2025 - Performance**: Llama 3.3 70B 2-4x faster (speculative decoding, prefix caching), BGE embeddings 2x faster - **April 2025 - Breaking Changes**: max_tokens now correctly defaults to 256 (was not respected), BGE pooling parameter (cls NOT backwards compatible with mean) - **2025 - New Models (14)**: Mistral 3.1 24B (vision+tools), Gemma 3 12B (128K context), EmbeddingGemma 300M, Llama 4 Scout, GPT-OSS 120B/20B, Qwen models (QwQ 32B, Coder 32B), Leonardo image gen, Deepgram Aura 2, Whisper v3 Turbo, IBM Granite, Nova 3 - **2025 - Platform**: Context windows API change (tokens not chars), unit-based pricing with per-model granularity, workers-ai-provider v3.0.2 (AI SDK v5), LoRA rank up to 32 (was 8), 100 adapters per account - **October 2025**: Model deprecations (use Llama 4, GPT-OSS instead) --- ## Quick Start (5 Minutes) ```typescript // 1. Add AI binding to wrangler.jsonc { "ai": { "binding": "A

What's inside
Steps it walks through
  1. Quick Start (5 Minutes)
  2. Known Issues Prevention
  3. Issue #1: Context Window Validation Changed to Tokens (February 2025)
  4. Issue #2: Neuron Consumption Discrepancies in Dashboard
  5. Issue #3: AI Binding Requires Remote or Latest Tooling in Local Dev
  6. Issue #4: Flux Image Generation NSFW Filter False Positives
  7. Issue #5: Image Generation Error 1000 - Missing numsteps Parameter
  8. Issue #6: Zod v4 Incompatibility with Structured Output Tools
  9. Issue #7: AI Gateway Cache Headers for Per-Request Control
  10. API Reference
  11. Model Selection Guide (Updated 2025)
  12. Text Generation (LLMs)
  13. Text Embeddings (2x Faster - 2025)
  14. Image Generation
Ships with 1 file
  • metadata.json
Commands it runs
Option 2: Update to latest tooling
npm install -D @cloudflare/vite-plugin@latest
Option 3: Use wrangler dev instead of custom Miniflare
npm run dev
Install Zod v3 specifically
npm install zod@3
Or pin in package.json
npx wrangler --version
rm -rf ~/.wrangler
npm install -D wrangler@latest
More from claude-skill-registry
All skills →
About this skill
What does the cloudflare-workers-ai skill do?

Run LLMs and AI models on Cloudflare's GPU network with Workers AI. Includes Llama 4, Gemma 3, Mistral 3.1, Flux images, BGE embeddings, streaming, and AI Gateway. Handles 2025 breaking changes. Prevents 7 documented errors. Use when: implementing LLM inference, images, RAG, or troubleshooting AI_ERROR, rate limits, max_tokens, BGE pooling, context window, neuron billing, Miniflare AI binding, NSFW filter, num_steps.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill cloudflare-workers-ai-brendadeeznuts1111-tier-1380-omega --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going