
kibana-dashboards
Create and manage Kibana Dashboards and Lens visualizations. Use when you need to define dashboards and visualizations declaratively, version control them, or automate their deployment.
- Installs
- 4.3K
- Last 24h
- +22
- Trending rank
- #5586
- Security
- Fail
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/elastic/agent-skills --skill kibana-dashboards- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads kibana-dashboards automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Kibana Dashboards and Lens Visualizations
Create, update, and delete Kibana dashboards and standalone Lens visualizations using the Kibana 9.4+ Dashboards and Visualizations APIs. Produce minimal, diffable JSON bodies; prefer inline panel definitions over library references; and choose the correct dataset type (data view vs ES|QL) before writing metrics or chart layers.
<!-- begin-partial: preamble -->Environment Configuration
This skill executes Elasticsearch operations through the elastic CLI. If the
elastic CLI is not installed, tell the user what it is needed for. Do
not guess credentials, call the HTTP API directly, or attempt other workarounds.
This skill references operations in HTTP-shorthand form (e.g., GET /, GET /_cat/indices, GET /{index}/_mapping,
GET /{index}/_settings/index.mode, POST /_query). The Operations table at the end of this document
maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API
directly.
Prerequisites
Version requirement: Kibana 9.4+ (Dashboards and Visualizations APIs).
ES|QL placement:
- Standalone library charts:
PUT kbn:/api/visualizations/{id}withdata_source.type: "esql". - ES|QL panels embedded in a dashboard: inline
vispanelconfigwithdata_source.type: "esql"viaPUT kbn:/api/dashboards/{id}. - Do not use
data_source.type: "data_view_reference"or index-pattern aggregations when the user explicitly requests ES|QL — the persisted Lens state must use a text-based ES|QL datasource (textBased/esql), not a data-view count operation.
Process
-
Verify Kibana connectivity. Call
GET kbn:/api/status. If the call fails, stop and surface the error — do not guess endpoints or credentials. Readversion.numberto confirm the cluster meets the 9.4+ requirement. -
Classify the task. Decide whether the user needs a dashboard (collection of panels, optional time range), a standalone Lens visualization (library item referenced by id or used alone), or both. Determine whether a deterministic saved-object id was supplied — when given, use upsert (
PUT) with that id rather thanPOST(which auto-generates ids). -
Choose the dataset type before building metrics or layers.
User intent Dataset Metric / axis pattern Simple count or aggregation on a saved data view data_source.type: "data_view_reference"withref_idmetrics: [{ type: "primary", operation: "count" }](or other aggregation operations)Ad-hoc index pattern data_source.type: "data_view_spec"withindex_patternandtime_fieldSame aggregation operationfieldsES|QL query (explicit or complex logic) data_source.type: "esql"withquerymetrics: [{ type: "primary", column: "<alias>" }]or layer axes{ column: "<alias>" }— neveroperation: "count"on the metricWrite the aggregation in the ES|QL query (
STATS count = COUNT()), then reference the resulting column by name. -
Build a dashboard body when creating or updating dashboards. The request body is flat —
title,panels, and optionaltime_rangeat the root. Do not wrap in{ data: ... }on write. Required fields:title— exact string the user requested.panels— array; use[]when the user asks for an empty dashboard (do not omit the key or invent panels).time_range— when the user specifies a default time filter, set{ "from": "<expr>", "to": "<expr>" }(for example{ "from": "now-7d", "to": "now" }). Supplyingtime_rangepersists the dashboard time filter on open (equivalent to enabling time restore in the UI).
Upsert with a deterministic id:
{ "title": "Sales Overview", "panels": [], "time_range": { "from": "now-7d", "to": "now" } }Call
PUT kbn:/api/dashboards/eval-sales-overviewwith the body above when the user supplies that id.Inline ES|QL metric panel example (inside
panels):{ "type": "vis", "id": "total-requests", "grid": { "x": 0, "y": 0, "w": 12, "h": 6 }, "config": { "title": "Total Requests", "type": "metric", "data_source": { "type": "esql", "query": "FROM logs* | STATS count = COUNT()" }, "metrics": [{ "type": "primary", "column": "count" }] } }Prefer inline
configproperties overconfig.ref_idfor portable dashboards. Read Dashboard API Reference for panel types, grid layout, and copy workflows. -
Build a standalone Lens visualization when the user asks for a library chart. Use the Visualizations API. Upsert with
PUT kbn:/api/visualizations/{id}when an id is supplied; otherwisePOST kbn:/api/visualizationsand report the generated id from the response.ES|QL metric (total count from logs):
{ "type": "metric", "title": "Total Requests", "data_source": { "type": "esql", "query": "FROM logs* | STATS count = COUNT()" }, "metrics": [{ "type": "primary", "column": "count" }] }Call
PUT kbn:/api/visualizations/eval-total-requestswhen that id is required. The API persists a Lens saved object whose datasource state uses ES|QL (textBased/esql), not an index-pattern aggregation.Read Lens API Reference and Chart Types Reference for xy, gauge, heatmap, and other chart schemas.
-
Execute and confirm. Perform the write with
PUT kbn:/api/dashboards/{id}orPUT kbn:/api/visualizations/{id}(orPOSTwhen no id is supplied). Confirm withGET kbn:/api/dashboards/{id}orGET kbn:/api/visualizations/{id}. Report the id and title back to the user — do not claim success without a successful read-back. -
List, export, or delete when requested. Call
GET kbn:/api/dashboardsorGET kbn:/api/visualizationsto discover existing objects. CallDELETE kbn:/api/dashboards/{id}orDELETE kbn:/api/visualizations/{id}to remove objects. For bulk export or import of saved objects, callPOST kbn:/api/saved_objects/_exportorPOST kbn:/api/saved_objects/_import.
Dashboard grid
Dashboards use a 48-column grid. On 16:9 screens, roughly 20–24 rows fit above the fold — target 8–12 panels in that band.
| Width | Columns | Height (rows) | Use case |
|---|---|---|---|
| Full | 48 | 14–16 | Wide time series, tables |
| Half | 24 | 10–12 | Primary charts |
| Quarter | 12 | 5–6 | KPI metrics |
| Sixth | 8 | 4–5 | Dense metric rows |
Grid packing: When stacking rows, set the next panel's y to the previous panel's y + h. Panels sharing a row
should use the same h. Do not add markdown panels as dashboard titles — use descriptive chart titles instead.
ES|QL patterns
Time series bucket (dashboard time picker injects ?_tstart / ?_tend):
FROM logs*
| WHERE @timestamp <= ?_tend AND @timestamp > ?_tstart
| STATS count = COUNT() BY BUCKET(@timestamp, 75, ?_tstart, ?_tend)
Set "scale": "temporal" on the x-axis for time-series xy charts. See
Chart Types Reference for axis and layer details.
Static reference values — use EVAL in the query, then reference the column:
FROM logs* | STATS count = COUNT() | EVAL goal = 15000
Examples
Example JSON definitions live under assets/: demo-dashboard.json, dashboard-with-visualizations.json,
metric-esql.json, bar-chart-esql.json, line-chart-timeseries.json.
Guidelines
- Match the user's id and title exactly when supplied — do not substitute auto-generated ids.
- Honor empty panels — when the user asks for
panels: [], send an empty array; do not add placeholder panels. - ES|QL when requested — use
data_source.type: "esql"and column references; never satisfy an ES|QL request withoperation: "count"on a data view. - Minimal payloads — omit derivable defaults; let the API inject styling and metadata.
- Confirm writes — always read back with
GETafter create or update. - Read references before complex charts — metric and xy schemas differ between data view and ES|QL; consult Chart Types Reference before generating partition or table charts.
Common issues
| Error | Likely cause | Fix |
|---|---|---|
| 404 on GET after PUT | Wrong id or space | Confirm id and retry GET kbn:/api/dashboards/{id} |
| 400 validation | ES|QL column mismatch | Align metrics[].column / layer column with STATS aliases in the query |
| ES|QL panel saved as data view | Wrong dataset type | Use data_source.type: "esql", not data_view_reference |
| Empty dashboard missing time filter | Omitted time_range | Include { "from": "now-7d", "to": "now" } when a default range is required |
| XY chart failure | Missing layer data_source | Put data_source inside each layer, not only at the root |
Operations
As of CLI v0.3.0 the Dashboards and Visualizations APIs have dedicated elastic kb dashboards and
elastic kb visualizations commands for listing, reading, updating, and deleting objects by id. The create-*-redirect
commands do not accept a request body yet, so to write a new object supply an id and use the update-*-redirect (PUT)
command, which carries the JSON body via --input-file. To author several objects at once, build a saved-object NDJSON
and import it with post-saved-objects-import (read it back with post-saved-objects-export).
| HTTP API (shorthand) | elastic CLI command |
|---|---|
GET kbn:/api/status | elastic kb system get-status |
POST kbn:/api/saved_objects/_import | elastic kb saved-objects post-saved-objects-import --file '<path.ndjson>' --overwrite |
POST kbn:/api/saved_objects/_export | elastic kb saved-objects post-saved-objects-export --objects '[{"type":"<type>","id":"<id>"}]' |
GET kbn:/api/dashboards | elastic kb dashboards get-dashboards-redirect |
GET kbn:/api/dashboards/{id} | elastic kb dashboards get-dashboard-redirect --id '<id>' |
PUT kbn:/api/dashboards/{id} | elastic kb dashboards update-dashboard-redirect --id '<id>' --input-file '<path.json>' |
DELETE kbn:/api/dashboards/{id} | elastic kb dashboards delete-dashboard-redirect --id '<id>' |
POST kbn:/api/dashboards (no id) | create-dashboard-redirect takes no body yet — supply an id and use update-dashboard-redirect, or author via post-saved-objects-import (type dashboard) |
GET kbn:/api/visualizations | elastic kb visualizations get-visualizations-redirect |
GET kbn:/api/visualizations/{id} | elastic kb visualizations get-visualization-redirect --id '<id>' |
PUT kbn:/api/visualizations/{id} | elastic kb visualizations update-visualization-redirect --id '<id>' --input-file '<path.json>' |
DELETE kbn:/api/visualizations/{id} | elastic kb visualizations delete-visualization-redirect --id '<id>' |
POST kbn:/api/visualizations (no id) | create-visualization-redirect takes no body yet — supply an id and use update-visualization-redirect, or author via post-saved-objects-import (type lens) |
FAQ
What does the kibana-dashboards skill do?
Create and manage Kibana Dashboards and Lens visualizations. Use when you need to define dashboards and visualizations declaratively, version control them, or automate their deployment.
How do I install kibana-dashboards?
Run npx skills add https://github.com/elastic/agent-skills --skill kibana-dashboards in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/kibana-dashboards/ (personal) or .claude/skills/kibana-dashboards/ (project).
Which AI agents can use kibana-dashboards?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is kibana-dashboards safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed; Runlayer flagged risks; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains kibana-dashboards?
It is published by elastic in elastic/agent-skills. It has 4,299 recorded installs.
More from elastic/agent-skills
elasticsearch-esql
elastic/agent-skills
Execute ESQL (Elasticsearch Query Language) queries, use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or create charts and dashboards from ESQL results.
elasticsearch-onboarding
elastic/agent-skills
Help developers new to Elasticsearch get from zero to a working search experience. Guide them through understanding their intent, mapping their data, and building a search experience with best practices baked in. Use this when the user shows intent to build search-related functionality, asks about Elasticsearch-related concepts for their use case, or expresses the need for help getting started with Elasticsearch.
security-case-management
elastic/agent-skills
Create, search, update, and manage SOC cases via the Kibana Cases API. Use when tracking incidents, linking alerts to cases, adding investigation notes, or managing triage output.
kibana-alerting-rules
elastic/agent-skills
Create and manage Kibana alerting rules. Use when creating, updating, or managing rule lifecycle (enable, disable, mute, snooze), choosing metric threshold rule types and params, or read-only find/list with tag filters.
kibana-agent-builder
elastic/agent-skills
Create and manage Kibana Agent Builder agents and custom tools. Use when asked to create, update, delete, test, or inspect agents or tools in Agent Builder, or when the user wants to understand what agents or tools already exist.
observability-llm-obs
elastic/agent-skills
Answer questions about LLM and agentic-application behavior from data already ingested into Elastic: latency and error rate, token and cost utilization, response quality and guardrail events, and agentic call-chain orchestration. Use when the user asks about LLM monitoring, GenAI observability, token spend or AI cost, model latency, prompt or guardrail failures, or how an agent's tool-call chain executed.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available