Know who a flag change hits before you ship it.

FlagTwin runs your Flagsmith change against your real users first, warns when an override will quietly undo it, waits for a human yes, then applies, verifies against the live server and keeps an undo.

~/shop $real output, demo environment
$ flagtwin preview new-checkout --disable
Change: disable new-checkout (environment default) [Development]
Impact: 0 of 21 sampled users flip
WARNING [SHADOWED] 8 user(s) stay ON: segment
  premium-users takes priority over this change.
WARNING [NO_OP] This change flips nobody in the sample.
Preview id: 20261129-144642-61b5

$ flagtwin preview new-checkout \
    --segment premium-users --remove-override
Impact: 8 of 21 sampled users flip
     8  ON -> OFF
No warnings.

8 of 21

users would still have seen the new checkout after someone “turned it off”. The default was already off; a segment override for premium users kept it on, and the Flagsmith dashboard would have shown the change as done.

A flag change is a production deploy with no diff and no review. FlagTwin gives it both, using the same environment document and evaluation engine the Flagsmith SDKs use, so the preview matches the server for every user and flag we tested.

Five steps, one engine

  1. 01Previewflagtwin preview new-checkout --disable

    Simulate the change on a copy of the environment document with the Flagsmith engine, for every real identity. Nothing is written.

  2. 02Approve“Apply this to Development?” / /approve

    A human reads who flips and every warning, then says yes. Agents and the bot cannot skip this.

  3. 03Applyflagsmith flag delete new-checkout --segment premium-users --yes

    Refused if the flag changed since the preview. Otherwise runs exactly the command that was reviewed.

  4. 04VerifyPOST /api/v1/identities/ (transient)

    Waits for the change to land, then asks the live server how it evaluates a sample of users and compares.

  5. 05Undoflagtwin undo last

    Every preview stores its reverse change, with the same drift check and verification.

Where it runs

Three front ends share the engine. Every write goes through the Flagsmith CLI v2.

FormWhereStart withTrack
Agent skillClaude Code, OpenCode, Kiro, any agent that reads SKILL.mdskills/flagsmith-safe-changeTrack 04
GitHub botComments on issues and pull requests, run by GitHub Actions/flagtwin turn off new-checkout for everyoneTrack 02
CLIYour terminal or CIuv tool install git+https://github.com/Sarcastic-Soul/flagtwinBoth

The agent cannot write

The bot's LLM gets four tools: list flags, list overrides, list segments, preview. Nothing that changes Flagsmith. A change is applied only when someone with write access to the repository replies /approve, and only the exact change that was previewed.

Tested on three agents

Claude Code with Sonnet and Kiro with GPT 5.6 Luna caught the shadowed override and stopped for approval. A small model in OpenCode ignored the skill and tried direct writes; the shipped permission allowlist blocked every one. That is why the skill comes with allowlists, not just instructions.