setup-cloudflare-pr-previews
Installation
SKILL.md
Set Up Cloudflare PR Previews
Create a reusable deployment topology while adapting names, build output, migrations, runtime URL variables, and explicitly shared resources to the target project.
Route the task
- Inspect repository instructions, package manager, Wrangler/build config, generated Worker output, migrations, bindings, CI, and deployment docs. Inspect Better Auth and Prisma configuration when present.
- Read only the references needed:
references/topology-and-lifecycle.mdfor naming, stable/branch topology, aliases, isolation, or environment selection.references/d1-and-deployment.mdfor provisioning, migrations, binding injection, deploy commands, or target-repository integration.references/cleanup-and-operations.mdfor PR-close cleanup, GitHub trust boundaries, dashboard configuration, access, or credentials.references/vite-plugin-integration.mdwhen the repository uses@cloudflare/vite-plugin. Read all three core references for a full setup; use only the affected reference for a focused audit or repair.
- Resolve the resource prefix, Worker names, production branches, D1 binding/migrations, deployable config path, stable URLs, origin-dependent variables, and isolated versus shared bindings before rendering.
- Render the bundled templates into scratch space, never over the target repository: