Engineering
Add the missing tests to a pull request
Mention Merlin on a pull request that needs tests. It writes tests for the changed code, runs them and pushes them to your branch.
@Merlin from now on, when someone asks you to add tests to a pull request in this repository, write tests for the code it changes, following the patterns in our existing tests. Run them and push only the tests to the same branch. Don't change the code under test: if a test exposes a bug in the change, reply with the failing case instead of pushing it.
- Starts whenSomeone mentions
@usemerlin-aion a pull request and asks for tests Merlin worksClaude Code or Codex writes tests for the changed code in your existing test style and runs them on a teammate's machine
- You getNew tests pushed to the branch and a reply listing what they cover
Tools
- GitHub
Capabilities
- Integrations
How it works
From a review that asks for tests to tests on the branch.
Mention
@usemerlin-aion the pull request and say what needs tests. A reviewer's comment above it is enough context.Claude Code or Codex writes tests for the changed code in the style of your existing tests and runs them on a teammate's machine. It leaves the code under test alone.
The tests land as new commits with a reply listing what they cover. If a test exposes a bug in the change, Merlin replies with the failing case instead.
Mention @usemerlin-ai on the pull request and say what needs tests. A reviewer's comment above it is enough context.
Claude Code or Codex writes tests for the changed code in the style of your existing tests and runs them on a teammate's machine. It leaves the code under test alone.
The tests land as new commits with a reply listing what they cover. If a test exposes a bug in the change, Merlin replies with the failing case instead.
acme/web
Type/to searchLRetry failed invoice emails#622Code
Openleewants to merge 2 commits intomainfromlee/invoice-email-retry
jorequested changes40 minutes ago
The retry logic looks right, but nothing tests it. Can we get tests before this merges?
Before and after
Tests stop being the last chore before merge.
Without Merlin
The author switches back to an old branch, works out the test setup and writes every case by hand.
- 01Read Jo's review
- 02Stash your current work
- 03Check out the branch
- 04Find a similar test to copy
- 05Fake the mail provider
- 06Write the retry cases
- 07Write the give-up case
- 08Run the tests
- 09Push to the branch
- 10Reply to Jo
With Merlin
One mention gets the tests written and pushed while the author stays on their next task.
@usemerlin-aiunder the reviewAsked by the author on GitHubWrites and runs the tests on Lee's MacBookClaude Code copies your test style
- Tests pushed and reply postedThe code under test is untouched
Setup
Install the GitHub app, then hand off missing tests.
Set this up once and anyone can ask for tests on any pull request in your repositories.
- 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.
- 02Install the GitHub appIntegrationsPick the repositories Merlin can access. It sees mentions, reads the pull request and replies in the thread. Pushes use the machine owner's own Git access.
- 03Make the tests runnable on the machineRuntime
Merlin runs the new tests before it pushes them, so the machine needs what your test suite needs to run, such as the right Node version or a local test database.
- 04Paste 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 add tests to a pull request.
@Merlin from now on, when someone asks you to add tests to a pull request in this repository, write tests for the code it changes, following the patterns in our existing tests. Run them and push only the tests to the same branch. Don't change the code under test: if a test exposes a bug in the change, reply with the failing case instead of pushing it.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time someone mentions Merlin on GitHub
- IntegrationThe GitHub app spots the mention
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex writes and runs the tests
- SteeringYour team steers the work in the thread
- ResultMerlin pushes the tests and replies
Related use cases
More engineering tasks you can hand to Merlin.
- IntegrationsSkills
Engineering
Review a pull request before your teammates do
Mention Merlin on your pull request before you ask for a review. It checks the diff against your conventions and leaves inline comments, never an approval.
@usemerlin-aion your pull requestInline review comments, never an approval - IntegrationsSkillsMemory
Engineering
Address pull request feedback
Mention Merlin on a pull request and get the requested change pushed to your branch. Teammates can steer it in the comments.
@usemerlin-aiin a pull request commentCommits and a reply on the pull request - IntegrationsYour agent's MCP
Engineering
Update the docs for an API change
Mention Merlin on a pull request that changes your API. It updates the API docs to match through Mintlify and links a docs pull request to review with the code.
@usemerlin-aion a pull request that changes the APIA docs pull request, linked in a reply
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.