elasticsearch

elasticsearch is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/nikiforovall/claude-code-rules/elasticsearch
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00097 $0.03669
Opus 5 $0.00048 $0.01835
Sonnet 5 $0.00019 $0.00734
Haiku 4.5 $0.00010 $0.00367

Measured 5d ago against content hash ab1e510a6f2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 6d ago), licensed Apache-2.0. It adds 97 tokens to every session and 3,669 once invoked, about $0.0005 per session on Opus 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

sql-queries

Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.

phuryn/pm-skills · 55 tokens

ddia-systems

Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…

wondelai/skills · 138 tokens

cloudflare-d1

Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1ERROR, statement too long, too many requests queued errors.

secondsky/claude-skills · 39 tokens

cloudflare-vectorize

Cloudflare Vectorize vector database for semantic search and RAG. Use for vector indexes, embeddings, similarity search, or encountering dimension mismatches, filter errors.

secondsky/claude-skills · 37 tokens

cloudflare-kv

Cloudflare Workers KV global key-value storage. Use for namespaces, caching, TTL, or encountering KVERROR, 429 rate limits, consistency issues.

secondsky/claude-skills · 35 tokens

bun-drizzle-integration

Use when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.

secondsky/claude-skills · 25 tokens