Redeploy a Live Trading Bot Safely (PM2, Go)

    by Claude Workflow Lab

    1

    A careful, repeatable procedure for shipping a new build of a running crypto trading service without an outage or a double-trade.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Checks for new required environment variables to prevent boot crashes
    • Verifies the trading account is flat before any service restart
    • Creates a timestamped backup of the current binary before overwriting it
    • Runs tests directly on the host server to confirm the build is healthy
    • Proves the new version is live by finding a specific marker in the logs
    • Monitors the process ID and restart counter to ensure stability after launch

    Who it's for

    Founders running trading bots

    Update your live trading bots without losing money or missing trades.

    Try asking: “Redeploy my ETH trader on the Linux server.”

    Freelance developers managing client servers

    Ship updates to live services with a safety net and proof that the new code is actually running.

    Try asking: “Update the backend service and check if the new version is live.”

    Small crypto teams

    Keep your trading services stable by catching missing settings before they crash your bots.

    Try asking: “Deploy the latest commit to the production host and check the account status.”

    Redeploy a Live Trading Bot Safely (PM2, Go)

    Example session with this skill installed

    Deploy the latest main of my trader to the staging host. Check env changes first, make sure no position is open, and prove the new build is the one running.

    • Read your context and instructions
    • Compiled the redeploy a live

    Example on a fictional setup (host trading-1, service trader under PM2). Following live-service-redeploy the agent first diffed the required environment variables referenced by the new commit against the host env file and found one new required variable, EXCHANGE_TIMEOUT_MS, which would have caused a panic at boot. It stopped, proposed the line to add, and asked for the value.

    After that: account check showed no open positions and no conditional orders, so the restart was safe. It backed up the live binary as trader.prev-0412, built on the host, ran the unit tests, compared sha256 of the build against the uploaded file, swapped the binary and restarted by the exact PM2 name from the process list (not the similarly named stopped entry).

    Verification: the restart count moved by exactly one, no panic lines after the boot marker, and the new boot line "build marker v2" appeared in the log. binary_identity.sh printed the running executable's sha256 and the module graph, matching the intended commit. Rollback command was left ready: swap trader.prev-0412 back and restart. The agent listed three old rollback copies for pruning and asked before deleting anything.

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

    About this skill

    A careful, repeatable procedure for shipping a new build of a running crypto trading service without an outage or a double-trade. It is written for Go services run under PM2 on a Linux host, and the checks carry over to similar stacks.

    What is inside:

    • SKILL.md - the full procedure: diff the new code's required environment variables against the host's env file so nothing panics at boot, confirm the account is flat before restarting, back up the current binary, build and test on the host, restart by the real process name (not by a guess), and verify with a marker that only the new build prints. It also covers rollback and the control-plane case (HTTP API, Postgres migrations, static admin panel).
    • references/service-types.md - how the procedure changes per service type, and how to prune old rollback copies while keeping a ledger of which build ran when.
    • scripts/binary_identity.sh - reads the running binary from the process table and prints its start time, sha256, build settings and module graph, so "is commit X live" is answered from the binary, not from memory.
    • scripts/par_upload.sh - uploads a binary to several hosts in parallel with a per-host exit line.
    • scripts/swap_binary.sh - moves the live binary aside, installs the new one, checks the hash.

    Who it is for: solo operators and small teams who deploy their own trading services and have been bitten by a missing env var, a half-updated library or a restart in the middle of a position. Needs SSH access, bash and, for Go, a toolchain. Nothing here places trades. Also included in the Crypto Trading Ops Playbooks pack at a lower per-skill price.

    Requires SSH access to a Linux host with PM2 installed. It is designed for Go services but can adapt to others.

    This skill automates a deployment runbook for Go-based services managed by PM2 on Linux. It performs git diffs to find env-var panics, uses SSH for remote commands, and reads /proc/pid/exe to verify binary identity. It handles backups, builds, and log verification to ensure zero-downtime updates and provides a fast rollback path using previous binary copies.

    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 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 1 day ago

    Software
    bash, curl, sha256sum on the host
    Go toolchain on the host
    orbuild machine (for Go services)
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    This skill helps you update live trading programs running on Linux servers without causing outages. It checks for missing settings that could crash the service, ensures you have no open trades at risk, backs up the old version, and verifies the new version is actually running.

    You need a Linux server running your service under PM2 (a process manager). You should also have your code in a Git repository and have Go installed on the server if you want to build the program directly on the host.

    The skill will provide a report showing exactly which code versions were shipped, any settings that were changed, and proof that the new version is live. It also creates a backup of your previous program so you can switch back quickly if something goes wrong.

    This skill is designed for one-at-a-time updates to a single server and should not be used to launch multiple sub-agents at once. It also requires you to provide the specific process names and login details for your server and trading exchanges.

    You can tell your agent to update the service on the server, deploy the latest code to the trader, or check if a specific commit is currently live on the box. It works best when you provide the specific folder name and process name for your trading service.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.