Download for MacApple silicon, macOS 14+
Skill

metrics-query

@betterstackhq Updated 2026-10-23

MUST load BEFORE writing any Better Stack metrics SQL query. Better Stack's pre-aggregated metrics dialect (Merge functions, template variables, storage layouts, the ways a query silently blends series) - without it queries fail or return wrong numbers. Also load when the user asks how metrics queries look.

Install

With your agent

Install OMGSkills skill "betterstackhq/claude-plugin:skills/metrics-query" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/BetterStackHQ/claude-plugin /tmp/claude-plugin && ln -s /tmp/claude-plugin/skills/metrics-query ~/.claude/skills/metrics-query

From README

Metrics Query Guide Metrics tables hold pre-aggregated ClickHouse state columns. Below are the facts ClickHouse knowledge does not give you; everything else is standard SQL. Where the query runs Better Stack runs SQL in two places, and the query text differs: Dashboard charts and chart alerts (addcharttodashboard, editchart, createchartalert): write the query as this skill shows it, with the template variables {{source}}, {{time}}, {{starttime}} and {{endtime}}. The dashboard resolves them. Chart queries always read the source's metrics collection. Ad-hoc queries (query, renderchart): there are no template variables. First call the help tool for the data type with the source ID (queryhelp for logs and spans, metricsqueryhelp for metrics, errorsqueryhelp for errors): it names the source's collections and the table to pass. Put the collection where {{source}} stands (e.g.