Install
openclaw skills install bluegreenpilotGuide safe blue-green deployments with persistent repo config, environment state, health checks, explicit switch confirmation, and rollback discipline.
openclaw skills install bluegreenpilotUse this skill when the user wants to configure, plan, verify, deploy, promote, switch traffic, or roll back a blue-green deployment flow.
BlueGreenPilot is a deployment safety protocol. It must help the user operate their real environment without relying on chat memory or guessing.
.bluegreenpilot/config.yaml..bluegreenpilot is missing and the
user mentions production, first ask whether production already exists.dev, homolog, staging,
and prod are environments; blue and green are slots inside one
environment.homolog is green or prod is blue unless config explicitly
models that nonstandard topology and the user confirms the risk.homolog and prod, treat it as a candidate for mapping,
not as proof that blue-green is already implemented.homolog as production-like for safety checks and data policy, but not
as a production traffic slot unless config explicitly says so.Keep environments and slots separate.
dev, homolog, staging, and
prod.blue and
green.Correct model:
homolog
single-slot, or homolog-blue/homolog-green if explicitly configured
prod
blue: active production slot
green: inactive production candidate slot
Incorrect model:
homolog = green
prod = blue
If the user says an app has homolog and prod, say it is a good candidate for BlueGreenPilot mapping. Do not claim blue-green exists yet. First discover whether production can run two equivalent slots and switch traffic between them.
Use these files in the target application repository:
.bluegreenpilot/config.yaml
.bluegreenpilot/state.dev.yaml
.bluegreenpilot/state.homolog.yaml
.bluegreenpilot/state.prod.yaml
.bluegreenpilot/history/
config.yaml is versioned and contains topology/workflow only. Environment
state may be versioned for simple projects, but production state is usually
stored in CI artifacts, the server, object storage, or another trusted backend.
Secrets belong in .env, CI secrets, server env vars, Vault, Doppler, 1Password,
or equivalent secret storage.
The state.backend config field tells the agent where state persists across
developer machines, homolog, CI, and production. If the backend is not readable,
stop and ask how to retrieve state before planning a deploy.
.bluegreenpilot/config.yaml. If missing, run init workflow.Ask only for missing facts:
Create .bluegreenpilot/config.yaml and example state files. Do not ask for
secrets. If a command needs a secret, reference an env var name instead.
If the app is already live, do not start by proposing a blue-green switch. Adopt current production first:
blue or green.not-provisioned until the user creates
an equivalent secondary production slot. A homolog/staging environment does
not count as the inactive production slot unless the user deliberately
defines that topology and accepts the risk.adoption.mode: brownfield and inactive_slot_status: not-provisioned.If the CLI is available, use:
bluegreenpilot --project /path/to/app adopt-prod \
--app <name> \
--public-url <current-prod-url> \
--deploy-mode <docker|script|manual|ci|mixed|no-docker> \
--active-slot <blue|green> \
--source <current-release-or-commit> \
--state-backend <repo|server-file|ci-artifact|object-storage|manual>
Always show:
Target: <environment>
Current active slot: <slot or unknown>
Deploy target: <inactive slot>
Source: <branch/tag/commit>
Database policy: <snapshot/mock/empty/manual/none>
Pre-flight checks:
- ...
Deploy steps:
- ...
Verification:
- ...
Switch:
- method
- requires final confirmation: yes/no
Rollback:
- ...
Unknowns / blockers:
- ...
Before switching production, ask a direct confirmation that includes:
Do not proceed from vague approval. The user must clearly approve the switch.
For rollback:
Read only the relevant reference:
references/docker.mdreferences/no-docker.mdreferences/database.mdreferences/configuration.mdIf available, use:
bluegreenpilot init
bluegreenpilot --project /path/to/app validate --env prod
bluegreenpilot --project /path/to/app status prod
bluegreenpilot --project /path/to/app plan prod --source <branch-or-commit>
If only the skill bundle is installed, use the bundled helper:
python {baseDir}/scripts/bluegreenpilot.py init
python {baseDir}/scripts/bluegreenpilot.py adopt-prod --app <name> --public-url <current-prod-url>
python {baseDir}/scripts/bluegreenpilot.py status --env prod
python {baseDir}/scripts/bluegreenpilot.py plan --env prod
The helper is conservative. It creates templates and reports missing facts; it does not switch traffic or run destructive deployment commands.