Skip to content
cccskills
FreePublished on GitHub

grafana

Query Grafana dashboards, alerts, and data sources such as Prometheus to investigate service health, infrastructure, and LLM performance. Retrieve time-sensitive metrics over a chosen period to examine latency, request rates, failures, and active alerts.

OriginalShow the original description

Query Grafana dashboards and Prometheus metrics for service health, LLM latency, and infrastructure monitoring. Use this skill when the user asks about service health, monitoring, alerts, or performance metrics.

BuilderIO/agent-native7,525 stars(GitHub 7,525 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Check current service health and firing alerts
  • Investigate LLM latency by model
  • Compare request and failure rates over time
  • Query infrastructure metrics for an incident

Files included (1)

  • SKILL.md5.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Grafana Integration

Connection

  • Base URL: $GRAFANA_URL (e.g. https://your-org.grafana.net)
  • Auth: Authorization: Bearer $GRAFANA_API_TOKEN (service account token)
  • Credentials: GRAFANA_URL, GRAFANA_API_TOKEN from Settings → Data sources
  • Caching: 10-minute cache for metadata; query results are NOT cached (time-sensitive)
  • Key datasource: Prometheus UID grafanacloud-prom

Server Lib & API Routes

  • File: server/lib/grafana.ts

Exported Functions

FunctionDescription
listDashboards(query?)Search dashboards by query
getDashboard(uid)Full dashboard JSON with panels
getDatasources()List all datasources
getAlertRules()All alert rules (flattened from groups)
getAlertInstances()Currently firing alert instances
queryDatasource(uid, queries[], from?, to?)Proxy to Grafana's /api/ds/query

API Routes

RouteDescription
GET /api/grafana/dashboardsSearch dashboards
GET /api/grafana/dashboard?uid=...Full dashboard JSON
GET /api/grafana/datasourcesList datasources
GET /api/grafana/alertsAlert rules and firing instances
POST /api/grafana/queryQuery datasource (Prometheus, Loki, etc.)

Agent Action

Use grafana for agent-facing Grafana work. Do not call /api/grafana/* directly from the agent.

ModeArgsDescription
dashboardssearchSearch dashboards
dashboarduidFull dashboard JSON
datasourcesList datasources
alertsAlert rules and firing instances
querydatasourceUid, queries, from, toQuery a datasource

Dashboard

  • /adhoc/engineering — Engineering dashboard (mirrors a Grafana dashboard by UID)

Grafana Response Frame Format

{ results: { [refId]: { frames: [{ schema: { fields }, data: { values } }] } } }
  • values[0] = timestamps (epoch ms), values[1+] = metric values
  • Series labels from schema.fields[i].labels (e.g. { model: "claude-3.5" })
  • Transform to Recharts: { time: number, [seriesName]: number }[]

Template Variables

  • $CodegenMode → default quality-v4
  • $AIModel → regex pattern, default .* (all)
  • $environment → cloud or cloud-v2, default cloud
  • Variables interpolated via string replace before querying

Key Prometheus Metrics

  • Codegen: vcpcodegen_completion_total, vcpcodegen_completion_latency_bucket, vcpcodegen_feedback_total, vcpcodegen_error_total
  • LLM: llm_completion_cost_total, llm_input_tokens_total, llm_output_tokens_total, llm_latency_bucket, llm_failures_total, llm_completions_total
  • Projects: projects_proposed_config_total, projects_status_total, projects_remote_machine_*, projects_start_duration_bucket
  • API/Runtime: api_request_total, with_span_duration_bucket, memory_heap_usage_percent_bucket
  • Fly.io: fly_endpoint_total, fly_machine_*
  • GitHub: builderbot_pr_created_total, builderbot_pr_closed_total

Key Patterns & Gotchas

  • queryDatasource constructs body with datasource UID in each query target; timestamps as string ms
  • getAlertRules flattens nested rule groups from unified alerting API
  • getAlertInstances handles both array and wrapped object response shapes
  • POST helper caches by default (fine for idempotent endpoints) but queryDatasource skips cache
  • Heatmap panels render as multi-series line/area (Recharts has no native heatmap; PromQL histogram_quantile() computes quantiles)

Incident Investigation Pattern

For production issues, query Grafana/Prometheus FIRST:

  1. LLM latency by model (llm_latency_bucket)
  2. Request rates (api_request_total)
  3. Error rates (llm_failures_total)
  4. Instance counts (via Cloud Monitoring)

Then check Agent-Native Analytics Monitoring -> Errors for captured application issues, external Sentry when connected, and Cloud Logging for raw logs.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

a2a-assets

FreeSummary

Generate, refine, export, and place brand images or videos from an Assets library into another app. The skill covers choosing a library, handling image batches and video runs, and updating selected assets after feedback.

  • Generate brand images for slides or another app
  • Refine an existing asset after feedback
  • Create and export a video asset
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

account-health

FreeSummary

Prepare a customer account health, renewal, or contract usage readout. Verify the account identity, use approved metric definitions, compare contracted capacity with actual usage, and trace findings to sources, time windows, and known gaps.

  • Preparing a named customer's account health review
  • Comparing contracted seats or capacity with usage
  • Gathering adoption signals before a renewal or QBR
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

actions

FreeSummary

Create focused app actions that agents can call as tools and frontend code can use through client hooks. Use them to add provider integrations or fetch UI data, with validated inputs and structured results.

  • Adding a new app operation
  • Connecting an external provider API
  • Fetching data for a frontend view
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adding-a-feature

FreeSummary

Use this checklist when adding a feature or integration to an agent-native app. It covers the user interface, agent-callable actions, instructions, and app-state sync so both the user and agent can work with the capability consistently.

  • Planning a new feature across UI and agent actions
  • Checking that agent changes appear in the UI
  • Documenting actions and feature state for the agent
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adhoc-analysis

FreeSummary

Investigate complex questions by combining data from multiple sources, then summarize patterns, metrics, and evidence in a clear report. Save requested analyses as dashboards with instructions for future refreshes.

  • Comparing CRM deals with call records
  • Investigating customer health across systems
  • Saving a repeatable performance analysis
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

admin-surfaces

FreeSummary

Use the Analytics admin surfaces to inspect and change workspace feature flags, review dashboard ownership and usage activity, or browse and edit databases connected from other agent-native apps. The skill guides administrators to the relevant view and actions.

  • Review dashboard owners, views, and edits
  • Change a workspace feature flag for an app
  • Browse or edit a connected app database
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

See all skills by BuilderIO

Report a problem with this skill