walterra/eddoapp/elasticsearch-esql
Claude Code and agent skill by walterra/eddoapp
- community
Checking that the SKILL.md file is still in the repository.
Generate and execute ES|QL (Elasticsearch Query Language) queries from natural language and visualize results with Vega-Lite charts. Translates user intent into valid ES|QL queries, executes them against Elasticsearch, and can render professional data visualizations (bar, line, scatter, heatmaps, small multiples, etc.). Use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or create charts and dashboards from ES|QL results.
Install
npx vskill@latest install walterra/eddoapp/elasticsearch-esqlSKILL.md
Elasticsearch ES|QL
Generate ES|QL queries from natural language descriptions and execute them against Elasticsearch.
For visualization tasks: Always read references/vega-lite-reference.md first. It contains the complete grammar of graphics including data types, encoding channels, mark types, multi-view composition (layer, facet, concat, repeat), and professional best practices.
For architecture diagrams: Use thegraphviz_charttool with DOT syntax. Best for flowcharts, dependency graphs, state machines, and system architecture diagrams. Always read references/graphviz-reference.md for complete syntax, node shapes, edge styles, and layout patterns.
What is ES|QL?
ES|QL (Elasticsearch Query Language) is a piped query language for Elasticsearch. It is NOT the same as:
- Elasticsearch Query DSL (JSON-based)
- SQL
- EQL (Event Query Language)
ES|QL uses pipes (|) to chain commands: FROM index | WHERE condition | STATS aggregation BY field | SORT field | LIMIT n
Version Compatibility: ES|QL was introduced in 8.11 (tech preview) and became GA in 8.14. Features likeLOOKUP JOIN,MATCH, andINLINESTATSwere added in later versions. Check references/esql-version-history.md for feature availability by version.
Container Environment
Inside Docker containers, the skill is available at:
Environment Configuration
Elasticsearch connection is configured via environment variables (set by the container):
Usage
Generate Query Only (for review)
Get Index Information (for schema discovery)
Execute Raw ES|QL
Execute with TSV Output (for charting)
TSV Output Options:
--tsvor-t: Output as tab-separated values (clean, no decorations)--no-header: Omit the header row
Test Connection
Visualization with vega_chart Tool
The vega_chart extension renders Vega-Lite specifications as PNG images directly in your terminal. This gives you full control over visualization design using the declarative grammar of graphics.
Important: Before creating any charts, read the complete Vega-Lite Reference for data types, encoding channels, mark types, multi-view composition patterns, and best practices.
Why Vega-Lite?
Rather than rigid chart types, Vega-Lite provides a grammar of graphics:
- Declarative: Describe _what_ you want, not _how_ to draw it
- Composable: Layer, facet, concatenate, and repeat views
- Professional: Control over every visual detail
Basic Workflow
- Get TSV data from esql.js using
--tsvflag - Transform field names - rename dot-notation fields to simple names (see Critical Pitfalls)
- Construct a Vega-Lite spec (JSON) with inline data
- Call vega_chart tool with the spec
Critical Pitfalls
⚠️ These issues WILL break your charts. Read carefully.
1. Dot-Notation Field Names Break Everything
Problem: ES|QL returns fields like room.name, host.ip, metric.value. Vega-Lite interprets dots as nested object paths, looking for {room: {name: value}} instead of {"room.name": value}.
Symptom: Axis labels show "undefined", bars collapse into single row, legends show "undefined".
Solution: Always use inline data with renamed fields:
Workflow: Query ES|QL → Copy values → Create inline data with renamed fields.
2. TSV Data with Complex Fields
When using tsv_data parameter, field names with dots will fail. Always use inline `data.values` instead and manually construct the data array with clean field names.
3. Horizontal Bar Chart Labels Get Truncated
Problem: Y-axis labels on horizontal bar charts get cut off by default.
Solution: Add labelLimit to axis config:
4. Facet/Repeat Syntax Incompatible with Altair v6
Problem: Top-level facet and repeat with spec don't work in the vega_chart renderer (uses Altair v6).
Solution: Use encoding-based faceting instead:
Simple Examples
Horizontal Bar Chart (with proper label handling):
Time Series (with proper aspect ratio):
Best Practices
- Always use inline data with simple field names - never rely on TSV with dot-notation
- Use vertical bar charts when you have many categories - labels display more reliably
- Time series: 3:1 or 4:1 aspect ratio - wide, not tall
- Direct labeling over legends - place text labels at line endpoints
- Never use pie/donut charts - use sorted bar charts instead
- Color encodes data, not decoration - use single color for single-series data
- Sort by value (
"sort": "-x") not alphabetically
Full Reference (Required Reading)
Always read [Vega-Lite Reference](references/vega-lite-reference.md) before creating visualizations. It contains:
- Data types (N, O, Q, T) and when to use each
- Complete encoding channels (position, color, size, shape, etc.)
- All mark types (bar, line, point, area, rect, boxplot, etc.)
- Scale and axis configuration
- Multi-view composition (layer, hconcat, vconcat) for dashboards
- Professional chart patterns with complete working examples
- Common pitfalls and solutions
Architecture Diagrams with Graphviz
The graphviz_chart extension renders Graphviz DOT specifications as PNG images. Use it for:
- System architecture diagrams
- Data flow diagrams
- Dependency graphs
- State machines
- Flowcharts
- ER diagrams
Important: Before creating diagrams, read the complete Graphviz Reference for DOT syntax, node shapes, edge styles, clusters, and layout engines.
Basic Usage
Call graphviz_chart with a DOT specification:
When to Use Graphviz vs Vega-Lite
| Use Graphviz | Use Vega-Lite | |
|---|---|---|
| Architecture diagrams | Data visualizations | |
| Flowcharts | Bar/line/scatter charts | |
| Dependency graphs | Time series | |
| State machines | Aggregations | |
| ER diagrams | Statistical plots | |
| Process flows | Heatmaps |
Quick Examples
System Architecture:
State Machine:
Key DOT Syntax
- Directed graph:
digraph G { A -> B; } - Undirected graph:
graph G { A -- B; } - Node attributes:
A [label="Name" shape=box fillcolor=blue]; - Edge attributes:
A -> B [label="calls" style=dashed]; - Clusters:
subgraph cluster_name { ... }(must start with "cluster") - Layout direction:
rankdir=LR;(LR, RL, TB, BT)
Layout Engines
Specify with the engine parameter:
dot(default): Hierarchical, best for DAGsneato: Spring model, good for undirected graphsfdp: Force-directed, large graphscirco: Circular layouttwopi: Radial layout
Full Reference (Required Reading)
Always read [Graphviz Reference](references/graphviz-reference.md) before creating diagrams.
Workflow for Query Generation
When asked to generate an ES|QL query:
- Understand the intent: What data? What operations? What output?
- Discover schema (if needed):
``bash $ESQL indices "pattern*" $ESQL schema "index-name" ``
- Read the ES|QL reference for syntax details:
- Generate the query following ES|QL syntax:
- Start with
FROM index-pattern - Add
WHEREfor filtering - Use
EVALfor computed fields - Use
STATS ... BYfor aggregations - Add
SORTandLIMITas needed
- Execute and visualize:
``bash $ESQL raw "FROM index | STATS count = COUNT(*) BY field" --tsv ``
ES|QL Quick Reference
Basic Structure
Common Patterns
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/chat-agent/skills/elasticsearch-esql/SKILL.md
Popularity
- Repository stars
- 54
- Repository forks
- 4
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/walterra/eddoapp/elasticsearch-esql)