
Kibana Vega
Build custom Kibana dashboard panels with Vega or Vega-Lite when standard Lens charts cannot express your ES|QL metrics layout.
Overview
Kibana Vega is an agent skill for the Grow phase that creates Vega and Vega-Lite Kibana visualizations powered by ES|QL queries.
Install
npx skills add https://github.com/elastic/agent-skills --skill kibana-vegaWhat is this skill?
- Declarative Vega and Vega-Lite grammars wired to ES|QL data sources only
- Requires Serverless Kibana or version 9.4+ (SNAPSHOT); older Lucene/KQL sources are out of scope
- Connection verification via `node scripts/kibana-vega.js test` before any panel work
- Three setup paths: Elastic Cloud ID + API key, direct KIBANA_URL + API key, or basic authentication
- Supports custom charts, full dashboards, and programmatic panel layouts beyond Lens
- Strictly supports ES|QL data sources on Serverless Kibana or Kibana 9.4+ (SNAPSHOT)
- Skill metadata version 0.1.0
- Connection test command: node scripts/kibana-vega.js test
Adoption & trust: 1.1k installs on skills.sh; 502 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have ES|QL metrics in Kibana but Lens and stock chart types cannot express the layout or marks you need for a credible analytics dashboard.
Who is it for?
Indie builders on Elastic Cloud or modern Kibana who need bespoke charts tied to ES|QL and will configure API keys before asking an agent to edit dashboards.
Skip if: Teams on Kibana versions below 9.4 without Serverless, anyone expecting Lucene or KQL-only datasources, or builders who only need default Lens charts.
When should I use this skill?
Building custom charts, dashboards, or programmatic panel layouts in Kibana with Vega or Vega-Lite and ES|QL beyond standard Lens charts.
What do I get? / Deliverables
You get verified Kibana connectivity and agent-guided Vega or Vega-Lite specs that render custom panels and dashboard layouts on supported Serverless or 9.4+ instances.
- Vega or Vega-Lite visualization specifications for Kibana panels
- Dashboard or saved-object layout updates referencing ES|QL queries
- Documented environment variable setup for Elastic Cloud or direct URL
Recommended Skills
Journey fit
Canonical shelf is Grow because the skill’s outcome is insight dashboards and programmatic chart layouts for ongoing measurement, not shipping application code. Analytics subphase fits ES|QL-driven visualizations that solo builders use to read product, ops, or agent telemetry in Kibana.
How it compares
Use for programmatic Vega grammar on ES|QL, not as a generic Elastic MCP connector or a Lens-only quick chart assistant.
Common Questions / FAQ
Who is kibana-vega for?
Solo builders and small teams shipping on Elasticsearch who want agent help authoring Vega or Vega-Lite panels in Kibana with ES|QL-backed data.
When should I use kibana-vega?
Use it in Grow analytics when you are building or extending Kibana dashboards, in Operate monitoring when you need custom ops views, or during Build integrations when wiring Elastic telemetry into a shared dashboard spec.
Is kibana-vega safe to install?
The skill expects Kibana API keys or basic credentials in environment variables; review the Security Audits panel on this Prism page before handing secrets to an agent.
SKILL.md
READMESKILL.md - Kibana Vega
# Kibana Vega Create and manage Kibana dashboards and Vega visualizations with ES|QL data sources. ## Overview Vega is a declarative visualization grammar for creating custom charts in Kibana. Combined with ES|QL queries, it enables highly customized visualizations beyond standard Kibana charts. **Important Version Requirement:** This skill strictly supports **ES|QL data sources** and requires **Serverless Kibana or version 9.4+ (SNAPSHOT)**. It will not work reliably on older versions or with older Lucene/KQL data source definitions. ## Quick Start ### Environment Configuration Kibana connection is configured via environment variables. Run `node scripts/kibana-vega.js test` to verify the connection. If the test fails, suggest these setup options to the user, then stop. Do not try to explore further until a successful connection test. #### Option 1: Elastic Cloud (recommended for production) ```bash export KIBANA_CLOUD_ID="deployment-name:base64encodedcloudid" export KIBANA_API_KEY="base64encodedapikey" ``` #### Option 2: Direct URL with API Key ```bash export KIBANA_URL="https://your-kibana:5601" export KIBANA_API_KEY="base64encodedapikey" ``` #### Option 3: Basic Authentication ```bash export KIBANA_URL="https://your-kibana:5601" export KIBANA_USERNAME="elastic" export KIBANA_PASSWORD="changeme" ``` #### Option 4: Local Development with start-local For local development and testing, use [start-local](https://github.com/elastic/start-local) to quickly spin up Elasticsearch and Kibana using Docker or Podman: ```bash curl -fsSL https://elastic.co/start-local | sh ``` After installation completes, Elasticsearch runs at `http://localhost:9200` and Kibana at `http://localhost:5601`. The script generates a random password for the `elastic` user, stored in the `.env` file inside the created `elastic-start-local` folder. To configure the environment variables for this skill, source the `.env` file and export the connection settings: ```bash source elastic-start-local/.env export KIBANA_URL="$KB_LOCAL_URL" export KIBANA_USERNAME="elastic" export KIBANA_PASSWORD="$ES_LOCAL_PASSWORD" ``` Then run `node scripts/kibana-vega.js test` to verify the connection. #### Optional: Skip TLS verification (development only) ```bash export KIBANA_INSECURE="true" ``` ### Basic Workflow ```bash # Test connection node scripts/kibana-vega.js test # Create visualization directly from stdin (no intermediate file needed) echo '<json-spec>' | node scripts/kibana-vega.js visualizations create "My Chart" - # Get visualization spec for review/modification node scripts/kibana-vega.js visualizations get <vis-id> # Update visualization from stdin echo '<json-spec>' | node scripts/kibana-vega.js visualizations update <vis-id> - # Create dashboard node scripts/kibana-vega.js dashboards create "My Dashboard" # Add visualization with grid position node scripts/kibana-vega.js dashboards add-panel <dashboard-id> <vis-id> --x 0 --y 0 --w 24 --h 15 # Apply a complete layout from stdin echo '<layout-json>' | node scripts/kibana-vega.js dashboards apply-layout <dashboard-id> - ``` **Note:** Use `-` as the file argument to read JSON from stdin. This enables direct spec creation without intermediate files. ### Minimal Vega Spec with ES|QL **IMPORTANT**: Always use proper JSON format (not HJSON with triple quotes) to avoid parse errors. ```json { "$schema": "https://vega.github.io/schema/vega-lite/v6.json", "title": "My Chart", "autosize": { "type": "fit", "contains": "padding" }, "config": { "axis": { "domainColor": "#444", "tickColor": "#444" }, "view": { "stroke": null } }, "data": { "url": { "%type%": "esql", "query": "FROM logs-* | S