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.
npx agentmods add skills/nikiforovall/claude-code-rules/elasticsearchnpx skills add NikiforovAll/claude-code-rules --skill elasticsearchgit clone --depth 1 https://github.com/NikiforovAll/claude-code-rulesWrote 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.
[](https://agentmods.dev/skills/nikiforovall/claude-code-rules/elasticsearch)<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>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.
| Model | Per session | Once 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 |
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, 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_KEYin curl headers. The$ES_API_KEYvariable may not expand correctly in the shell, resulting in emptyAuthorizationheaders 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/*)
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/aggregations-api.md 4.2 KB
- references/aggregations.md 8.1 KB
- references/cluster-api.md 2.8 KB
- references/document-api.md 2.4 KB
- references/index-api.md 3.2 KB
- references/kibana-api.md 13 KB
- references/mapping-api.md 3.8 KB
- references/otel-data.md 10 KB
- references/query-dsl.md 7.2 KB
- references/search-api.md 3.7 KB
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.
- 5d ago First seen · 341 lines · 97 tokens per session scan C ab1e510a6f2d
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.
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.
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…
cloudflare-d1
Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1ERROR, statement too long, too many requests queued errors.
cloudflare-vectorize
Cloudflare Vectorize vector database for semantic search and RAG. Use for vector indexes, embeddings, similarity search, or encountering dimension mismatches, filter errors.
cloudflare-kv
Cloudflare Workers KV global key-value storage. Use for namespaces, caching, TTL, or encountering KVERROR, 429 rate limits, consistency issues.
bun-drizzle-integration
Use when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.