ecs-field-mappings

Define ECS field mappings and validate data streams against the ECS schema.

15|5|Updated May 11, 2026
One-click install
npx skills add https://github.com/elastic/integration-skills --skill ecs-field-mappings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ecs-field-mappings
Source: https://github.com/elastic/integration-skills/tree/main/skills/ecs-field-mappings
Command: npx skills add https://github.com/elastic/integration-skills --skill ecs-field-mappings

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams define and validate ECS field mappings for data streams, ensuring ECS references are declared correctly and field types align with the ECS schema.

Core Features & Use Cases

  • Populate ecs.yml with ECS field references and set proper external: ecs flags.
  • Choose appropriate field types (keyword, constant_keyword, date, nested, etc.) and configure routing constants like data_stream.*.
  • Troubleshoot mapping validation failures with elastic-package checks and linting to ensure schema conformity.

Quick Start

Edit ecs.yml to declare ECS fields and run elastic-package lint to verify mappings.

Frequently Asked Questions about ecs-field-mappings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define ECS field mappings in an Elastic package?

To define ECS field mappings, populate ecs.yml with ECS field references and set the external: ecs flag. This ensures your data streams align correctly with the ECS schema during package development.

Why does elastic-package lint fail with ECS field validation errors?

elastic-package lint fails when ecs.yml has incorrect field types, improper nesting for nested fields, or missing external: ecs declarations. Validate your data stream mappings against the ECS schema to resolve these failures.

What is the correct way to configure data_stream.* routing constants in ecs.yml?

Configuring data_stream.* routing constants in ecs.yml requires choosing appropriate field types like constant_keyword. This ensures proper ECS categorization and routing for your data pipelines.

When do I need to use external: ecs in my ecs.yml file?

You need to use external: ecs in ecs.yml whenever you reference standard ECS fields. This flag enforces schema conformity and allows elastic-package validation to verify field types and coverage.

Can I validate data stream schemas against ECS references without elastic-package?

elastic-package provides the lint and test validation needed to verify data stream schemas against ECS references. Without it, you cannot automatically enforce ECS field coverage and schema conformity.