Index of every page on this site: llms.txt
All skills
rivet-dev avatar

/rivet-open-orange

@3b027b3 official
by Rivetrivet-dev/skills53 stars
14
Run it yourself

Run a Cloudflare Workers project on Rivet with OpenOrange, the orange CLI, and move its Durable Objects and D1 databases off Cloudflare. Use when asked to run, deploy, migrate, or roll back a Cloudflare Worker on Rivet or OpenOrange.

Use this Skill: https://skilld.dev/gh/rivet-dev/skills/rivet-open-orange

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈63 tokens for metadata: the name and description. ≈1.6k when used: this file. ≈2.8k more on demand in 2 files.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈253 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Run a Cloudflare Worker on Rivet with OpenOrange

OpenOrange runs a Cloudflare Workers project on Rivet with no changes to its code. orange dev runs it locally, orange deploy ships it to a Rivet cluster, and orange migrate moves its Durable Objects and D1 databases off Cloudflare while the app keeps serving.

Do the parts the user asks for. Each part needs the parts before it: set up, run locally, deploy, migrate.

Rules

  • Stop and ask. At each Stop and ask, tell the user what changes and for whom, then wait for a yes. A yes covers that one action.
  • Secrets. The user creates and types every secret value: WORKER_MIGRATOR_TOKEN, CLOUDFLARE_API_TOKEN, and Rivet tokens. Write a secret only as its name or $NAME, in commands, files, and output. Ask the user to run each command that prompts for a value, such as wrangler secret put and rivet cluster secret set.
  • The code stays. Keep the app code and the Wrangler configuration as they are, compatibility_flags included: Cloudflare runs the same code until the migration ends. When a fix needs a code change, tell the user first.
  • Cloudflare stays. Orange deletes nothing on Cloudflare. The user deletes the Cloudflare Worker and its data, after the migration.
  • Look it up. orange <command> --help has every flag, JSON event, and exit code. The Deploy and Migrate guides have every step, message, and failure in detail, and each binding has a page under https://openorange.dev/docs/bindings/.
  • Bugs. When a command ends with Looks like a bug? Report it: <link>, give the user the link. Orange prints it only for unexpected errors.

Set up

  1. Install. orange --version prints a version when OpenOrange is installed. Otherwise:

    pnpm add -g open-orange

    When the shell then cannot find orange, run pnpm setup, which puts pnpm's global bin on PATH, and start a new shell. When the installed version is older than pnpm view open-orange version, a pnpm minimumReleaseAge limit held back a new release: run pnpm add -g open-orange@latest. Done when orange --version prints the latest version.

  2. Check the project. Run orange doctor --json in the Worker's directory. Fix each check event with "status":"fail" by its hint, and run doctor again. Show the user one table of the binding events: name, resource, support, and hint. For a migration, add the durable_object_class events: a class with "migratable":false cannot move, and its hint says why. When the summary event has "mcp":{"configured":false}, suggest the Rivet MCP once: orange mcp prints the command for the user's agent. Stop and ask: confirm the bindings that need a service, the ones that are not supported, and, for a migration, the classes and D1 databases that will move. Done when doctor exits 0 and the user agrees.

Run locally

Start orange dev in the background. It serves on http://127.0.0.1:8787 (--port picks another) and keeps its data in .open-orange/, which belongs in .gitignore. For a D1 app, apply the migrations to the local database first: orange d1 migrations apply <DB> --local.

Exercise every kind of route the app has: create, read, update, and delete each resource. When the app has its own tests, run them against that URL. A call that fails on Orange and works on Cloudflare is often a known difference: look on that binding's page.

Done when each route answers as it does on Cloudflare. Then stop orange dev.

Deploy

Ask where it runs: a Rivet Cloud cluster, which needs Docker, or the user's own Rivet Engine (Self-host). A BYOC cluster is a Rivet Cloud cluster.

  1. Sign in and link. orange login opens a browser for the user to approve, and keeps a session that still works. Get the cluster name from the user or the Rivet MCP.

    orange login
    orange link --cluster <cluster>

    In CI, a cluster token goes in RIVET_CLOUD_TOKEN, as Deploy from CI says. A cluster token cannot create a runner pool, so with one the pool must already exist: the user creates it in the dashboard, or deploys once with orange login. Done when orange whoami shows the account and the linked cluster.

  2. Check the plan. orange deploy --dry-run writes the build and calls no API. Show the user the cluster, region, pool, image, variables, and secrets that it prints.

    • Secrets go in with --secrets-file or --secret, because vars ship inside the image. Before --secrets-file .dev.vars, confirm with the user which names the file holds, without reading the values.
    • When the Worker has triggers.crons and its data moves later, add --var ORANGE_CRONS:off to every deploy until the domain moves. Otherwise each cron runs on Cloudflare and on Orange.

    Done when the plan names the cluster and pool that the user expects.

  3. Deploy. Stop and ask before the first deploy: it creates or rolls a runner pool, which can cost money.

    orange deploy

    A deploy takes several minutes: a Docker build, an upload, 3 to 5 minutes for Rivet Cloud to prepare the build, and a rollout. On a failure, read Fix a failed deploy. Done when it prints ✓ Deployed, a Build ID, and a URL, and a request to the URL works. Record the build ID: orange deploy --build <id> rolls the pool back to it.

When the data moves later, test the deployed Worker only as Test Orange before the migration is on allows: a request that starts a Durable Object which Cloudflare also has, even a read, blocks that object's move. For a D1 app, the deployed database stays empty, with no migrations applied, until its move.

Migrate the data

Follow references/migrate.md. Start only after the deploy works.

Roll back

When the user asks to undo a migration step, or a step leaves production broken, follow references/rollback.md.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill facilitates the migration of Cloudflare Workers to Rivet using the OpenOrange CLI. It involves installing vendor-provided tools, managing Cloudflare and Rivet credentials through environment variables, and executing deployment commands. The skill follows secure practices by ensuring the user manages secret values directly and avoids logging them.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at 3b027b3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for rivet-dev/skills/rivet-open-orange