OpenNext Cloudflare Capability Pack Skill
Expert OpenNext + Cloudflare capability skill for Next.js on Workers, runtime constraints, cache strategy, and production-safe deploy architecture.
Open the source and read safety notes before installing.
Prerequisites
- Next.js codebase and Cloudflare account
- Wrangler configuration access
- Deployment environment separation (dev/prod)
Schema details
- Install type
- package
- Reading time
- 10 min
- Difficulty score
- 88
- Troubleshooting
- Yes
- Breaking changes
- No
- Package verified
- Yes
- SHA-256
- 0254c5d9edfe925907cfca3f06a24c866ecd42e1e7ef51ad64b2a5518199360c
- Skill type
- capability-pack
- Skill level
- expert
- Verification
- validated
- Verified at
- 2026-04-10
| Platform | Support | Install path |
|---|---|---|
| claude-code | Native | .claude/skills/<skill-name>/SKILL.md |
| codex | Native | .agents/skills/<skill-name>/SKILL.md |
| windsurf | Native | .windsurf/skills/<skill-name>/SKILL.md |
| gemini | Native | .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md |
| cursor | Adapter | .cursor/rules/<skill-name>.mdc |
| cli | Manual | AGENTS.md or tool-specific context file |
Full copyable content
# Trigger
"Use the OpenNext Cloudflare capability pack for this deployment plan."
# Required output
1) Runtime architecture map
2) Binding/env/secret model
3) Cache and revalidation strategy
4) Deploy and rollback procedureAbout this resource
Knowledge Freshness
This capability pack is pinned to documentation verified on 2026-04-10. When upstream docs change, refresh endpoint contracts, examples, and constraints before using this skill for production changes.
Retrieval Sources
- https://opennext.js.org/cloudflare/get-started
- https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/
- https://developers.cloudflare.com/workers/
Always prefer direct retrieval from official docs/API references over model memory for limits, endpoint signatures, and behavior guarantees.
Core Workflow
- Confirm target version/runtime and pull latest official docs for the task scope.
- Build an execution plan with explicit read-only discovery before any mutation.
- Validate contracts, permissions, and safety constraints before applying changes.
- Execute with deterministic checkpoints and rollback criteria.
- Produce a verification report with evidence, caveats, and next actions.
Overview
This capability pack teaches agents how to correctly design, deploy, and operate Next.js workloads on Cloudflare Workers using OpenNext. It is tuned for production behavior, not toy deployments.
Capability Scope
- OpenNext build/runtime model on Workers
- Binding strategy (D1, KV, R2, secrets, env vars)
- Cache behavior and invalidation patterns
- Route-specific security and performance controls
- Observability, alerting, and rollout safety
Compatibility
Native
- Claude Code / Claude: native skill usage via
SKILL.md. - Codex/OpenAI workflows: compatible with Agent Skills-style
SKILL.mdcontent as reusable workflow instructions.
Manual Adaptation
- Gemini CLI: native skill usage via
.gemini/skills/<skill-name>/SKILL.mdor.agents/skills/<skill-name>/SKILL.mdwhere supported. - Cursor: use the generated
.cursor/rules/*.mdcadapter for project rules. - OpenClaw and similar agents: use the same skill content as a reusable prompt/workflow file when native skill import is unavailable.
Production Rules
- Treat API routes and static routes with separate cache/security policies.
- Keep secret values out of repo and build output.
- Verify behavior in dev and prod workers separately.
- Enforce explicit rollback and incident pathways.
Troubleshooting
Issue: Unexpected cache behavior after deploy
Fix: Validate cache headers, Cloudflare cache rules, and OpenNext route semantics together.
Issue: Local works, Worker fails
Fix: Check bindings/env parity and runtime-specific API differences.
Issue: Deploys are correct but latency is inconsistent
Fix: Profile critical routes, tighten cache strategy, and isolate expensive dynamic operations.
Output Contract
- Provide an implementation plan ordered by risk and dependency.
- Provide exact production-ready config/commands with no placeholders.
- Call out secrets, permissions, and least-privilege requirements.
- Include rollback and recovery guidance for each risky step.
Validation Checklist
- Verify all referenced docs/versions before applying changes.
- Run regression checks for core user flow and error paths.
- Confirm observability/logging is enabled for changed components.
- Confirm security controls (auth, rate limits, input validation) still pass.
- Record final known limitations and follow-up actions.
Source citations
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.