Engineering
Remove a feature flag that's fully rolled out
Mention Merlin on a flag cleanup issue in Linear. It checks the gate is fully rolled out in Statsig, removes the flag and its dead code and opens a pull request.
@Merlin from now on, when someone asks you in a Linear comment to remove a feature flag, first check in Statsig that its gate passes for 100% of users. Then remove the flag checks and the branch that no longer runs, keep the tests green and open a pull request in acme/web linked to the issue. If the gate isn't fully rolled out, reply on the issue with its current state and change nothing. Only read Statsig: don't change the gate.
- Starts whenSomeone mentions
@Merlinin a comment on a flag cleanup issue Merlin worksClaude Code or Codex checks the gate is at 100% in Statsig, then removes the flag checks and the code path that no longer runs
- You getA pull request that removes the flag and the dead branch, linked on the issue
Tools
- Linear
- Statsig
- GitHub
Capabilities
- Integrations
- Your agent's MCP
How it works
From a flag cleanup issue to a pull request without the dead code.
Mention
@Merlinin a comment on the issue and name the flag to remove.Claude Code or Codex checks that the gate passes for 100% of users in Statsig, then removes the flag checks and the code path that no longer runs, with the tests still passing.
The pull request is linked on the issue. If the gate isn't fully rolled out, Merlin replies with its current state and changes nothing. It never changes the gate.
Mention @Merlin in a comment on the issue and name the flag to remove.
Claude Code or Codex checks that the gate passes for 100% of users in Statsig, then removes the flag checks and the code path that no longer runs, with the tests still passing.
The pull request is linked on the issue. If the gate isn't fully rolled out, Merlin replies with its current state and changes nothing. It never changes the gate.
ENENG › Issues › ENG-472
Remove the new_checkout flag
The new checkout has been at 100% for three weeks. Remove the flag and the old checkout code.
Activity
Leonow
@Merlin can you remove new_checkout? Check it's really at 100% first.
Properties
In Progress
Leo
Labels
Tech debt
Before and after
Rolled-out flags get cleaned up instead of piling up.
Without Merlin
An engineer confirms the rollout, hunts down every flag check and works out which branch is now dead.
- 01Open the cleanup issue
- 02Check the gate's rollout
- 03Look for overrides
- 04Search for every flag check
- 05Delete the old checkout path
- 06Delete its tests
- 07Run the test suite
- 08Open a pull request
- 09Link it on the issue
With Merlin
One comment gets the rollout confirmed and the flag removed in a pull request ready for review.
@Merlinon the cleanup issueAsked in a Linear commentChecks Statsig, then removes the flag on Leo's MacBookClaude Code with read-only Statsig
- Pull request linked on the issueThe gate itself is untouched
Setup
Connect Linear and GitHub, then give the agent Statsig.
Set these up once and anyone can ask Merlin to clean up a flag from its issue. If the gate isn't fully rolled out, Merlin replies with its state and changes nothing.
- 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
- 02Connect LinearIntegrationsOnce you connect your Linear workspace, Merlin can read the linked issue and comment there too.
- 03Add Statsig to your agentYour agent's MCPConnect the Statsig MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
- 04Install the GitHub appIntegrationsPick the repositories Merlin can access, so it can read and link the pull requests there. Pushes use the machine owner's own Git access.
- 05Keep your code on the machineRuntimeMerlin reads the code in a local project on the runtime, so keep the repository checked out there.
- 06Give Statsig read-only accessYour agent's MCP
Sign the Statsig MCP server in with read-only access on the machine that runs this, so the run can check a gate's rollout but can't change it.
- 07Paste the setup promptGuidanceAn owner or admin sends the prompt below to @Merlin once, and it becomes workspace guidance for every future run.
Prompt
Tell Merlin how to remove a rolled-out flag.
@Merlin from now on, when someone asks you in a Linear comment to remove a feature flag, first check in Statsig that its gate passes for 100% of users. Then remove the flag checks and the branch that no longer runs, keep the tests green and open a pull request in acme/web linked to the issue. If the gate isn't fully rolled out, reply on the issue with its current state and change nothing. Only read Statsig: don't change the gate.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time someone mentions Merlin on an issue
- IntegrationLinear sends Merlin the comment
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex checks the gate and removes the flag
- SteeringYour team steers it from the issue
- ResultMerlin links the pull request on the issue
Related use cases
More tasks you can hand to Merlin.
- IntegrationsYour agent's MCP
Product
Read out an experiment and write the decision
Message Merlin the name of an experiment that has ended. It reads the results and guardrails in Statsig and writes the readout, with a recommended decision, on its Linear issue.
Direct message to@MerlinA readout on the experiment's issue - Integrations
Engineering
Refactor a module without changing what it does
Delegate a refactor to Merlin in Linear. It adds tests where coverage is thin, cleans up the module with the tests green and opens a pull request.
Refactor issue delegated to MerlinPull request with the tests still green - Integrations
Engineering
Upgrade a dependency and fix what breaks
Delegate a dependency upgrade to Merlin in Linear. It bumps the version, fixes the breaking changes and opens one pull request linked on the issue.
Upgrade issue delegated to MerlinOne pull request, linked on the issue
Bring your coding agents into the tools your team already uses.
Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.