From honeycomb
Design and build Honeycomb queries: calculations, filters, breakdowns, visualization selection, granularity tuning, and anti-patterns. Activated by explicit mention of Honeycomb queries or /query invocation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/honeycomb:queryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design effective Honeycomb queries for dashboards, investigations, and saved queries. Covers query specification, visualization selection, SLI-oriented patterns, and common anti-patterns.
Design effective Honeycomb queries for dashboards, investigations, and saved queries. Covers query specification, visualization selection, SLI-oriented patterns, and common anti-patterns.
{
"calculations": [{"op": "COUNT"}, {"op": "P99", "column": "duration_ms"}],
"filters": [{"column": "service.name", "op": "=", "value": "api-gateway"}],
"filter_combination": "AND",
"breakdowns": ["http.route"],
"orders": [{"column": "http.route", "order": "ascending"}],
"limit": 20,
"time_range": 7200,
"granularity": 60
}
COUNT, SUM, AVG, MAX, MIN, COUNT_DISTINCT, HEATMAP, CONCURRENCY, P001, P01, P05, P10, P20, P25, P50, P75, P80, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX
=, !=, >, >=, <, <=, starts-with, does-not-start-with, ends-with, does-not-end-with, exists, does-not-exist, contains, does-not-contain, in, not-in
time_range: Relative window in seconds (default: 7200 = 2 hours)start_time / end_time: Absolute UNIX timestampstime_range, but not all threeSeconds per time bucket. Valid range: time_range / 1000 to time_range.
| Time range | Recommended granularity | Buckets |
|---|---|---|
| 10 minutes (600) | 10-30s | 20-60 |
| 2 hours (7200) | 60s | 120 |
| 24 hours (86400) | 300-600s | 144-288 |
| 7 days (604800) | 1800-3600s | 168-336 |
| 28 days (2419200) | 3600-14400s | 168-672 |
Choose chart types based on the data pattern, not the Honeycomb default (line graph).
| Value | Name | Best for |
|---|---|---|
line | Line graph | Continuous metrics with high cardinality over time (CPU, memory) |
tsbar | Time series bar | Time-bucketed counts and sparse data (errors, deploys, events). Renders as stacked bars when the query has breakdowns. |
stacked | Stacked area | Proportion over time as filled areas, not bars (errors by type, traffic by service) |
stat | Stat card | Single headline number with sparkline (current p99, error rate) |
cbar | Categorical bar | Comparing values across groups, non-time-series (latency by endpoint) |
cpie | Categorical pie | Proportional breakdown of a total (traffic share by region) |
"Stacked bar" is tsbar, not stacked. stacked renders a filled area chart. For stacked bars, use tsbar with breakdowns -- Honeycomb stacks the bars automatically.
chart_indexWhen a query has multiple calculations, chart_index maps to the 0-based index in the calculations array. Set chart type per calculation:
{
"charts": [
{"chart_index": 0, "chart_type": "tsbar"},
{"chart_index": 1, "chart_type": "line"}
]
}
P50 as the baseline (median) and P99 for worst-case.line. Set overlaid_charts: true to put P50 and P99 on one chart, but Honeycomb does not reliably merge multiple calculations -- they may still render as separate areas (see Anti-Patterns). The gap between P50 and P99 is the signal -- a widening gap indicates tail latency problems.HEATMAP panel below the percentile chart for distribution visibility. Heatmaps reveal bimodal distributions and outlier clusters that percentile lines hide.AVG on a boolean error column. In Honeycomb, AVG(bool) computes the proportion of true values -- this IS the error rate (0.0-1.0).line -- shows trend clearly without visual clutterservice.name or http.route to answer "where are errors coming from?" Do NOT break down by http.status_code -- individual status codes are too granular and produce noisy, unactionable charts.COUNTtsbar. With a breakdown by service or route, Honeycomb stacks the bars automatically, showing total volume and composition together. (stacked is a filled area chart, not bars -- use it only for proportion-over-time.)service.name, http.route, rpc.methodCOUNT_DISTINCT on the column of interestcbar for comparing across groups, stat for a single headline numberHEATMAP on a numeric columnRATE_SUM, RATE_AVG, or RATE_MAXline (shows trend direction clearly)When data arrives infrequently (webhooks, batch jobs, rare errors):
tsbar instead of line charts. Line graphs interpolate between points, creating misleading visual continuity.omit_missing_values: true to avoid flat zero lines between events.tsbar.limit in the query or aggregate differently.overlaid_charts for multiple calculations: Honeycomb does not reliably render multiple calculations (two SUMs, or P50 + P99) on one overlaid chart -- they often stay separate areas. Prefer a single calculation with a breakdown.COUNT in tables: A COUNT column beside other calculations is ambiguous. Alias it ("Requests", "Turns") or drop it -- it rarely adds value next to a SUM or AVG.Structure queries around Service Level Indicators. An SLI is a ratio: good events / total events. Keep to five or fewer per service.
| SLI | Honeycomb calculation | Visualization |
|---|---|---|
| Availability | AVG(error) inverted (1 - error rate) | line |
| Latency | P50/P99 on duration_ms | line overlaid |
| Error rate | AVG(error) on boolean column | line |
| Throughput | COUNT | tsbar, stacked by service |
| Freshness | MAX(age_seconds) or custom | line |
For SLO-aware dashboards, use compare_time_offset_seconds (e.g., 86400) to overlay current error rate against the previous day. This shows burn trajectory without requiring SLO-specific API access.
Use the Honeycomb MCP server to create and test queries. This works on all plans and doesn't require Enterprise API permissions.
honeycomb mcp call run_query -f dataset=<dataset> -f query_json='<json>'
honeycomb api -X POST /1/queries/<dataset> --input <query-file>.json
Note: piping JSON via stdin can fail if string values contain special characters (e.g., != in filter operators). Use --input with a file instead.
A "saved query" in the Honeycomb UI is a query annotation that references a query ID.
jq -n '{name: "Panel Title", query_id: "<query-id>"}' | honeycomb query annotation create --dataset <dataset> --file -
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub bendrucker/claude --plugin honeycomb