Skip to content

sb-dev/openquant / .agents/skills/fly

Operate Fly.io: sign in or sign up, launch and deploy apps, edit fly.toml, scale Machines across regions, manage volumes, secrets, IP addresses, certificates and custom domains, Managed Postgres, Tigris object storage and Upstash Redis, read logs and status, troubleshoot failed deploys and health checks, and run builds, tests or agents in Sprites, Fly's persistent remote Linux environments. Use this skill whenever the user mentions Fly, Fly.io, flyctl, fly.toml, Machines, deploying, scaling, regions, volumes, secrets, Postgres or MPG on Fly, Sprites, sprite-env, sprites.dev, a sandbox or remote build environment, or infrastructure operations, even if they don't say "Fly" explicitly. Also invoke it to set up Fly agent tooling (skills, MCP, login) or when the user asks to be signed up or onboarded.

FileKindSize
SKILL.mdskill md15.1 KB
references/configure.mdmarkdown9.4 KB
references/deploy.mdmarkdown7.1 KB
references/launch.mdmarkdown5.4 KB
references/machines.mdmarkdown6.6 KB
references/networking.mdmarkdown5.9 KB
references/operate.mdmarkdown6.7 KB
references/postgres.mdmarkdown6.6 KB
references/safety.mdmarkdown6.0 KB
references/scale.mdmarkdown5.3 KB
references/secrets.mdmarkdown3.9 KB
references/setup.mdmarkdown6.8 KB
references/sprites-cli.mdmarkdown9.3 KB
references/sprites.mdmarkdown17.4 KB
references/storage.mdmarkdown3.1 KB
references/tools.mdmarkdown14.4 KB
references/volumes.mdmarkdown4.6 KB

references/secrets.md

View on GitHub
# Secrets and environment

Secrets are encrypted at rest and injected as environment variables at boot.
No Fly interface returns a secret's value; `fly secrets list` shows names,
digests and deployment status. Plain configuration belongs in `[env]` in
`fly.toml` ([configure.md](configure.md)); a secret with the same name wins.

## Inspect

```bash
fly secrets list -a <app> --json          # NAME, DIGEST, status: Deployed | Staged | Partial
fly config env -a <app>                   # runtime env names from config
```

Status markers: `*` staged (not on any Machine yet), `!` partial (rolling
deploy in progress).

MCP: `list_app_secrets`, `get_app_secret` (metadata only). Their schemas show
a `show_secrets` parameter that the server refuses with an error that reads
like a missing grant; omit it, and do not read that refusal as evidence the
grant lacks secret access.

## Set

```bash
fly secrets set KEY=value -a <app>                 # sets and deploys the current image
fly secrets set KEY=value OTHER=value -a <app>     # several at once, one restart
fly secrets set KEY=value --stage -a <app>         # stage; lands on the next fly deploy
fly secrets set KEY=value --detach -a <app>        # do not wait for the restart
fly secrets import -a <app> < .env.production      # NAME=VALUE lines from stdin
fly secrets import --stage -a <app> < secrets.txt
fly secrets deploy -a <app>                        # deploy staged secrets without a code deploy
fly secrets sync -a <app>                          # refresh flyctl's view after changes elsewhere
```

Every `set` without `--stage` restarts the app's Machines. Before a first
deploy, or when setting several values across commands, use `--stage` and let
`fly deploy` carry them. Values with special characters: quote them in the
shell, or prefer `import` from a file that is not committed.

Getting values in without exposing them:

- Read from a file the user already has (`fly secrets import < file`).
- Pipe from a secret manager (`op read ... | xargs -I{} fly secrets set
  KEY={}` is still visible in process listings; prefer `import` with a
  heredoc or file).
- Ask the user to run the command themselves when the only source is their
  clipboard. Never ask them to paste a value into chat.

In your reply, name the keys you set and the digest or status from `fly
secrets list`. Never repeat values, not even partially, and do not include
them in a confirmation prompt's reason.

MCP: `set_app_secret` (`body.value`), `update_app_secrets` (`body.values`
mapping; `null` deletes and also needs `fly:secrets:delete`; the upstream
bulk API needs create, write and delete bits even for sets, so do not work
around a rejected grant), both metadata-only results.

## Remove

```bash
fly secrets unset KEY -a <app>              # removes and redeploys
fly secrets unset KEY --stage -a <app>
```

MCP: `delete_app_secret`; deletion is idempotent and can report success for a
name that was already absent, so confirm with `list_app_secrets`.

## Build-time secrets

Deploy-time secrets are not available during the image build. Use
`fly deploy --build-secret KEY=VAL` and `RUN --mount=type=secret,id=KEY` in
the Dockerfile. Build args (`--build-arg`) are baked into the image; never
pass credentials as args.

## Files from secrets

`[[files]] secret_name = "NAME"` writes a base64-encoded secret to a path in
the Machine at deploy time, for certificates and config files. `fly machine
run --file-secret /path=NAME` does the same for one Machine.

## Common keys

- `DATABASE_URL`: set by `fly mpg attach` / `fly postgres attach`.
- `REDIS_URL`: set by `fly redis create` when attaching.
- `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_ENDPOINT_URL_S3`,
  `AWS_REGION`, `BUCKET_NAME`: set by `fly storage create`.
- `SECRET_KEY_BASE`, `RAILS_MASTER_KEY`, `SESSION_SECRET`: often generated by
  `fly launch` scanners.

Checked against flyctl v0.4.123 and mcp.fly.io on 2026-10-28.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall