/cloudflare-vm:smart-placementfrom cloudflare-vm
Cloudflare Workers Smart Placement: Automatic workload placement optimization to minimize latency by running Workers closer to backend infrastructure rather than end users.
Ships in cloudflare-vm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Vendored from themusebook/skills (derived from cloudflare/skills, Apache-2.0). This snapshot may be outdated: confirm limits, pricing, API signatures and config options against https://developers.cloudflare.com/ before you cite them. When this file and the docs disagree, trust the docs.
When invoked: read every file in this skill's directory before answering, so you have the full reference: api.md, configuration.md, gotchas.md, patterns.md. Then answer the user's question (or, if none was given, summarise the product: what it is, config, API, patterns and gotchas). Related products are sibling skills, linked as ../<product>/.
Automatic workload placement optimization to minimize latency by running Workers closer to backend infrastructure rather than end users.
Smart Placement automatically analyzes Worker request duration across Cloudflare's global network and intelligently routes requests to optimal data center locations. Instead of defaulting to the location closest to the end user, Smart Placement can forward requests to locations closer to backend infrastructure when this reduces overall request duration.
Enable Smart Placement when:
fetch handler (not RPC methods)Do NOT enable for:
fetch handlers are affected)run_worker_first = true (degrades asset serving)Does your Worker have a fetch handler?
├─ No → Smart Placement won't work (skip)
└─ Yes
│
Does it make multiple backend calls (DB/API)?
├─ No → Don't enable (won't help)
└─ Yes
│
Is backend geographically concentrated?
├─ No (globally distributed) → Probably won't help
└─ Yes or uncertain
│
Does it serve static assets with run_worker_first=true?
├─ Yes → Don't enable (will hurt performance)
└─ No → Enable Smart Placement
│
After 15min, check placement_status
├─ SUCCESS → Monitor metrics
├─ INSUFFICIENT_INVOCATIONS → Need more traffic
└─ UNSUPPORTED_APPLICATION → Disable (hurting performance)
Recommended: Split full-stack applications into separate Workers:
User → Frontend Worker (at edge, close to user)
↓ Service Binding
Backend Worker (Smart Placement enabled, close to DB/API)
↓
Database/Backend Service
This maintains fast, reactive frontends while optimizing backend latency.
// wrangler.jsonc
{
"placement": {
"mode": "smart" // or "off" to explicitly disable
}
}
Deploy and wait 15 minutes for analysis. Check status via API or dashboard metrics.
To disable: Set "mode": "off" or remove placement field entirely (both equivalent).
type PlacementStatus =
| undefined // Not yet analyzed
| 'SUCCESS' // Successfully optimized
| 'INSUFFICIENT_INVOCATIONS' // Not enough traffic
| 'UNSUPPORTED_APPLICATION'; // Made Worker slower (reverted)
# Deploy with Smart Placement
wrangler deploy
# Check placement status
curl -H "Authorization: Bearer $TOKEN" \
https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/services/$WORKER_NAME \
| jq .result.placement_status
# Monitor
wrangler tail your-worker-name --header cf-placement
First time? Start here:
Quick lookup:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vmaia00/claude-specs --plugin cloudflare-vm64 skills in this plugin
/agents-sdkCloudflare Agents SDK: Cloudflare Agents SDK enables building AI-powered agents on Durable Objects with state, WebSockets, SQL, scheduling, and AI integration./ai-gatewayCloudflare AI Gateway: Expert guidance for implementing Cloudflare AI Gateway - a universal gateway for AI model providers with analytics, caching, rate limiting, and routing capabilities./ai-searchCloudflare AI Search Reference: Expert guidance for implementing Cloudflare AI Search (formerly AutoRAG), Cloudflare's managed semantic search and RAG service.Other plugins' skills for the same job