automation
Writing ClickHouse Queries for SigNoz Dashboards
Agent skill for writing raw ClickHouse SQL in SigNoz dashboards, enabling custom queries beyond builder UI.
Where this fits
A developer is building a SigNoz dashboard and needs a panel that shows error rate per service for the last 30 minutes, but the builder UI only supports simple aggregations. They need a custom ClickHouse query with a subquery and a window function. This skill steps in: it tells the agent exactly how to structure that SQL, what tables to use, and how to map the result to a timeseries widget.
Why agents benefit
- Generates raw ClickHouse SQL that the SigNoz builder cannot express, including custom joins, window functions, and regex extraction over log bodies.
- Understands the difference between dashboard-panel SQL and ad-hoc exploration, routing to
signoz-generating-querieswhen the query isn't for a panel. - Produces panel-specific output: timeseries, value widgets, or table breakdowns, with correct column aliases and time bucketing.
- Detects implicit signals—if a user asks for a dashboard panel without mentioning ClickHouse, the skill still activates.
- Reduces iteration cycles by providing ready-to-run SQL that matches SigNoz's internal schema and dashboard conventions.
Practical scenarios
Custom log volume with regex extraction
You need a panel that counts log lines containing a specific error pattern, grouped by container. The builder can't handle regex extraction. The skill generates a query using extractAllGroupsVertical and a WHERE clause with match, then wraps it in a time-series aggregation.
P95 latency across services with window functions
The default trace metrics don't give you a rolling p95. The skill writes a query that uses quantile(0.95) over a sliding window with OVER (PARTITION BY serviceName ORDER BY timestamp), producing a smooth line chart for each service.
Join traces and logs for error analysis
You want a table that pairs failed spans with their associated log entries. The skill constructs a JOIN between signoz_traces and signoz_logs on trace ID, filters for errors, and outputs a table widget with the relevant columns.
Add it to your agent workflow
Install the skill with:
npx skills add SigNoz/agent-skills --skill signoz-writing-clickhouse-queries
Then, in your agent prompt, ask for a "ClickHouse query for a SigNoz dashboard panel" and describe the widget type and data you need. The agent will load the skill and produce the SQL, ready to paste into SigNoz.
Compare before adopting
Before committing, compare this skill with alternatives. Check the GitHub repo's last commit date and open issues—SigNoz's agent-skills repo is actively maintained. Also compare with signoz-generating-queries for ad-hoc work, and ensure the skill's trigger conditions match your typical dashboard requests. For a broader view of agent skills, see OpenAgentSkill.
Why it is worth tracking
The skill has 15 stars and is authored by SigNoz, the observability platform itself—a strong signal of alignment with the product's schema and query patterns. The repo is actively maintained, and the skill's trigger logic is precise, reducing false positives. Evaluate it when you're building dashboards that require custom SQL beyond the builder, and track it for updates as SigNoz evolves its data model.
Featured Skill
signoz-writing-clickhouse-queries
Skill by SigNoz