Engineering
Write a one-off script to fix bad data
Ask Merlin in Slack for a script to fix bad data. It dry-runs it read-only, reports the rows it would change and opens a pull request for a person to run.
@Merlin from now on, when someone in #eng asks for a script to fix bad data, write it in acme/web and dry-run it against Supabase with read-only queries. Reply in the thread with how many rows it would change and a few examples, and open a pull request with the script. Never write to the database: a person reviews the pull request and runs the script.
- Starts whenAn engineer asks
@Merlinin#engfor a script to fix rows a bug left wrong Merlin worksClaude Code or Codex writes the script, then dry-runs it with read-only queries in Supabase to find the rows it would change
- You getThe row count and a few examples in the thread, plus a pull request with the script. A person runs it
Tools
- Slack
- Supabase
- GitHub
Capabilities
- Integrations
- Your agent's MCP
How it works
From rows a bug left wrong to a reviewed fix script and its dry run.
Mention
@Merlinin#engwith what the bug got wrong and what the rows should say. Teammates can add rules in the thread.Claude Code or Codex writes the script in your repository, then dry-runs it with read-only queries in Supabase to find the rows it would change.
The row count and a few examples land in the thread, with a pull request for the script. Merlin never writes to the database: a person reviews the pull request and runs it.
Mention @Merlin in #eng with what the bug got wrong and what the rows should say. Teammates can add rules in the thread.
Claude Code or Codex writes the script in your repository, then dry-runs it with read-only queries in Supabase to find the rows it would change.
The row count and a few examples land in the thread, with a pull request for the script. Merlin never writes to the database: a person reviews the pull request and runs it.
Acme
Channels
general
eng
product
support-eng
data
finance
it-help
legal
Direct messages
Merlin
Hana
Tom
eng
24
Today
Hana11:20
@Merlin the invite bug fixed in acme/web#612 gave invited members the owner role between Oct 20 and 22. Can you write a script that sets them back to the role on their invite?
Message #eng
Before and after
A data fix is written, dry-run and reviewed before anyone touches production.
Without Merlin
An engineer writes the fix by hand, checks it against production carefully and pastes counts into Slack.
- 01Read the bug report
- 02Read the bug's fix
- 03Find the affected rows
- 04Exclude manual role changes
- 05Check a few rows by hand
- 06Write the fix script
- 07Add a dry-run mode
- 08Post the row count
- 09Open a pull request
- 10Ask someone to review it
With Merlin
One mention gets the script and its dry run, and a person still decides when it runs.
@Merlinin#engAsked by the engineer in SlackWrites the script and dry-runs it on Hana's MacBookCodex with read-only Supabase
- Script pull request and the row countA person reviews and runs it
Setup
Add Merlin to #eng, then give the agent read-only Supabase.
Set these up once and anyone in the channel can ask for a data fix script. Merlin never writes to the database.
- 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.
- 02Add Merlin to SlackIntegrationsInstall the Slack app and add Merlin to the channel you work in. A private channel needs
/invite @Merlin. - 03Add Supabase to your agentYour agent's MCPConnect the Supabase 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.
- 06Keep Supabase read-onlyYour agent's MCP
Connect the Supabase MCP server in read-only mode and scope it to one project, so the dry run can query rows but never write them.
- 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 handle data fix requests.
@Merlin from now on, when someone in #eng asks for a script to fix bad data, write it in acme/web and dry-run it against Supabase with read-only queries. Reply in the thread with how many rows it would change and a few examples, and open a pull request with the script. Never write to the database: a person reviews the pull request and runs the script.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time someone mentions Merlin in Slack
- IntegrationThe Slack app spots the mention
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex writes the script and dry-runs it
- SteeringYour team steers the work in the thread
- ResultMerlin opens the pull request and reports the rows
Related use cases
More tasks you can hand to Merlin.
- IntegrationsSkills
Engineering
Fix a bug from a Linear issue
Delegate a triaged bug to Merlin. It writes a failing test first, fixes the bug on a teammate's machine and links the pull request on the issue.
Bug issue delegated to MerlinPull request linked on the issue - IntegrationsYour agent's MCP
Support
Find every customer a bug affected
Mention Merlin on a bug in Linear. It finds the accounts in the bug's Sentry events and their conversations in Intercom or Pylon, then comments the list on the issue.
@Merlinin a comment on the bugThe affected accounts on the issue - IntegrationsMemoryYour agent's MCP
Engineering
Find what changed since the last deploy
Ask Merlin in Slack what changed since the last deploy. You get the pull requests that went out, what each touched and which look risky.
@Merlinin#engWhat went out, risky changes flagged
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.