Hacker
Vikram Singh
@vikramsingh
Projects
ship-safely: staged Flagsmith rollouts an agent can't get wrong
Flagsmith Experimentation HackathonNov 2026
ship-safely is an Agent Skill that takes a code change from "merged behind a Flagsmith flag" to "on for everyone, flag removed", or to "off for everyone, with a written trail". Never somewhere in between. The problem: risky changes still go to 100% at once, and when a coding agent drives a rollout it tends to stop halfway, skip checks, or leave the flag and its segment behind as debt. ship-safely gives the agent one job with a clear end: preflight, start at 5%, a health gate at every stage, widen 25% → 50% → 100% with a human yes before each step, kill instantly if a gate fails, finish (flag on for everyone, rollout segment deleted), and archive once the flag is out of the code. Who uses it: any team that ships behind Flagsmith flags and lets a coding agent (Claude Code, Codex, Cursor…) do the release. You say "ship the new checkout safely, health command npm run smoke", and the agent runs the whole job, stopping to ask you before every change to production. How it works: one bash script (scripts/rollout.sh) with eight commands, each printing one line of JSON. Every command that changes Flagsmith refuses to run without --approved, which the skill tells the agent to pass only after a human says yes for that exact step. The gate first waits until Flagsmith actually serves the new percentage (edge servers lag a few seconds, so a health check that runs too early would pass for the wrong reason), then runs your health command and keeps only its exit code and last line. A kill turns the flag off for the segment and the environment default and writes .ship-safely/<feature>-incident.md with the cause, stage, last gate and the resume command.