elasticsearch-guide

elasticsearch-guide is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 65 tokens per session (2,153 once invoked), scanned B, original, MIT.

A guide to using Elasticsearch and Kibana for full-text search, filtering, log analysis, metrics, and data summaries. Elasticsearch is a search database, while Kibana is its visual dashboard tool.

In plain words
What is it for?
Use it to define mappings, choose text versus exact-match fields, design indexes for logs and time-based data, and build queries and aggregations.
Why use it?
It helps prevent unsuitable field types, shard layouts, retention settings, or search designs that cause inaccurate results or poor performance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define mappings, choose text versus exact-match fields, design indexes for logs and time-based data, and build queries and aggregations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/elasticsearch-guide
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 khalilbenaz/claude-skills-collection --skill elasticsearch-guide
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

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-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide/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-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/elasticsearch-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00065 $0.02153
Opus 5 $0.00032 $0.01077
Sonnet 5 $0.00013 $0.00431
Haiku 4.5 $0.00006 $0.00215

Measured 9d ago against content hash dd37f1ff0117, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

elasticsearch-guide scanned grade B 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 9d 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -X POST "localhost:9200/_bulk" -H 'Content-Type: application/json' --data-binary @data.ndjson

Makes network callslowCapability

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

curl -X POST "localhost:9200/_bulk" -H 'Content-Type: application/json' --data-binary @data.ndjson
database-skills/elasticsearch-guide/SKILL.md · 246 lines

How it starts

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

Elasticsearch Guide

Workflow

1. Analyser le besoin

Avant tout mapping ou requête, répondre à ces questions :

Question Impact
Full-text ou filtrage exact ? text vs keyword
Données temporelles (logs, métriques) ? ILM + data streams
Volume par jour / rétention ? Nombre de shards, rollover
Latence cible (<100ms / <1s) ? Replicas, routing, cache
Agrégations nécessaires ? doc_values: true, fielddata à éviter

2. Concevoir le mapping

Toujours définir un mapping explicite — ne jamais laisser Elasticsearch inférer en production.

PUT /produits
{
  "mappings": {
    "properties": {
      "titre":        { "type": "text", "analyzer": "french",
                        "fields": { "raw": { "type": "keyword" } } },
      "categorie":    { "type": "keyword" },
      "prix":         { "type": "scaled_float", "scaling_factor": 100 },
      "created_at":   { "type": "date", "format": "strict_date_optional_time" },
      "tags":         { "type": "keyword" },
      "description":  { "type": "text", "index": false, "doc_values": false }
    }
  }
}

Critères de décision des types :

  • text → recherche full-text (tokenisé, analysé)
  • keyword → filtres, agrégations, tri exact (categorie, status, id)
  • nested → tableaux d'objets avec relations internes (éviter si possible, coûteux)
  • flattened → JSON dynamique avec structure inconnue, moindre coût que nested
  • scaled_float → montants monétaires (éviter float pour les arrondis)

3. Configurer l'index et l'ILM

PUT _ilm/policy/logs-policy
{
  "policy": {
    "phases": {
      "hot":    { "actions": { "rollover": { "max_size": "50gb", "max_age": "7d" } } },
      "warm":   { "min_age": "7d",  "actions": { "shrink": { "number_of_shards": 1 }, "forcemerge": { "max_num_segments": 1 } } },
      "cold":   { "min_age": "30d", "actions": { "freeze": {} } },
      "delete": { "min_age": "90d", "actions": { "delete": {} } }
    }
  }
}

Read the full file on GitHub · 246 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. 9d ago First seen · 246 lines · 65 tokens per session scan B dd37f1ff0117

Subscribe to this mod's changes

elasticsearch-guide is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 19d ago), licensed MIT. It adds 65 tokens to every session and 2,153 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

database-patterns

DB schema design and query tuning: normalization, indexing, N+1, transactions, EXPLAIN. Triggers: schema, index, slow query, N+1, PostgreSQL, MySQL, EXPLAIN, deadlock, query plan.

softspark/ai-toolkit · 55 tokens

migration-patterns

Zero-downtime DB migrations: expand-contract, double-write, backfill, blue-green. Triggers: migration, schema change, backfill, ALTER TABLE, online DDL.

softspark/ai-toolkit · 41 tokens

migrate

Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup. Triggers: apply migration, rollback, generate migration.

softspark/ai-toolkit · 38 tokens

mongo-migration

MongoDB schema migration safety reviewer and migration script generator. ALWAYS use when writing, reviewing, or planning MongoDB schema changes — field additions/removals, index builds, schema validator changes, document type migrations, shard key modifications, or any bulk update touching production collections.…

johnqtcg/awesome-skills · 140 tokens

mysql-migration

MySQL schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning MySQL schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, charset conversions, data backfills, or any DDL touching production tables. Covers online DDL algorithm selection (INSTANT/INPLACE/COPY)…

johnqtcg/awesome-skills · 132 tokens

oracle-migration

Oracle Database schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning Oracle schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, constraint additions, partition DDL, or any DDL touching production tables. Covers DDL auto-commit implications…

johnqtcg/awesome-skills · 141 tokens