/betterstack:map-hierarchy-chartsfrom Better Stack
Provides SQL query templates and settings for Better Stack map_chart (geographic maps) and hierarchy_chart (host map hexagons). Must load before creating either chart type on dashboards or in Explore.
Ships in Better Stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Both are not time-series: the query returns one row per location/entity — no time column, no GROUP BY time, no series. AS value is fine for both — neither renders a legend, so the value alias is never displayed. Load the query skill for the data type first (metrics-query / logs-query).
map_chart)Plot a numeric value at geographic points on a world map. Select exactly two things — a numeric value and a location — and group by the location.
Metrics:
SELECT
avgMerge(rate_avg) AS value,
location(label('colo')) AS location
FROM {{source}}
WHERE {{time}} BETWEEN {{start_time}} AND {{end_time}}
AND name = 'cloudflare_zone_colocation_requests_total'
GROUP BY location
Raw events (logs / web events, e.g. in Explore):
SELECT
COUNT(*) AS value,
location(JSONExtractCaseInsensitive(raw, 'remote_ip', 'Nullable(String)')) AS location
FROM {{source}}
WHERE {{time}} BETWEEN {{start_time}} AND {{end_time}}
GROUP BY location
location(...) resolves a string to coordinates: an IP ('1.1.1.1'), airport code ('JFK'), city ('San Francisco, CA'), or country ('US', 'UK') — typically a metric label (location(label('colo'))) or a raw event field. Explicit coordinates work too: tuple(lat, lng, 'custom_label').AS location and the value AS value (or set location_column / value_columns to match your aliases).| Setting | Purpose | Default |
|---|---|---|
location_column | Result column holding the location() tuple | "location" |
value_columns | Single-entry array with the numeric value column | ["value"] |
location_label | "automatic" shows the closest city/country in tooltips; "original_value" shows the raw input (the IP, airport code, etc.) | "automatic" |
unit | Value formatting | "auto" |
Use location_label: "original_value" when the raw values matter to the reader (e.g. to see the actual IP addresses rather than the nearest city).
hierarchy_chart)Host maps: one colored hexagon per entity — host, service, pod — colored by a single numeric value on a min→max scale. Select a numeric value and an identifying label, one row per entity:
SELECT
label('_host') AS host,
avgMerge(value_avg) AS value
FROM {{source}}
WHERE {{time}} BETWEEN {{start_time}} AND {{end_time}}
AND name = 'system_cpu_utilization_ratio'
GROUP BY host
-- Settings: value_columns: ["value"], label_column: "host"
value_columns entry colors it.GROUP BY, and list them in group_by_columns (first = outer group, second = sub-cluster).| Setting | Purpose | Default |
|---|---|---|
value_columns | Single-entry array with the numeric value that colors each hexagon | ["value"] |
label_column | Result column identifying each hexagon | auto-detected (first non-numeric column) |
group_by_columns | Up to two columns to nest hexagons by (first = outer group, second = sub-cluster) | [] |
palette | "green_to_red" (low = green — for metrics where high is bad, e.g. CPU) or "red_to_green" (high is good) | "green_to_red" |
min_value / max_value | Color scale bounds; set 0/1 for 0-1 ratios with unit: "percent" | data min / max |
link_template | URL opened when a hexagon is clicked; {{column}} placeholders are filled from the row (e.g. https://example.com/hosts/{{host}}) | none |
unit | Value formatting | "auto" |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
better-stack, map-chart, hierarchy-chart, geographic-map, host-map, sql-templates
Other plugins' skills for the same job
npx claudepluginhub betterstackhq/claude-plugin --plugin betterstack17 skills in this plugin
/chart-alertsGuide for creating and managing Better Stack chart alerts. Load when asked to set up alerting, create alerts on charts, or configure monitoring thresholds./chart-generationComplete reference for chart types, units, and settings on Better Stack dashboards. Load right before creating charts - after the queries are built with the query skills./chart-stylingBetter Stack chart styling and advanced settings reference - series colors and order, number chart coloring thresholds, heatmap color categories, gauge bounds, y-axis tuning, custom units, and the per-key settings table with cross-setting gotchas. Load when configuring how a chart looks beyond defaults, or when unsure which settings key applies to a chart type./collector-queriesProven metrics queries for Better Stack Collector sources (the source tool's Platform "Collector") - per-host node_* metrics, per-container and per-service container_resources_*, requests and errors by destination, TCP health, and the container-level saturation checks that host averages hide. Load after metrics-query when the source platform is Collector, for health checks, resource questions and service dashboards./connect-betterstackConnect the Better Stack MCP server and check that it works. Use when the user installs the Better Stack plugin or asks to set it up, when a Better Stack request comes in but no Better Stack tools (such as `incidents`, `monitors`, `query`, `documentation`) are available, or when a Better Stack tool fails with "unauthorized", 401 or "needs authentication". Tells the user exactly how to connect in the app they are using (ChatGPT, Codex, Cursor, Antigravity, Claude Code, Claude chat and Cowork, Claude Tag in Slack). Once connected, suggests what to set up next from what the account has, such as Claude investigating every new incident or fixing errors on a schedule. Also use when the user asks what Better Stack can do for them./dashboard-builderGuide for building Better Stack dashboards. Load when asked to create a dashboard or add multiple charts in Better Stack.