Engineering
Speed up a slow test suite
Ask Merlin in Slack to speed up a slow test suite. It profiles it, fixes the slowest tests or setup and opens a pull request with the before and after times.
@Merlin from now on, when someone in #eng asks you to speed up a test suite, profile it in acme/web and find the slowest tests and setup. Fix the biggest causes without deleting or skipping tests or weakening what they check. Open a pull request with the before and after times and link it in the thread.
- Starts whenAn engineer asks
@Merlinin#engto speed up a test suite Merlin worksClaude Code or Codex profiles the suite on a teammate's machine and fixes the slowest tests or shared setup
- You getA pull request with the before and after times, linked in the thread
Tools
- Slack
- GitHub
Capabilities
- Integrations
How it works
From a slow test suite to a pull request with the times.
Mention
@Merlinin#engwith the suite that's slow. Teammates can add limits in the thread.Claude Code or Codex times the suite on a teammate's machine, finds the slowest tests and setup and fixes the biggest causes. It doesn't delete or skip tests or loosen what they check.
The pull request lists the before and after times, and its link comes back in the thread.
Mention @Merlin in #eng with the suite that's slow. Teammates can add limits in the thread.
Claude Code or Codex times the suite on a teammate's machine, finds the slowest tests and setup and fixes the biggest causes. It doesn't delete or skip tests or loosen what they check.
The pull request lists the before and after times, and its link comes back in the thread.
Acme
Channels
general
eng
product
support-eng
data
finance
it-help
legal
Direct messages
Merlin
Omar
Priya
eng
24
Today
Omar11:02
@Merlin pnpm test:integration in acme/web takes 14 minutes now. Can you find what's slow and speed it up?
Message #eng
Before and after
A slow suite gets fixed instead of tolerated.
Without Merlin
Someone sets aside a day to profile the suite, then fixes what they find between other work.
- 01Run the suite with timings
- 02Sort the files by time
- 03Read the shared setup
- 04Find the fixed sleeps
- 05Ask which tests need a fresh database
- 06Share the database setup
- 07Replace sleeps with waits
- 08Rerun and compare times
- 09Open a pull request
- 10Post the times in #eng
With Merlin
One mention gets the suite profiled and a faster version up for review.
@Merlinin#engAsked by an engineer in SlackProfiles and fixes it on Omar's MacBookCodex, with no tests skipped
- Pull request with before and after timesLinked in the thread
Setup
Add Merlin to #eng and keep the code on a machine that can run the suite.
Set these up once and anyone in #eng can ask for a faster suite.
- 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. - 03Install 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.
- 04Keep your code on the machineRuntimeMerlin reads the code in a local project on the runtime, so keep the repository checked out there.
- 05Run it where the suite can runRuntime
The suite needs what it needs in CI, such as a local database. Keep those running on the machine Merlin uses, so the before and after times compare like with like.
- 06Paste 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 take on a slow test suite.
@Merlin from now on, when someone in #eng asks you to speed up a test suite, profile it in acme/web and find the slowest tests and setup. Fix the biggest causes without deleting or skipping tests or weakening what they check. Open a pull request with the before and after times and link it in the thread.
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 profiles and fixes the suite
- SteeringYour team steers the work in the thread
- ResultMerlin links the pull request with the times
Related use cases
More engineering tasks you can hand to Merlin.
- AutomationsIntegrations
Engineering
Fix the flakiest test every week
Every week, Merlin finds the test that failed most often without a code change, fixes the cause and opens a pull request. You get the link in #eng.
Every Monday at
10:00A fix pull request, linked in#eng - IntegrationsSkills
Engineering
Fix a red CI run
Mention Merlin on a pull request with a failing check. It reads the job log, reproduces the failure and pushes a fix, or shows why the test is flaky.
@usemerlin-aion a pull request with a red checkA fix commit, or a flake verdict with evidence - 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
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.