Skip to content

Guide · Agent skill

How to use the Elasticsearch Expert agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The Elasticsearch Expert skill is a written guide that teaches an AI agent best practices for Elasticsearch, a search and analytics engine. Once it is installed, the agent can advise on index mappings, bool and match queries, aggregations, index lifecycle and snapshot policies, and diagnosing unassigned shards or yellow cluster health. This guide covers what the skill does, how to install it, how to ask for help with natural requests, and the safety limits you should know before letting the agent act on a real cluster.

Elasticsearch ExpertRightNow-AI/openfang · Apache-2.0

Quick start

  1. 1Download the ZIP. Download the elasticsearch skill ZIP from this page.
  2. 2Unzip the skill folder. Extract the archive so the folder contains SKILL.md.
  3. 3Place the folder. Move it to ~/.claude/skills/ for all projects, or to .claude/skills/ inside one project.
  4. 4Or upload in the Claude apps. Go to Settings, then Capabilities, then Skills, and upload the skill.
  5. 5Ask a natural question. Describe your Elasticsearch task in plain language, including field names and goals.
  6. 6Review before running. Check any suggested delete, reindex or mapping change before you run it against a real cluster.

What the Elasticsearch skill makes the agent do

Agent skills are folders of instructions that an AI agent loads when a task matches them. The elasticsearch skill ships as a single file, SKILL.md, containing expert guidance on cluster architecture, query DSL, mapping design and performance for building search experiences, log analytics pipelines and time-series platforms.

The skill contains guidance only. It does not connect the agent to any Elasticsearch cluster, and it requires no software of its own. Any command the agent runs against a live deployment depends on access you provide separately.

  • Design explicit mappings before indexing, instead of relying on dynamic mapping
  • Choose between keyword fields (exact match, aggregations, sorting) and text fields (full-text search)
  • Write bool, match and term queries, and aggregations such as terms, date_histogram and nested
  • Plan index lifecycle (hot/warm/cold/delete), snapshot repositories and index aliases
  • Diagnose unassigned shards and yellow health

Install the Elasticsearch skill

Download the ZIP for the skill from this page and unzip it. To make the skill available to all your projects, place the unzipped folder in ~/.claude/skills/. To limit it to one project, place it in that project's .claude/skills/ folder.

You can also upload the skill in the Claude apps. Go to Settings, then Capabilities, then Skills, and upload the skill there.

  • Personal (all projects): ~/.claude/skills/
  • Single project: .claude/skills/ inside the project folder
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

You do not need a special command. Describe the Elasticsearch task in plain language and mention Elasticsearch, so the agent recognises the topic. Be specific about your data, such as field names, the volume of documents and what you want to find.

Good requests include the goal and the constraint, for example asking how to map a product catalogue for autocomplete, or why a shard is unassigned after a node restart.

  • "Design a mapping for a product index that supports autocomplete on the name field."
  • "Write a bool query that matches laptops in stock, under 1000 dollars, excluding refurbished items."
  • "My cluster is yellow. Walk me through diagnosing the unassigned replica shards."
  • "Set up an ILM policy that rolls over logs daily and deletes them after 30 days."

Use the skill for common tasks

For search features, the skill explains when to use match queries (analyzed full-text) versus term queries (exact keyword lookups). For autocomplete it describes the search_as_you_type field type and the edge_ngram tokenizer used with match_phrase_prefix.

For operations, it covers snapshot and restore with SLM policies, cross-cluster search, and the _cluster/allocation/explain API for shard problems. Ask for the reasoning as well as the answer so you can check it against your own cluster.

  • Autocomplete: search_as_you_type or edge_ngram with match_phrase_prefix
  • One-to-many data: join field types, so children update independently
  • Cross-cluster queries: remote clusters with cluster:index syntax
  • Recovery: snapshot repository (S3, GCS or filesystem) plus SLM policies
GET _cluster/allocation/explain

Safety notes: scripts, network and live clusters

The elasticsearch skill runs no scripts and uses no network access. The risk lies in what the agent may suggest. It can propose commands that delete or reindex data, so review every command before you run it, and never run suggested changes on a production cluster without a second check.

The skill itself also warns against several mistakes, such as setting number_of_replicas to 0 in production, and changing incompatible field types on an existing index instead of creating a new index and reindexing.

  • Review any delete, reindex or mapping change before running it
  • Test on a non-production cluster or a copy of the index first
  • Keep replicas at a level that gives redundancy in production
  • Take a snapshot before major changes

Tips for better results

Give the agent your Elasticsearch version and deployment type if they matter to the answer, and paste the current mapping or query so advice is tied to your data. Keep in mind the skill's guidance on shard sizing: aim for shards between 10 and 50 GB, avoiding both many tiny shards and a few very large ones.

If the agent's answer conflicts with your cluster's behaviour, trust the live output from your cluster over the general guidance.

  • Paste the mapping and a sample document with your question
  • Share the output of cluster health and allocation explain when troubleshooting
  • Ask the agent to explain why a query is structured a certain way

What people use it for

  • Designing an index mapping for a product search with autocomplete
  • Writing bool queries that combine filters, exclusions and optional matches
  • Planning ILM policies that roll over and delete time-series log indices
  • Diagnosing yellow cluster health and unassigned replica shards
  • Setting up snapshot repositories and SLM policies for disaster recovery

Frequently asked questions

Is the Elasticsearch agent skill free?

The source material does not state pricing or licence terms beyond the listing's Apache-2.0 licence for the openfang repository, so check the licence file there for terms. The skill itself requires no software to run.

What do I need to use the Elasticsearch skill?

The skill requires no software itself. You need Elasticsearch cluster knowledge, and access to a cluster only if you want the agent to run commands against a live deployment.

Does the skill connect to my Elasticsearch cluster?

No. The skill is guidance only and does not connect the agent to any cluster. It runs no scripts and uses no network access.

Where do I put the skill folder?

Place it in ~/.claude/skills/ to use it across projects, or in a project's .claude/skills/ folder to limit it to that project. You can also upload it in the Claude apps under Settings, Capabilities, Skills.

Can the agent delete data by accident?

The skill only supplies guidance, and the agent may propose commands that delete or reindex data. Review every suggested command and test on a non-production copy before running anything on a live cluster.

Does this work with OpenSearch or Postgres full-text search?

The skill is written for Elasticsearch. Its advice may not transfer directly to Solr, OpenSearch-specific features or Postgres full-text search, so check those answers against the platform's own documentation.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a developer building search or autocomplete on Elasticsearch, or an engineer designing time-series indices, retention policies or cluster troubleshooting workflows. Avoid relying on it to make live changes to a production cluster without review, and pick a different resource if you work on Solr, OpenSearch-specific features or Postgres full-text search.

Download the skill