Skills

Elasticsearch Ingest

Load CSV, JSON, and NDJSON files into Elasticsearch indices using the bulk API and...

Install

npx skills add elastic/agent-skills --skill elasticsearch-ingest -g -a claude-code -y
Category
Engineering
Updated
6d ago
License
Apache-2.0
Context cost
Mediumabout 2,787 tokens
Runs scripts
No, instructions only

What it does

Load CSV, JSON, and NDJSON 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, confirming cluster connectivity with elastic es info before ingest, or verifying document counts and mappings after ingest, not for Logstash pipelines, Beats, custom scripts, or index-to-index reindex.

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:

Read the whole SKILL.md on GitHub

More in Engineering