Logo di Esql

Esql

Community
sherman
esql

Review Elastic ES|QL queries for Elasticsearch 9.5.4 and later, covering compatibility, correctness, Prometheus and 01.metrics operational-metric semantics, alert reliability, and query performance. Use when Codex is asked to inspect, critique, fix, or rewrite ES|QL pipelines, especially Elastic/Kibana alert queries embedded in .yaml/.yml files or standalone .esql queries.

Panoramica

Autoresherman
Repositorycodex-skills
Nome della skillesql
Stelle
40
Fork
6
File inclusi
5
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 5 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da sherman su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Esql in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/sherman/codex-skills/tree/master/skills/esql
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sherman/codex-skills.git /tmp/codex-skills
mkdir -p .claude/skills
cp -r /tmp/codex-skills/skills/esql .claude/skills/esql
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Esql in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Esql non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Esql non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

ES|QL Query Review

Workflow

  1. Target Elasticsearch 9.5.4 and later; 9.5.4 is the minimum local version, not an exact version pin. Use the actual deployment version when known, and verify version-sensitive syntax and behavior against applicable official Elastic docs or matching-version material already supplied inside this project.
  2. Detect the input format before extracting queries:
    • For .yaml/.yml, parse the YAML and review each ES|QL block scalar such as query: |. Read the surrounding alert metadata and comments before reviewing the query.
    • For .esql, treat the file as one query unless the user explicitly identifies multiple queries.
  3. Infer the query intent, source grain, time range, whether the alert runner injects the time window, metric format and type, grouping grain, and alert condition before judging the query. Distinguish traditional Prometheus metrics from the 01.metrics operational format before reviewing aggregation semantics. In YAML alerts, use fields such as name, description, severity, interval_sec, and time_window as part of that contract.
  4. Read references/review-checklist.md for any non-trivial review. Read references/01-metrics.md when the query uses operational fields such as metrics.calls, metrics.failures, or metrics.duration_*, or when the metric format is ambiguous. Read good-examples.esql and bad-examples.esql when matching this repository's preferred review style or adding new examples. In bad-examples.esql, text after PROBLEM: or Problem: is annotation, not ES|QL.
  5. Review in passes: syntax/version, source scope, filter placement, aggregation grain, metrics semantics, null and multivalue behavior, arithmetic, alert determinism, result limits, and output shape.
  6. Prefer findings over generic advice. Every finding should name the risky fragment, explain why it matters, and propose a concrete fix or safer rewrite.

Choosing TS or FROM

In our metrics environment, all stored counters are interval deltas, including counters originating from Prometheus. Treat this as the established local data contract. For a direct total over complete intervals, sum the counts; for throughput, divide by the covered duration. Elasticsearch 9.5.4 also supports RATE and INCREASE on delta counters using the metric mapping and configured temporality metadata. Check that field configuration when judging a query; do not reject these functions merely because the samples are deltas. See references/ts-vs-from.md.

Choose from the required calculation, not from the fact that the source is a time series data stream (TSDS). Use FROM when matching samples can be combined directly; use TS when each series needs a separate calculation before combining results. For metric aggregations or a proposed TS/FROM rewrite, read references/ts-vs-from.md for the decision table, equivalence conditions, and examples.

Review Scope

  • Keep filesystem inspection inside the current ES|QL project and files explicitly supplied by the user.
  • Do not search sibling repositories, parent workspaces, application code, deployment code, or metric producers to infer undocumented behavior unless the user explicitly asks for that investigation.
  • Use the query, YAML metadata and comments, bundled references, examples, and official Elastic documentation. If these do not establish a data contract, state the assumption or uncertainty in the review instead of searching external code.

Review Stance

  • Be strict about correctness, false negatives, false positives, arbitrary alert rows, and obviously excessive shard scans.
  • Be careful with inferred data contracts. If a problem depends on undocumented assumptions such as "one document per metric per timestamp", say that explicitly.
  • Do not claim that a final KEEP or DROP improves aggregation cost. It mostly reduces response payload after upstream work has already happened.
  • Do not rewrite the whole query unless the user asks. For review, preserve the original intent and give minimal corrected fragments.
  • Treat good-examples.esql as style calibration: narrow sources where possible, filter early, name intermediate fields, use conditional STATS, use deterministic SORT before top-N LIMIT, and produce alert-friendly details.
  • Apply the local interval-delta contract and the TS/FROM decision rule when reusing examples. Existing SUM(SUM_OVER_TIME(...)) examples do not prove that TS is needed.

Output Format

Start with findings, ordered by severity. Use this shape:

text
[severity] Short title
Fragment: `...`
Why: ...
Fix: ...

Use severities:

  • blocker: invalid ES|QL, wrong version, or query cannot return intended result.
  • high: likely false alert, missed alert, or severe avoidable cluster cost.
  • medium: fragile metric semantics, cardinality risk, nondeterministic output, or maintainability issue that can affect operations.
  • low: readability, naming, comments, magic constants, or minor style.

After findings, include a corrected fragment or full corrected query only when it materially helps. If there are no material issues, say so and list residual assumptions that could not be verified from the query alone.

Version Notes

The local version range is Elasticsearch 9.5.4 and later. Prefer official Elastic documentation applicable to the actual deployment version or a checked-out matching Elastic branch over memory. Useful starting points are in references/elastic-docs.md.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Esql?

Review Elastic ES|QL queries for Elasticsearch 9.5.4 and later, covering compatibility, correctness, Prometheus and 01.metrics operational-metric semantics, alert reliability, and query performance. Use when Codex is asked to inspect, critique, fix, or rewrite ES|QL pipelines, especially Elastic/Kibana alert queries embedded in .yaml/.yml files or standalone .esql queries.

Perché usare Esql su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Esql è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Esql in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/sherman/codex-skills/tree/master/skills/esql. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Esql?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Esql?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Esql: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Esql è gratuita?

È pubblicata su GitHub da sherman. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇