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

/rivet-deploy-image

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

Deploy a Docker image to a Rivet Cloud cluster through the Rivet MCP server, or roll a cluster back to an earlier build. Use when asked to deploy, ship, release, or roll back an app on a Rivet cluster and a shell with Docker is available.

Use this Skill: https://skilld.dev/gh/rivet-dev/skills/rivet-deploy-image

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈65 tokens for metadata: the name and description. ≈761 when used: this file. ≈1.1k 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 ≈259 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.

Deploy an image to a Rivet cluster

A deploy is a local build, one upload, and two Code Mode operations run through the execute tool. It needs Docker and a shell. It does not need the Rivet CLI or any other login.

Before starting

  1. Confirm the session can deploy. If search does not list rivet.deploy.prepare, the session is read-only or is pinned to a project or namespace, and the deploy cannot run from here. Say so instead of retrying.
  2. Pick the cluster. Run return (await rivet.cloud.v2.clusters.list()).items; in execute and use the cluster field of the one to deploy to, which is its name. On a connection pinned to a cluster, rivet.context() reports it, and cluster is left out of every call below.
  3. Check the image. When the app has no Dockerfile for a runner yet, or the first deploy fails to start, follow references/runner-image.md.

Steps

  1. Build and measure the image in the shell. The platform must be linux/amd64.

    docker build --platform linux/amd64 -t app .
    docker image save app -o image.tar
    wc -c < image.tar                        # content_length
    openssl md5 -binary image.tar | base64   # content_md5

    The tarball must be 5 GiB or smaller. Measure the exact file that will be uploaded, because the build fails verification when either value differs.

  2. Register the build.

    return await rivet.deploy.prepare({
        cluster: "my-cluster",
        image: "app:latest",
        content_length: 48213504,
        content_md5: "1B2M2Y8AsgTpgAmY7PhCfg==",
    });

    content_length is a number, not a string. Pass file when the tarball is not named image.tar. Keep the returned build_id.

  3. Run the returned upload command in the shell, unchanged. It is a curl command against a presigned URL that is good for that one tarball until expires_at, so it carries no Rivet credentials.

  4. Roll out, repeating until done is true.

    return await rivet.deploy.rollout({ cluster: "my-cluster", build_id: "<build_id>" });

    Each call advances one step and returns immediately, so call it again while done is false. A deploy takes 5 to 10 minutes, and the previous build keeps serving until it finishes. See references/rollout.md for each step, the errors, and how to roll back.

  5. Report the build_id and the endpoints from the final result to the user. The build_id is what a later rollback needs.

Rules

  • Never rebuild or re-upload to retry a rollout. Call rivet.deploy.rollout again with the same build_id.
  • Use rivet.deploy.* for the whole deploy. Do not drive rivet.cloud.v2.builds.* or rivet.cloud.v2.runnerPools.upsert by hand, because an upsert replaces the pool's settings wholesale and would drop its allowlist.
  • Do not guess a cluster, region, or pool name. List them first.
  • When a step fails with a platform fault, or the deploy only goes through after a workaround, send one report with the feedback tool after telling the user the result, if the server offers that tool.

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 alerts26d3 checks · Risk SAFE
  • Gen Agent Trust Hub26d

    The skill facilitates Docker image deployment to Rivet Cloud using standard shell commands and vendor-specific APIs. It follows security best practices such as recommending the exclusion of environment files from image builds.

  • Socket28d

    No alerts

  • Snyk28d

    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 month
metadata
{
  "rivet-requires": "rivet.deploy.prepare rivet.deploy.rollout"
}

README badge

README badge for rivet-dev/skills/rivet-deploy-image