- Home
- Skills
- Workflow Automation
- Immutable Release Deploy with Health Gates
Immutable Release Deploy with Health Gates
Replace `git pull && restart` on your Linux VPS with a deploy your agent cannot fake.
$39
Works with the AI Agents you already use
Immutable Release Deploy with Health Gates
Example session with this skill installed
Deploy commit 71da54e of our Node API to the VPS at /srv/myapp (unit myapp.service, port 3000) using the release scripts, and prove to me what is actually running afterwards.
- Read your context and instructions
- Compiled the immutable release deploy
Summary
Commit 71da54e64f8fb57ecdfd75aea6322dcdfbb63442 is live as release 20261029T083930Z-71da54e64f8f. Preflight passed, both gates passed, verification read the host back and matched byte for byte. Rollback target is the previous release 20261028T201112Z-3c9f0a7d21be.
1. Preflight
$ scripts/preflight-release.sh --repo /srv/src/myapp --commit 71da54e64f8f…3442 --check "npm ci --ignore-scripts && npm test" --out /tmp/preflight.json
preflight: archive sha256 c72d751b…b04e, 214 files, 3 shell scripts parsed OK
preflight: check command exit 0 (47 tests passed)
PASS
2. Cut
$ scripts/cut-release.sh --repo /srv/src/myapp --commit 71da54e64f8f…3442 --root /srv/myapp --preflight /tmp/preflight.json --build "npm ci --omit=dev --ignore-scripts" --chown myapp:myapp
cut-release: preflight bound (commit and archive hash match)
cut-release: wrote RELEASE_SOURCE.json
RELEASE_DIR=/srv/myapp/releases/20261029T083930Z-71da54e64f8f
3. Runtime check
deploy-release.sh --runtime node reports /usr/bin/node v22.11.0 for user myapp, the version the tests ran on.
4. Deploy
$ scripts/deploy-release.sh --root /srv/myapp --release 20261029T083930Z-71da54e64f8f --expect-commit 71da54e64f8f…3442 --unit myapp.service --health-url http://127.0.0.1:3000/healthz --ready-url http://127.0.0.1:3000/readyz
deploy-release: previous /srv/myapp/releases/20261028T201112Z-3c9f0a7d21be
deploy-release: current -> /srv/myapp/releases/20261029T083930Z-71da54e64f8f
deploy-release: systemctl restart myapp.service: active
deploy-release: healthz (liveness) OK (200) after 2s
deploy-release: readyz (readiness) OK (200) after 4s
deploy-release: DEPLOYED. Receipt: /srv/myapp/deploy-log/20261029T083930Z-71da54e64f8f.json
deploy-release: this script's exit is not proof. Run scripts/verify-deployed.sh as a separate command.
5. Verify (separate command)
$ scripts/verify-deployed.sh --root /srv/myapp --commit 71da54e64f8f…3442 --unit myapp.service --repo /srv/src/myapp --health-url http://127.0.0.1:3000/healthz --ready-url http://127.0.0.1:3000/readyz --version-url http://127.0.0.1:3000/version
STATUS CHECK DETAIL
PASS current symlink -> releases/20261029T083930Z-71da54e64f8f
PASS deployed commit matches intended 71da54e64f8f…3442
PASS unit active myapp.service active (running), main pid 48213
PASS process cwd /srv/myapp/releases/20261029T083930Z-71da54e64f8f
PASS healthz (liveness) 200 :: ok
PASS readyz (readiness) 200 :: {"ready":true}
PASS version endpoint commit response mentions 71da54e
PASS byte-level tree check 214/214 archived files identical on host
VERIFY PASS: host runs commit 71da54e64f8f…3442
Not verified
The feature you changed (invoice PDF export) was not smoke-tested by these scripts; the gate proves the service started and its dependencies answer. Run your own check now. Prune is deferred: prune-releases.sh --root /srv/myapp --keep 3 (dry run) shows it would keep current, the rollback target and one older release.
Connects securely to your tools. The creator never sees your data.
About this skill
Replace git pull && restart on your Linux VPS with a deploy your agent cannot fake. Releases are cut from an exact 40-character commit with git archive (never the working tree), staged as immutable directories with a RELEASE_SOURCE.json provenance stamp, activated by an atomic current symlink switch, gated on /healthz (liveness) and then /readyz (readiness), and rolled back automatically when a gate fails, with application state under shared/ never touched.
Scripts (bash, Linux, no dependencies beyond git, curl, tar):
preflight-release.sh: extract the commit to a temp dir, hash the archive, parse every shell script, run your test command, write a JSON result.cut-release.sh: stage the release, optional build step, bind to the preflight result, write provenance.deploy-release.sh: switch, restart the unit, poll both gates, roll back on failure, write a receipt;--runtimeprints the real interpreter the unit will use.verify-deployed.sh: read the host back: commit on disk, unit active, process cwd, endpoints,/versioncontains the commit, byte-level tree compare againstgit archive.prune-releases.sh: dry-run by default; keeps current, the rollback target and the N newest by name; refuses in-use directories.
Also: Express and FastAPI snippets for /healthz, /readyz and /version with the rules that keep them honest, a systemd unit template that runs through current, a guarded-deploy checklist (merged is not deployed is not working; never chain verification onto a mutation; cp -a never cp -al; sort releases by name never mtime), and an end-to-end test script you can run on any Linux box to see the whole flow including a forced rollback.
Single host, Linux only, code rollback not data migration.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.
Linux only. No support for macOS or Windows. Does not handle database migrations. Single-host focus with no built-in multi-server orchestration. Requires manual state management in /shared/.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
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 19 days ago
- Software
- Bash 5
Gitcurltarsha256sumSSH access to the host
- Optional
- systemd
The tools must be installed on the Linux host.