agentleFS
Red-Center-StudioRed-Center-Studio/bubble-to-cloudflare-migrator/skills/rebuild-worker/SKILL.md

rebuild-worker

Skill0 starsChanged 7 days agoMITView on GitHub

Rebuild a Bubble® app's UI pages, API routes, privacy policy, and workflows on Cloudflare Workers using either the automated App Mover tools (nc_preview, nc_move) or manual Hono + Drizzle guidance from nc_ artifacts.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Call nc_compile_plan to review the move score, page list, and automatic vs manual features.

    line 15
  2. Very specific:

    Call nc_preview with job_id (and up to 10 page keys, or leave them out for the 10 core-route defaults) to rebuild and deploy a free …

    line 19
  3. Very specific:

    Call nc_move to orchestrate credentials (nc_connect), data migration, full backend/UI compilation in the Cloudflare build container, …

    line 24
  4. Very specific:

    Never pass confirm_price_usd, confirm_add_ons: true, confirm_go_live: true, or confirm_cutover: true without explicit owner confirmation in …

    line 25
  5. Very specific:

    Call nc_forget anytime the owner asks to delete their uploaded .bubble export and temporary build artifacts immediately.

    line 27
  6. Very specific:

    When building custom handlers manually around the outputs generated by nc_schema, nc_access, nc_files, nc_users, and nc_redirects:

    line 31
  7. Very specific:

    Verification: Run tsc --noEmit, automated Vitest + workerd integration tests (including deny tests for private resources), and the …

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rebuild app UI and backend on Cloudflare Workers

Use this skill when the owner wants to turn an audited Bubble® app into a running Cloudflare Workers application (Hono backend + Drizzle ORM on D1 + R2 storage + React frontend). Supports both the automated App Mover pipeline on nc.redcenterstudio.com/mcp and Developer Mode / manual Worker architecture using exported nc_* outputs.

Path 1: Automated App Mover (nc_compile_plan -> nc_preview -> nc_move)

Requires uploading the app's .bubble export via nc_connect(purpose: "export"). Never ask the owner to paste secrets or Cloudflare keys into chat.

  1. Plan & customise (free):
    • Call nc_compile_plan to review the move score, page list, and automatic vs manual features.
    • Optional nc_changes: queue pre-build modifications to data model fields, privacy rules, backend workflows, or pages (for example renaming fields, tightening rules, or adding routes).
    • Optional nc_basket: inspect or select modular add-ons (such as admin_dashboard, web_analytics, marketing_hub, payments, bookings, referrals, ai_assistant, claude_connector, weekly_backup, or micro UI add-ons like theme, speed_search, accessibility, dark_mode, cookie_banner). Only built add-ons can be charged.
  2. Free 10-page live preview (core routes first) (nc_preview + nc_preview_status):
    • Call nc_preview with job_id (and up to 10 page keys, or leave them out for the 10 core-route defaults) to rebuild and deploy a free interactive preview of up to 10 pages link before any purchase.
    • Poll with nc_preview_status until the build completes and share the signed preview URL with the owner.
  3. Quote & guided full move (nc_finalise_quote -> nc_move):
    • Call nc_finalise_quote to compute the exact itemized quote (finalise tier $159 Small / $299 Standard / $389 Large or $45 Developer mode (81 to 250 pages add $3 USD per page over 80; over 250 pages is a custom quote), plus selected built add-ons and any extra-app discount; includes the matching data migration pass and 2 rebuild rounds).
    • Show the exact USD breakdown and get explicit owner consent before advancing past any payment, deploy, or cutover prompt inside nc_move.
    • Call nc_move to orchestrate credentials (nc_connect), data migration, full backend/UI compilation in the Cloudflare build container, automated verification (workerd tests + checks; failed items refund automatically), and staging deployment into the owner's own Cloudflare account.
    • Never pass confirm_price_usd, confirm_add_ons: true, confirm_go_live: true, or confirm_cutover: true without explicit owner confirmation in chat.
  4. Data hygiene (nc_forget):
    • Call nc_forget anytime the owner asks to delete their uploaded .bubble export and temporary build artifacts immediately.

Path 2: Developer Mode ($45 USD) or manual Worker rebuild

When building custom handlers manually around the outputs generated by nc_schema, nc_access, nc_files, nc_users, and nc_redirects:

  1. Core stack: TypeScript on Cloudflare Workers with Hono (routing/middleware), Drizzle ORM over D1 (DB app binding using schemas generated by nc_schema under nc/<job>/schema/), and R2 (FILES binding) for uploaded media.
  2. Authentication (nc_users): Passwords are never migrated. Implement magic-link sign-in or password-reset tokens (sent through Cloudflare Email Sending by default when the domain is in the owner's Cloudflare account and no other email key is set) with HttpOnly/Secure/SameSite session cookies, constant-time token verification, and CSRF origin checks.
  3. Authorization (policy.ts from nc_access): Wire the generated default-deny guards before every query and mutation. Review every rule flagged MANUAL in nc_access and write explicit server-side checks + automated deny tests before opening access.
  4. Files & uploads (file_map from nc_files): Resolve migrated records by R2 content-hash key, serve downloads through authenticated Worker routes with X-Content-Type-Options: nosniff and sandbox CSP for active file types, and fall back to legacy URLs only during the 30-day transition window.
  5. Routing & SEO (redirects.ts from nc_redirects): Mount redirects.ts early in the Worker fetch handler (or _redirects on static assets) so legacy Bubble URLs return clean 301 responses before SSR/API routes run.
  6. Verification: Run tsc --noEmit, automated Vitest + workerd integration tests (including deny tests for private resources), and the nc_redirects curl check script against staging before switching DNS.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.