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.
- Starts whenAn analyst delegates a Linear issue describing a new metric to Merlin
Merlin worksClaude Code or Codex writes the dbt model with tests and column docs, then builds it against the dev target
- 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.
Claude Code or Codex writes the dbt model in the style of your existing models, with tests and a description for every column. It builds the model against the dev target, never production.
The pull request is linked on the issue with the row count and a few sample rows from dev. If the definition is unclear, Merlin asks on the issue first.
Delegate the Linear issue that describes the metric to Merlin. The definition in the issue is its starting point.
Claude Code or Codex writes the dbt model in the style of your existing models, with tests and a description for every column. It builds the model against the dev target, never production.
The pull request is linked on the issue with the row count and a few sample rows from dev. If the definition is unclear, Merlin asks on the issue first.
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
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.
- 01Pick up the metric request
- 02Find a model to copy
- 03Write the SQL
- 04Add tests to the YAML
- 05Describe every column
- 06Build it against dev
- 07Preview a few rows
- 08Open a pull request
- 09Link it on the issue
With Merlin
Delegate the request and get a tested model linked back while you stay on your own work.
- Issue delegated to
MerlinFrom the request in Linear Writes and builds the model in devClaude Code with dbt
- 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.
- 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.
- 02Connect LinearIntegrationsConnect your Linear workspace so issues can be delegated to Merlin.
- 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.
- 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.
- 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.
- 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.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time an issue is delegated to Merlin
- IntegrationLinear hands Merlin the issue
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex writes and builds the model
- SteeringYour team steers it from the issue
- ResultMerlin links the pull request on the issue
Related use cases
More data tasks you can hand to Merlin.
- IntegrationsYour agent's MCP
Data
Check what a dbt change does to the data
Mention Merlin on a dbt pull request to see its effect before it merges. It builds the changed models in dev and comments the row counts and changed values against production.
@usemerlin-aiin a pull request commentA data diff comment on the pull request - IntegrationsYour agent's MCP
Data
Document a table nobody understands
Ask Merlin in #data to explain a confusing table. It writes descriptions for the model and every column from the code and the data, and opens a pull request.
@Merlinin#dataA docs pull request linked in the thread - IntegrationsSkillsMemoryYour agent's MCP
Data
Answer a data question on agreed definitions
Ask Merlin for a number in #data and get it from your agreed dbt models instead of raw tables. The reply shows the SQL, the models used and the caveats.
@Merlinin#dataThe number with its SQL and caveats
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.