# Cloudflare + Supabase Demo Deploy (Pages, Workers, RLS)

> 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.

Cloudflare + Supabase Demo Deploy (Pages, Workers, RLS) is a paid AI agent skill on Agensi by Nate Freed, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Nate Freed](https://www.agensi.io/creators/nate-freed)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/cloudflare-supabase-demo-deploy-pages-workers-rls
- Tags: devops-cloud, data-databases, security

## 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.

## Requires

- Python 3.8+
- Node.js 18+ with npm/npx
- A Cloudflare account
- A Supabase project
- wrangler CLI (run via npx)
- Supabase CLI (run via npx)
- Wrangler
- Node.js
- would
- opennextjs-cloudflare
- Optional: @opennextjs/cloudflare for SSR Next.js
- Optional: A custom domain on Cloudflare
- Optional: An SMTP sender for auth email
- Optional: git (for tracked-secret checks)
- Optional: Supabase SQL editor or psql

## Known limitations

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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Cloudflare + Supabase Demo Deploy (Pages, Workers, RLS) skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it deploy or change anything without asking?

No. The bundled scripts never contact Cloudflare or Supabase. The agent uses your own logged-in CLIs and asks for an explicit OK before every deploy, secret, migration push, auth or DNS change, with a dry run first where one exists.

### Will my agent read my .env or .dev.vars files?

No. preflight.py skips those files entirely (confirmed during development with a check that recorded every file it opened). It only checks that they are gitignored and not tracked, and it masks any key it finds elsewhere.

### Which kinds of apps does it handle?

Static sites, Vite/React/Vue/Svelte SPAs, Next.js static export on Pages, small APIs as Pages Functions, and server-rendered Next.js through OpenNext on Workers, all with Supabase. Vercel and Netlify are out of scope.

### How reliable is the RLS check?

It parses your migrations, including later drop/alter policy statements and simple DO-block loops, and flags tables, partitions and views that skip RLS. It cannot see changes made only in the dashboard. For that, the skill also has you run Supabase's Security Advisor and a SQL spot check that rolls back.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
