Skip to main content
skill CX Codex

elastic-package-cli — Claude Code skill: build and test Elastic integrations

Walks your agent through elastic-package commands: formatting, linting, artifact builds, pipeline and system tests, local Elastic stack.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add elastic/integration-skills --skill elastic-package-cli -a claude-code
Open on GitHub

What elastic-package-cli does

This skill lays out the loops you follow while developing and validating Elastic integrations. Routine local verification runs elastic-package format, then lint, check and build. check combines linting and building and stops at the first failure by default; format --fail-fast verifies without rewriting files.

Faster pipeline iteration uses an Elasticsearch-only stack: elastic-package stack up -d --services=elasticsearch, followed by test pipeline. The --generate flag rewrites expected outputs, so review those files before keeping them. End-to-end runs go stack up -d, service up, test system, and --data-streams <name> narrows the scope.

Inside you get a command map and a flag cheat sheet: global -C and -v, stack flags -d, -s, --version, -p, system test flags --setup, --tear-down, --no-provision, --variant. Failure diagnosis lives in references/troubleshooting.md. Nothing runs without elastic-package on your PATH and a container runtime such as Docker or Podman, and commands expect a package directory or -C <package-dir>. ECS field design and ingest processor strategy are out of scope here.

What it helps with

  • verify package structure and formatting before a commit
  • produce a package artifact
  • run pipeline tests and regenerate expected outputs
  • bring up a local Elastic stack for end-to-end runs
  • check package status in Kibana after install

Example prompts for the agent

  • Run format, lint, check and build on this package in order.
  • Start the stack with Elasticsearch only and run test pipeline.
  • Run system tests scoped to one data stream with --data-streams.

How to install elastic-package-cli

1Skills CLI (Vercel)

npx skills add elastic/integration-skills --skill elastic-package-cli -a claude-code

2Manually: put the files in place

~/.claude/skills/elastic-package-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/elastic-package-cli/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about elastic-package-cli

How do I install elastic-package-cli in Claude Code?

Run npx skills add elastic/integration-skills --skill elastic-package-cli -a claude-code. The skill file lands at ~/.claude/skills/elastic-package-cli/SKILL.md.

What does elastic-package-cli do?

It tells the agent which elastic-package commands to use when checking, building and testing Elastic integrations. It ships command sequences, a command map and a flag cheat sheet.

What do I need before using it?

elastic-package available on your PATH and a container runtime, Docker or Podman. Run commands from a package directory or pass -C <package-dir>.

Source text

SKILL.md · Apache-2.0
---
name: elastic-package-cli
description: "Use when developing or validating Elastic integrations with elastic-package commands such as build, check, lint, format, test, stack, service, install, profiles, and benchmark."
license: Apache-2.0
metadata:
  author: elastic
  version: "1.0"
---

# elastic-package CLI


## When to use

Use this skill when tasks include:
- validating package structure and formatting
- building a package artifact
- running pipeline or system tests
- managing local Elastic test stack lifecycle
- installing or checking package status in Kibana

## When not to use

Do not use this skill as the primary guide for:
- ECS field design decisions (use an ECS-focused skill)
- ingest processor design and parsing strategy (use an ingest-pipeline-focused skill)
- package layout architecture (use a package-structure-focused skill)

## Prerequisites

- `elastic-package` is installed and available in `PATH`
- container runtime is available (Docker or Podman)
- you run commands from a package directory (or pass `-C <package-dir>`)

## Core workflows

### 1) Validate and build loop

Run this sequence for routine local verification:

```bash
elastic-package format
elastic-package lint
elastic-package check
elastic-package build
```

Notes:
- `check` runs lint and build together and fails fast by default.
- use `format --fail-fast` when you want read-only verification without rewriting files.

### 2) Pipeline test loop (fast iteration)

Use Elasticsearch-only stack for quicker feedback:

```bash
elastic-package stack up -d --services=elasticsearch
elastic-package test pipeline
elastic-package test pipeline --generate
```

Then review generated expected files before keeping changes.

### 3) System test loop (end-to-end)

Use this when you need full ingest behavior with service provisioning:

```bash
elastic-package stack up -d
elastic-package service up
elastic-package test system
```

Use `--data-streams <name>` to scope tests and reduce run time.

## Practical command examples

```bash
# format package files
elastic-package format

# lint against package spec and templates
elastic-package lint

# combined validation workflow
elastic-package check

# build package artifact
elastic-package build

# start only Elasticsearch for pipeline tests
elastic-package stack up -d --services=elasticsearch

# run pipeline tests
elastic-package test pipeline

# regenerate expected pipeline outputs
elastic-package test pipeline --generate

# run end-to-end system tests
elastic-package test system
```

## Key flags cheat sheet

- global: `-C, --change-directory`, `-v, --verbose`
- stack: `-d, --daemon`, `-s, --services`, `--version`, `-p, --profile`
- pipeline tests: `-d, --data-streams`, `-g, --generate`, `-m, --fail-on-missing`
- system tests: `--setup`, `--tear-down`, `--no-provision`, `--variant`

## Quick command map

- validate/build: `format`, `lint`, `check`, `build`
- stack lifecycle: `stack up`, `stack status`, `stack down`
- testing: `test pipeline`, `test system`, `test static`, `test asset`, `test policy`, `test script`
- package lifecycle: `create`, `install`, `status`, `uninstall`
- support: `service up`, `profiles`, `benchmark`

## References

- Failure diagnosis and fixes: `references/troubleshooting.md`

© elastic · Apache-2.0 · elastic/integration-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set10

integration-testing A skill for writing and debugging elastic-package tests: pipeline fixtures, system tests with mock APIs, and script tests. Useful when you work on Elastic integrations. CX Codex +1 514installs research-integration Researches a product or vendor before an Elastic integration is built. Use it to inspect APIs, logs, field schemas, ECS candidates, and collection settings. CX Codex +1 513installs dashboard-review Compares Kibana dashboard JSON changes between branches and checks modified dashboards against Elastic guidelines. Use it when reviewing a dashboard PR. CX Codex +1 511installs anonymize-logs Replaces sensitive values in customer logs line by line, leaving structure and format untouched. Useful when logs go to a vendor or into a commit. CX Codex +1 510installs create-integration This skill creates Elastic integration packages, sets up data streams, and coordinates CEL, pipeline, and system-test work. CX Codex +1 509installs cel-programs A skill for CEL and mito work in API-collecting integrations: cel.yml.hbs templates, manifests, mock-first debugging. CX Codex +1 505installs maintain-integration Reviews and improves existing Elastic integration packages, covering manifests, pipelines, CEL programs, field mappings, and ECS categorization. CX Codex +1 504installs input-configurations A skill for building and reviewing input templates in Elastic integrations, from HTTPJSON and S3 to Journald and WebSocket. Federated Identity for AWS included. CX Codex +1 504installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor