Cloudflare + Supabase Demo Deploy (Pages, Workers, RLS)
by Nate Freed
Ship a static, Vite or Next.js app with a Supabase backend to a live Cloudflare demo URL. Tested preflight, auth-URL and smoke-check scripts catch leaked keys, missing secrets and tables without RLS before your link goes out.
$7
Cloudflare + Supabase Demo Deploy (Pages, Workers, RLS)
Example session with this skill installed
My Vite + React recipe-sharing app uses Supabase auth and a recipes/comments table, plus one Pages Function that emails the author when someone comments. Get it live on Cloudflare so I can send the link to my class. Domain: recipe-share.example.com.
- Read your context and instructions
- Compiled the cloudflare + supabase
Path: Vite SPA + one Pages Function -> Cloudflare Pages + Functions.
preflight (before): 2 errors, 4 warnings
- ERROR SQL001 public.comments has no row level security
- ERROR WR007 comment-notify.ts imports node: modules, no nodejs_compat
- WARN ENV001 SMTP_PASS missing from .dev.vars.example
- WARN ENV002 .dev.vars and .env not gitignored
- WARN SQL005 'Authenticated users can comment' has no TO clause, so anon can insert
Fixed (each diff shown first): nodejs_compat + SUPABASE_URL var; .gitignore; example file; comments RLS with to authenticated + owner check; /api/health.
preflight (after build): 0 errors, 0 warnings. Secrets the live app needs: SMTP_PASS, SMTP_USER, SUPABASE_SERVICE_ROLE_KEY.
Auth > URL Configuration (OK to apply?):
Site URL: https://recipe-share.example.com
Redirects: the site /**, the <project>.pages.dev URL, its *.<project>.pages.dev previews, localhost:5173 and :8788
Waiting for your OK on each
- npx supabase db push --dry-run, then db push
- npx wrangler pages secret put SUPABASE_SERVICE_ROLE_KEY / SMTP_USER / SMTP_PASS --project-name recipe-share (you type the values)
- npx wrangler pages deploy dist --project-name recipe-share --branch preview
smoke_check on the preview: PASS, 7 checks (page, title, 2 assets, /api/health 200, SPA fallback noted, hosted Supabase URL baked in, no keys leaked)
Connects securely to your tools. The creator never sees your data.
About this skill
A repeatable workflow for taking a web app from localhost to a shareable demo on Cloudflare Pages, Pages Functions, or Workers via OpenNext for server-rendered Next.js, backed by Supabase Postgres, Auth, RLS, migrations and storage. Your agent picks the right hosting path, sets up the wrangler config and env files, keeps the service-role key out of the browser, writes migrations with row level security on every table and partition, generates the auth Site URL and redirect allow-list for your demo domain, and helps you choose an email-confirmation and SMTP setup. Three bundled Python scripts do the checking. preflight.py is a read-only repo scan with around 50 checks, from output-dir mismatches and missing nodejs_compat to user_metadata policies, views that skip RLS, and secrets inlined into bundles. auth_urls.py builds the redirect list. smoke_check.py tests the live URL: assets, API routes returning JSON, leaked keys, and a placeholder Supabase URL baked into the build. Your agent uses your own logged-in CLIs and asks for an explicit OK before every deploy, secret, migration push or auth setting change, with dry runs first.
The agent does not deploy anything by itself: it runs your own logged-in wrangler and supabase CLIs, and only after you OK each live step. Supabase dashboard settings (URL configuration, SMTP, exposed schemas) are done by you or pasted from generated values. preflight.py uses heuristic parsing, not a full SQL/JS parser. It tracks drop/alter policy and simple DO-block loops, but complex dynamic SQL and dashboard-only changes are invisible to it, so the skill also points you to Supabase's Security Advisor and a rolled-back SQL spot check. smoke_check.py only fetches same-host files referenced from the page, so lazily loaded chunks are not scanned. It does not cover Vercel/Netlify, and Cloudflare D1 migrations are noted but not RLS-checked (SQLite has no RLS). Gmail/SMTP setup is covered at the level of choosing and entering settings, not deliverability tuning. Some CLI subcommands vary by version (the OpenNext upload command, the Pages secret environment flag); the skill tells the agent to check --help.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 7 days ago
- Accounts
- A Cloudflare account
- Software
Python 3.8+Node.js 18+ with npm/npxA Supabase projectwrangler CLI (run via npx)Supabase CLI (run via npx)Wrangler
Node.jswouldopennextjs-cloudflare
- Optional
- @opennextjs/cloudflare for SSR Next.jsA custom domain on CloudflareAn SMTP sender for auth email
git (for tracked-secret checks)
Supabase SQL editororpsql
Permissions
Allowed Hosts
File Scopes
preflight.py and auth_urls.py make no network calls. smoke_check.py contacts only the scheme and host in --url: it refuses redirects to other hosts, skips assets on other hosts, and keeps TLS verification on (--ca-file for Pythons without system certificates). No script reads credentials. preflight.py never opens .env/.dev.vars files, masks any key it finds, and may run read-only git ls-files / git check-ignore in the project. The wrangler and Supabase CLIs run under the user's own login and may read SUPABASE_ACCESS_TOKEN, SUPABASE_DB_PASSWORD or a Cloudflare API token from the user's shell; the agent never prints those values, never puts them on a command line and never writes them to files. Secret values are typed by the user at the CLI prompt. Every outward-facing action (project creation, deploys, secrets, migration pushes, auth/SMTP/DNS changes, real emails) needs an explicit OK, with a dry run first where one exists.
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.