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.

acme/web · pull requests
Get started for free
  1. Starts whenSomeone mentions @usemerlin-ai on a pull request and asks for tests
  2. Merlin worksClaude Code or Codex writes tests for the changed code in your existing test style and runs them on a teammate's machine
  3. 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-ai on the pull request and say what needs tests. A reviewer's comment above it is enough context.

acme/web

Type/to searchL
CodeIssues8Pull requests12AgentsActionsProjectsSecurityInsightsSettings

Retry failed invoice emails#622Code

Openleewants to merge 2 commits intomainfromlee/invoice-email-retry

Conversation 5 Commits 2 Checks 3 Files changed 3+48−6

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.

  1. 01Read Jo's review
  2. 02Stash your current work
  3. 03Check out the branch
  4. 04Find a similar test to copy
  5. 05Fake the mail provider
  6. 06Write the retry cases
  7. 07Write the give-up case
  8. 08Run the tests
  9. 09Push to the branch
  10. 10Reply to Jo

With Merlin

One mention gets the tests written and pushed while the author stays on their next task.

  1. @usemerlin-ai under the reviewAsked by the author on GitHub
  2. Writes and runs the tests on Lee's MacBookClaude Code copies your test style
  3. 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.

  1. 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.
  2. 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.
  3. 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.

  4. 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.

acme/web · pull requests

Once, when you paste it

  1. PromptYou paste the prompt to @Merlin
  2. GuidanceMerlin saves your rules as workspace guidance

Every time someone mentions Merlin on GitHub

  1. IntegrationThe GitHub app spots the mention
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex writes and runs the tests
  5. SteeringYour team steers the work in the thread
  6. ResultMerlin pushes the tests and replies

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.