I built a feature flag CLI around the way I work with Claude Code, and I’m looking for people to poke holes in it. I come from a background in A/B testing. Once Claude Code was writing most of our code, keeping flags in a separate dashboard started to feel like the wrong source of truth. Claude could edit parts of it, but it couldn’t see why the flag existed, the current split, or what we learned from the previous experiment. With dif , each flag or A/B test is a Markdown file checked into the repo. dif build generates a typed client that assigns each user a variant locally, without a network call. It also refreshes dif/context.json , which gives Claude the active experiments and recent results at the start of a session. Day to day, I can tell Claude: Put the new pricing page behind a flag at 10%. Claude drafts dif/experiments/active/[experiment-name].md , wires the flag into the component, runs dif validate and dif build , then puts everything in a PR. The next session already knows that the flag exists and why it was added. dif init also installs three project skills into .claude/skills/ : one maps routes to experiment surfaces, one authors a flag or experiment, and one concludes it and records the result. The main thing I learned was to keep the skills thin. Claude handles intent and edits files people can review. The CLI handles deterministic work such as schema validation, collision checks, and code generation. Each skill leaves durable state in the repo for the next session instead of relying on chat history. A few things I’m still unsure about: If you use flags with Claude Code today, how does it find the current configuration and the reason each flag exists? Is requiring a commit and deploy for allocation changes a deal-breaker? Which changes need to happen immediately? Does splitting judgment into Claude Code skills and validation into a CLI make sense, or does it create too many moving parts? Which language or framework would this need to support before you could test it? You can try the open-source CLI without creating an account: npm install -g @dif.sh/cli cd your-project dif init Repo: github.com/dif-sh/dif Disclosure: I built this. There is also an optional hosted version, but the CLI and Claude Code skills work without it. If Claude gets lost during setup, please tell me exactly where. I’ll be in the comments. submitted by /u/dazog92
Originally posted by u/dazog92 on r/ClaudeCode
