elasticsearch

elasticsearch is a skill for Claude Code from NikiforovAll/claude-code-rules. It costs 97 tokens per session (3,669 once invoked), scanned C, original, Apache-2.0.

A guide for working with Elasticsearch, a search and data-storage system, and Kibana, its interface for exploring data and building dashboards, through web requests.

In plain words
What is it for?
Use it to query or store data, manage indexes, create aggregations and dashboards, check cluster status, and troubleshoot an Elasticsearch installation.
Why use it?
It provides consistent commands for searching, changing indexes, checking system health, and diagnosing problems without needing a programming library.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the handbook-elasticsearch plugin — 1 skill shipped together

Good fit Use it to query or store data, manage indexes, create aggregations and dashboards, check cluster status, and troubleshoot an Elasticsearch installation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nikiforovall/claude-code-rules/elasticsearch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add NikiforovAll/claude-code-rules --skill elasticsearch
Clone the repo
git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules

Made for: Claude Code.

Or install handbook-elasticsearch, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elasticsearch

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/elasticsearch/github.svg)](https://agentmods.dev/skills/nikiforovall/claude-code-rules/elasticsearch)
Your own site
<a href="https://agentmods.dev/skills/nikiforovall/claude-code-rules/elasticsearch"><img src="https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/elasticsearch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for elasticsearch

Your own site · 80×15
<a href="https://agentmods.dev/skills/nikiforovall/claude-code-rules/elasticsearch"><img src="https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/elasticsearch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,669 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.03669
Opus 5.5 $0.00039 $0.01468
Sonnet 5.5 $0.00019 $0.00734
Haiku 4.5 $0.00010 $0.00367

Measured 1mo ago against content hash ab1e510a6f2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

elasticsearch scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

-H "Authorization: ApiKey $(printenv ES_API_KEY)" \

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Interact with Elasticsearch and Kibana via REST API using curl. Use when querying, indexing,
plugins/handbook-elasticsearch/skills/elasticsearch/SKILL.md · 341 lines

How it starts

The opening of the file, as written. The whole thing — 341 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elasticsearch

All Elasticsearch interaction is via REST API using curl. No SDK or client library required.

Authentication

Every request needs the cluster URL and an API key:

# Set these for your session (or export in .env / shell profile)
ES_URL="https://your-cluster.es.cloud.elastic.co:443"
ES_API_KEY="your-base64-api-key"

# All requests follow this pattern:
curl -s "${ES_URL%/}/<endpoint>" \
  -H "Authorization: ApiKey $(printenv ES_API_KEY)" \
  -H "Content-Type: application/json" \
  -d '<json-body>'

API key format: Base64-encoded id:api_key string. Pass as-is in the Authorization: ApiKey header.

If the user provides a URL and key, export them as ES_URL and ES_API_KEY before running commands.

Important — variable expansion in curl:

  • Always use $(printenv ES_API_KEY) instead of $ES_API_KEY in curl headers. The $ES_API_KEY variable may not expand correctly in the shell, resulting in empty Authorization headers and 401 errors.
  • Always use ${ES_URL%/} to strip any trailing slash from the URL, preventing double-slash path issues (e.g., //_cluster/health).

Quick Health Check

# Cluster health (green/yellow/red) — NOT available on serverless
curl -s "${ES_URL%/}/_cluster/health" -H "Authorization: ApiKey $(printenv ES_API_KEY)" | jq .

# Node stats summary — NOT available on serverless
curl -s "${ES_URL%/}/_cat/nodes?v&h=name,heap.percent,ram.percent,cpu,load_1m,disk.used_percent"  \
  -H "Authorization: ApiKey $(printenv ES_API_KEY)"

# Index overview (works on both serverless and traditional)
curl -s "${ES_URL%/}/_cat/indices?v&s=store.size:desc&h=index,health,status,docs.count,store.size" \
  -H "Authorization: ApiKey $(printenv ES_API_KEY)"

Serverless Elasticsearch: If you get api_not_available_exception errors, the cluster is running in serverless mode. The following APIs are not available in serverless:

  • _cluster/health, _cluster/settings, _cluster/allocation/explain, _cluster/pending_tasks
  • _cat/nodes, _cat/shards
  • _nodes/hot_threads, _nodes/stats
  • ILM APIs (_ilm/*)

Read the full file on GitHub · 341 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 341 lines · 97 tokens per session scan C ab1e510a6f2d

Subscribe to this mod's changes

elasticsearch is a skill published in the GitHub repository NikiforovAll/claude-code-rules (141 stars, last pushed 18d ago), licensed Apache-2.0. It adds 97 tokens to every session and 3,669 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 2 findings (harvests environment variables, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories