cloudflare-mbt-worker-bundle

Bundle MoonBit core JS with a TypeScript entry shim for Cloudflare Wrangler deployments.

320|3|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/mizchi/skills --skill cloudflare-mbt-worker-bundle
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cloudflare-mbt-worker-bundle
Source: https://github.com/mizchi/skills/tree/main/cloudflare/mbt-worker-bundle
Command: npx skills add https://github.com/mizchi/skills --skill cloudflare-mbt-worker-bundle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Bundling a Cloudflare Worker with MoonBit core code and a TypeScript entry can be tricky due to the need for FFI rewrites and post-build checks to ensure the worker starts reliably.

Core Features & Use Cases

  • Ship MoonBit core JS alongside a TypeScript entry shim for wrangler deployments.
  • Enforce mandatory FFI rewrites and post-build checks to prevent startup hangs.
  • Align the deployment pipeline with wrangler deploy, moon build, and generated core creation under src/_generated.

Quick Start

Run the pre-bundle and post-bundle scripts to generate the Core and integrate it into your wrangler workflow.

Frequently Asked Questions about cloudflare-mbt-worker-bundle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bundle a Cloudflare Worker with MoonBit core code and a TypeScript entry?▼

Bundling a Cloudflare Worker with MoonBit requires shipping the MoonBit core JS output alongside a TypeScript entry shim. This process aligns the deployment pipeline with wrangler deploy and uses pre-bundle and post-bundle scripts to generate the core file under src/_generated.

Why does my MoonBit Cloudflare Worker hang on startup after deploying with wrangler?▼

A MoonBit Cloudflare Worker may hang on startup due to missing FFI rewrites or failed post-build bundle integrity checks. Enforcing mandatory FFI rewrites and running post-build checks prevents these startup hangs and ensures the worker starts reliably.

Do I need the wrangler toolchain and MoonBit build output to deploy a Worker?▼

Yes, deploying a MoonBit-powered Worker requires the wrangler toolchain and the MoonBit output located in _build/js/release/build. These dependencies are necessary to execute the pre-bundle and post-bundle scripts that produce the generated core file.

What is the best way to integrate MoonBit FFI rewrites into a wrangler deployment workflow?▼

The best way to integrate MoonBit FFI rewrites into a wrangler deployment workflow is by running pre-bundle and post-bundle scripts located in assets/scripts/. This enforces mandatory FFI rewrites and generates the core file under src/_generated for wrangler deployments.

What limitations exist when bundling MoonBit JS output for Cloudflare Workers?▼

Limitations when bundling MoonBit JS output for Cloudflare Workers include the strict requirement for mandatory FFI rewrites and post-build bundle integrity checks. Without these enforced steps, the generated core file may cause startup hangs during wrangler deployment.