Staging Lifecycle for Fly.io

    1

    Ship a web app in four steps: tests, keyless local run, a throwaway Fly.io staging copy, production. One command builds, deploys, checks or deletes staging, and your agent never sees a secret.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Staging Lifecycle for Fly.io

    Example session with this skill installed

    I need a staging copy of recipebox on Fly.io so my teammate can test the new meal-plan feature on a real phone. Set it up the safe way.

    • Read your context and instructions
    • Compiled the staging lifecycle

    Summary

    Staging for recipebox is ready to build. Nothing billed has been created yet: that step is yours.

    What I set up

    FileWhat it holds
    tools/staging.shup / deploy / status / down, each with --dry-run
    tools/local.shkeyless local run on throwaway data
    .staging.confAPP=recipebox-staging, PROD_APP=recipebox, region fra, volume staging_data, keys file ~/.config/recipebox/staging.env
    fly.staging.tomlcopy of fly.toml with app = "recipebox-staging", STAGING = "1", FEATURE_MEAL_PLANS = "1", sleeps when idle

    tools/staging.sh status says recipebox-staging does not exist. The dry run:

    $ tools/staging.sh up --dry-run
    Dry run: nothing below is executed. Host fly, app recipebox-staging, config fly.staging.toml.
    Would create ~/.config/recipebox/staging.env with blank lines for: OPENAI_API_KEY MAPS_BROWSER_KEY (chmod 600), then stop.
    Creating app recipebox-staging (skipped if it already exists).
      [dry-run] flyctl apps create recipebox-staging --org personal
    Creating volume staging_data (1 GB, fra).
      [dry-run] flyctl volumes create staging_data --app recipebox-staging --region fra --size 1 --yes
    Setting random SECRET_KEY ADMIN_PASSWORD (missing ones only).
      [dry-run] flyctl secrets import --stage --app recipebox-staging  (generated values on stdin)
      [dry-run] flyctl secrets import --stage --app recipebox-staging  (values on stdin)
    Deploying ~/code/recipebox (branch meal-plans) to recipebox-staging.
      [dry-run] flyctl deploy --config fly.staging.toml --app recipebox-staging --ha=false
    Seeding staging.
      [dry-run] flyctl ssh console --app recipebox-staging -C 'python /app/tools/seed_demo.py'
    Done: https://recipebox-staging.fly.dev
    

    Your turn

    1. Approve the build: tools/staging.sh up creates a Fly app and a 1 GB volume (bills while awake, a few dollars a month at most).
    2. The first up writes ~/.config/recipebox/staging.env and stops. Put staging's own keys in it, in your editor. I won't read it.
    3. Run up again. I'll then deploy after each change and send your teammate the URL.
    4. When testing is over, run tools/staging.sh down and type recipebox-staging. Your keys file stays, so the next up rebuilds in minutes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    What it does

    Gives your agent a release path it follows on every project: tests → local → staging → production, with a staging copy that exists only while you are testing.

    • tools/staging.sh: up creates whatever is missing (Fly app, volume, random app secrets), pushes staging's own keys, deploys and seeds demo data. deploy ships code only. status shows secret names, never values. down deletes it. --dry-run on every command.
    • tools/local.sh: starts your app with every name in your .env files set to empty, on throwaway data, so a local run can never spend money or send mail.
    • SKILL.md: tells the agent which steps it may run alone (tests, local, dry runs, status, deploy) and which need you (creating or deleting billed resources, anything in production).

    Why

    The classic Fly.io accident: flyctl deploy in a repo with fly.toml goes to production. This script names the staging app and staging config on every call, and refuses to run if:

    • the app name lacks staging, equals your production app, or disagrees with the config file
    • the keys file sits inside the repo or any git checkout

    Secrets stay yours

    Keys live in one file outside the repo, chmod 600. Only the names you list are read, and values reach Fly over stdin, never on a command line or in the agent's context. App secrets are generated once and never printed. down asks you to type the app name on a terminal; piped input is refused, so an agent cannot confirm a delete for you.

    Adopt it

    Ask your agent to "adopt staging-lifecycle in this project". It copies the templates, writes .staging.conf and fly.staging.toml, runs up --dry-run, and leaves the first real up to you. See EXAMPLE.md for a filled-in project.

    Fly.io today. The script dispatches through per-host functions, so other hosts can be added.

    Fly.io only today; other hosts need their own host functions in staging.sh. Needs a local shell (macOS, Linux or WSL). The first up (creates billed resources) and every down are left to you on purpose. local.sh assumes your dotenv loader does not override variables that are already set.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    Requires

    Fly
    flyctl, signed in to a Fly.io account
    bash and git
    Python 3 or openssl

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Network Access

    Allowed Hosts

    fly.io
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    A SKILL.md that teaches your agent the tests, local, staging, production path, plus templates it copies into your project: tools/staging.sh (up, deploy, status, down, each with --dry-run), tools/local.sh (keyless local run), a .staging.conf example and a filled-in example project.

    Not out of the box. staging.sh calls the host through a small set of per-host functions (create app, import secrets, deploy, destroy). Adding Render, Railway or another host means writing that set; the workflow and safety rules stay the same.

    Staging's keys live in one file outside the repo, chmod 600; the script refuses a keys file inside any git checkout. You fill it in your own editor. Only the names you list are read, and values go to Fly over stdin, never on a command line. The skill tells the agent never to open, print or type a key.

    Every flyctl call names the staging app, and every deploy passes the staging config. The script refuses to run if the app name lacks "staging", equals your production app, or disagrees with the app line in the staging config. Production deploys are never part of the script.

    The skill is a one-time US$5. Staging itself bills on your Fly.io account while it exists: a small volume plus a machine that sleeps when idle. The skill's habit is to create staging for a test round and run `down` afterwards; your keys file stays, so the next `up` rebuilds it in minutes.

    Ask your agent to adopt staging-lifecycle. It copies the templates into tools/, writes .staging.conf and fly.staging.toml from your fly.toml, edits the start command in local.sh, and runs `up --dry-run` so you can read the exact commands. You run the first real `up`.

    New in DevOps & Cloud