Data

Add a new metric as a dbt model

Delegate a metric request in Linear to Merlin. It writes the dbt model with tests and docs, runs it in dev and links the pull request on the issue.

@Merlin from now on, when a metric request is delegated to you, write it as a dbt model that follows the patterns of our existing models, with tests and a description for every column. Build it and run its tests against the dev target, never production, then open a pull request linked on the issue with the row count and a few sample rows. If the definition in the issue is ambiguous, ask on the issue before writing the model.

DATA · metrics
Get started for free
  1. Starts whenAn analyst delegates a Linear issue describing a new metric to Merlin
  2. Merlin worksClaude Code or Codex writes the dbt model with tests and column docs, then builds it against the dev target
  3. You getA pull request linked on the issue, with the model's row count and a few sample rows from dev

Tools

  • Linear
  • dbt
  • GitHub

Capabilities

  • Integrations
  • Your agent's MCP

How it works

From a metric request to a dbt model pull request.

Delegate the Linear issue that describes the metric to Merlin. The definition in the issue is its starting point.

DADATA › Issues › DATA-142

Add net revenue retention by plan

Monthly NRR by plan: this month's MRR from customers who were paying 12 months ago, divided by their MRR then. Include expansion, contraction and churn.

Activity

Leodelegated the issue to Merlin·now

Leave a comment…

Properties

Todo

Leo

Merlin

Labels

Metric

Before and after

Metric requests ship as tested models, not one-off queries.

Without Merlin

An analyst fits the request between other work, then writes the model, tests and docs by hand.

  1. 01Pick up the metric request
  2. 02Find a model to copy
  3. 03Write the SQL
  4. 04Add tests to the YAML
  5. 05Describe every column
  6. 06Build it against dev
  7. 07Preview a few rows
  8. 08Open a pull request
  9. 09Link it on the issue

With Merlin

Delegate the request and get a tested model linked back while you stay on your own work.

  1. Issue delegated to MerlinFrom the request in Linear
  2. Writes and builds the model in devClaude Code with dbt
  3. Pull request linked on the issueWith the row count and sample rows

Setup

Connect Linear and GitHub, keep the dbt project on a machine, then delegate.

Set these up once and anyone on the data team can hand a metric request to Merlin from its issue.

  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. 02Connect LinearIntegrationsConnect your Linear workspace so issues can be delegated to Merlin.
  3. 03Add dbt to your agentYour agent's MCPConnect the dbt MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  4. 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.
  5. 05Keep your code on the machineRuntimeMerlin reads the code in a local project on the runtime, so keep the repository checked out there.
  6. 06Give dbt a dev targetRuntime

    Set a dev target in the dbt profile on that machine that writes to its own schema, so builds land there and never in production tables.

  7. 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 take on a metric request.

@Merlin from now on, when a metric request is delegated to you, write it as a dbt model that follows the patterns of our existing models, with tests and a description for every column. Build it and run its tests against the dev target, never production, then open a pull request linked on the issue with the row count and a few sample rows. If the definition in the issue is ambiguous, ask on the issue before writing the model.

DATA · metrics

Once, when you paste it

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

Every time an issue is delegated to Merlin

  1. IntegrationLinear hands Merlin the issue
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex writes and builds the model
  5. SteeringYour team steers it from the issue
  6. ResultMerlin links the pull request 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.