Agent skill · elastic

elasticsearch-ingest

Load CSV and JSON files into Elasticsearch indices using the bulk API and explicit mappings when field types matter. Use when batch-importing local files, converting CSV rows or JSON arrays to NDJSON bulk format, or verifying document counts and mappings after ingest — not for Logstash pipelines, Beats, custom scripts, or index-to-index reindex.

What it needs

About 6k tokens when loaded.

What this skill does

Elasticsearch File Ingest Load local data files into Elasticsearch by converting them to bulk NDJSON, creating an index with the right mappings when types matter, bulk-indexing documents, and verifying the outcome. <!-- begin-partial: preamble --> Environment Configuration This skill executes Elasticsearch operations through the elastic CLI. If the elastic CLI is not installed, tell the user what it is needed for. Do not guess credentials, call the HTTP API directly, or attempt other workarounds. This skill references operations in HTTP-shorthand form (e.g., GET /, GET /cat/indices, GET /{index}/mapping, GET /{index}/settings/index.mode, POST /query). The Operations table at the end of this document maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API directly. <!-- end-partial: preamble --> Scope This skill covers file → index loading through POST /bulk. It does not use Logstash, Filebeat, Elastic Agent, Node.js ingest tools, or other sidecar pipelines. For copying documents between existing indices, use index-to-index reindex instead of re-parsing source files. Supported source shapes: Source shape Example Bulk requirement ------------------- -------------------------------- ---------------------------------------------------------------------------------- CSV with header row id,name,age,... then data rows Parse header into field names; emit one action line + one JSON object per data row JSON array file [{"a":1},{"a":2}] Split into per-document lines — never bulk-load the raw array as a single document NDJSON / JSON Lines one JSON object per line Optionally add action lines if missing; otherwise ready for bulk Parquet, Arrow, and other binary columnar formats are out of scope unless the user converts them to CSV or JSON first. Process 1. Confirm connectivity. Call GET /. If the call fails, stop and resolve CLI configuration before reading files or mutating cluster state. 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills elastic/elasticsearch-ingest

View the source on GitHub

Browse the @skills marketplace