onboarding
Onboard an Elastic Cloud organization: configure the `elastic` CLI's Cloud context and API key, establish a default region, then…
Query Elastic Context Engine AI Indices, and the Knowledge Indicators (KIs) they store. Use when asked to search, explore, count, or answer questions from an AI Index / KI / Context Engine knowledge index, and when writing the ES|QL that queries one.
Claude Code
$ npx -y skills add elastic/agent-skills --skill kibana-context-engine --agent claude-code
Codex
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a codex -y
Cursor
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a cursor -y
Gemini CLI
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a gemini-cli -y
GitHub Copilot
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a github-copilot -y
OpenCode
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a opencode -y
Windsurf
$ npx skills add elastic/agent-skills --skill kibana-context-engine -a windsurf -y
name: kibana-context-engine description: > Query Elastic Context Engine AI Indices, and the Knowledge Indicators (KIs) they store. Use when asked to search, explore, count, or answer questions from an AI Index / KI / Context Engine knowledge index, and when writing the ES|QL that queries one. metadata: author: elastic version: 0.2.1 universal: false compatibility: Kibana 9.6 or later with matching Elasticsearch, or an Elastic Serverless project, with the `contextEngine:enabled` advanced setting turned on in the target space. Runs against the Context Engine HTTP APIs through the `elastic` CLI. The caller needs Context Engine `read`, plus Elasticsearch `read` and `view_index_metadata` on the backing `ai-index-*` indices.
<!-- begin-partial: preamble -->
This skill executes Elasticsearch operations through the `elastic` CLI. If the [`elastic` CLI](https://github.com/elastic/cli#configuration) 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](#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.
<!-- end-partial: preamble -->
**AI Index** — an Elasticsearch index named `ai-index-idx-*`, or a data stream named `ai-index-ds-*`, registered with the Context Engine under a logical id. The registration lives in Kibana; the knowledge lives in the backing index. Only the list operation knows which `ai-index-*` indices are registered and what to put in `FROM`; the index name alone does not tell you.
**Knowledge Indicator (KI)** — one document in an AI Index: context prepared for agents, such as a description of some data, a summary, an access pattern, a runnable query, or a record of a Kibana resource. A KI may answer a question outright, or help you locate and use the source that does.
A KI is retired by a tombstone (`governance.lifecycle.status: deleted`) or by an `expires_at` in the past. On a data stream, one KI is several revisions under the same `id`, the newest of which is its current state. The query API returns only current, active, unexpired KIs unless the query asks otherwise (see [Lifecycle](#lifecycle)).
Search the AI Indices before broader retrieval whenever their KIs may cover the question. This skill reads KIs; generating them belongs to the Context Engine's automations and feedback loop.
Three read-only Context Engine HTTP APIs back this skill. The [Operations](#operations) table maps each to its `elastic` CLI command:
| Operation | HTTP API (shorthand) | Input | Returns | | --------- | ------------------------------------------------------------ | ---------------------------- | ----------------------------------------------------------------------- | | List | `GET kbn:/api/context_engine/ai_index` | — | `{ ai_indices: [{ id, description, managed, dest: { type, value } }] }` | | Describe | `GET kbn:/api/context_engine/ai_index/{aiIndexId}/_describe` | `aiIndexId` in the path | `{ response }`, a free-form context block (fields, counts, examples) | | Query | `POST kbn:/api/context_engine/ai_index/_query` | `{ query, params?, limit? }` | `{ columns, values }`, ES\|QL rows |
Use them in this order: **list → describe → query**. Never guess an index id, a `FROM` target, or a field name; describe supplies all three. Nothing else can read an AI Index correctly: a generic ES|QL query (`POST /_query`) or index listing neither knows which indices are registered nor applies the space scoping.
Every call is scoped to one space, and the space comes from the request rather than from anything written into the query. Point the request at another space to read that space's KIs.
Elastic's canonical KI indices share these fields. Other AI Indices differ, so treat this as a starting shape and let describe settle the fields for any given index.
| Field | ES\|QL type | Purpose | | -------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------- | | `type` | keyword | Categorization, e.g. `"index_metadata"`, `"document"`, `"entity_profile"`, `"detection"` | | `title` | text | Short name of the KI or its backing entity | | `description` | text | Short description of this KI | | `content` | text | Full text: purpose, questions answered, access patterns | | `tags` | keyword | Filter facets; multi-valued, so use `MATCH(tags, ?tag)` rather than `==` | | `attributes` | flattened | Structured keyword-queryable metadata (status, themes, entity names). `attributes.esql` holds runnable ES\|QL | | `expires_at` | date | Optional; a KI whose `expires_at` has passed is expired and hidden by default
Elastic Agent Skills — built by the people who built Elastic — deliver native platform expertise directly to your AI coding agent.
Onboard an Elastic Cloud organization: configure the `elastic` CLI's Cloud context and API key, establish a default region, then…
Provision and operate Elastic Cloud infrastructure: create, connect to, update, and delete Serverless projects (Elasticsearch,…
Explain Elasticsearch ML anomaly detection scores, model behavior, and result interpretation. Use when the user asks why a score…
Create and manage Elastic ML anomaly detection jobs via the API. Use when setting up jobs on an index or data stream, configuring…
Diagnose a non-green Elasticsearch cluster and surface the single most likely cause with remediation. Use when an operator…
Execute ES|QL (Elasticsearch Query Language) queries, use when the user wants to query Elasticsearch data, analyze logs,…
Diagnose why a program crashed on this machine, from a systemd-coredump core dump. Use when a process has segfaulted, aborted, or…
Set up, connect, validate, and repair Claude Desktop and MCP servers using Desktop Commander — inspecting and fixing mcp.json /…
Audit UniFi firewall policies for conflicts, redundancies, security gaps, and best practices. Use when asked to review firewall…
Add a custom domain to a Temps project and provision an automatic SSL/TLS certificate via Let's Encrypt, driven entirely from the…