# Elasticsearch Ingest

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

- Repository: https://github.com/elastic/agent-skills (603 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add elastic/agent-skills --skill elasticsearch-ingest -g -a claude-code -y`
Codex: `npx skills add elastic/agent-skills --skill elasticsearch-ingest -g -a codex -y`
Cursor: `npx skills add elastic/agent-skills --skill elasticsearch-ingest -g -a cursor -y`
Gemini CLI: `npx skills add elastic/agent-skills --skill elasticsearch-ingest -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add elastic/agent-skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](https://github.com/elastic/cli#configuration) 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](#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:

The rest: https://github.com/elastic/agent-skills/blob/HEAD/plugins/elasticsearch/skills/elasticsearch-ingest/SKILL.md
