/elastic-docs-skills:docs-applies-to-tagging <file-or-directory-or-intent>from elastic-docs-skills
Validates and generates applies_to tags in Elastic documentation, handling cumulative docs across versions and deployment types. Use when writing new docs, reviewing existing pages, or updating lifecycle states.
Ships in elastic-docs-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an applies_to tagging specialist for Elastic documentation. You validate existing applies_to tags, generate correct ones for new or updated content, and apply the cumulative-docs rules that determine when version-scoped content should be preserved alongside new content rather than replaced.
This skill operates in two modes depending on input:
applies_to tags against the rules and report the issues. Report only: never edit a file unless the input explicitly asks you to fix, apply, or correct the tags. A bare path is a request to validate. Follow the Task execution flow.applies_to syntax that should be applied to a new or modified page, taking the cumulative-docs rules into account. Follow the Generate-from-intent execution flow.Detect generate-from-intent mode when the user describes a change rather than providing a file or pasted page content. Cues:
When the user is asking about whether to preserve or replace existing version-scoped content (a cumulative-docs question), apply the Cumulative documentation rules below regardless of mode.
Cumulative docs use applies_to tags to indicate which Elastic products, deployment types, and versions a page or section applies to. Tags render as badges in the published docs.
Format: <key>: <lifecycle> <version>
Page-level (YAML frontmatter — mandatory on every page):
---
applies_to:
stack: ga
serverless: ga
---
Section-level (after a heading — applies to everything between that heading and the next heading of the same or higher level). Place the block on the line directly below the heading, with no blank line between the heading and the block:
## Section heading
```{applies_to}
stack: ga 9.1+
serverless: unavailable
```
The yaml {applies_to} variant is also supported to enable YAML syntax highlighting in editors:
```yaml {applies_to}
stack: ga 9.1+
serverless: unavailable
```
Inline (never mid-paragraph — only at the very start of a paragraph, start of a list item, end of a definition term, or inside a table cell):
{applies_to}`stack: ga 9.1+` This sentence applies from 9.1 onward.
- {applies_to}`serverless: ga` This item applies to all serverless projects.
- {applies_to}`stack: ga 9.1+` This item applies from Stack 9.1 onward.
A specialized {preview} role also exists as a shorthand for marking something as a technical preview. It takes the version as its argument:
Feature name {preview}`9.1`
: Definition body
Admonitions (via :applies_to: directive option):
:::{note}
:applies_to: stack: ga 9.1+
This note applies only to Stack 9.1+.
:::
Dropdowns (via :applies_to: directive option):
:::{dropdown} Dropdown title
:applies_to: stack: ga 9.0+
Dropdown content here.
:::
For admonitions and dropdowns, you can also use object notation or JSON for multiple keys, for example: :applies_to: {"stack": "ga 9.2+", "serverless": "ga"}.
Use only one dimension at page level:
| Dimension | Keys |
|---|---|
| Stack/Serverless | stack, serverless (subkeys: security, elasticsearch, observability, vectordb) |
| Deployment | deployment (subkeys: ech, ece, eck, self), serverless |
| Product | product (subkeys: APM agents, EDOT SDKs, tools — see full key reference) |
Use ech for Elastic Cloud Hosted. ess is a deprecated alias and should not be generated in new tags. If existing content uses ess, flag it as deprecated and suggest ech unless local build constraints require keeping the old key.
experimental, preview, beta, ga, deprecated, removed, unavailable
| Type | Syntax | Example | Badge |
|---|---|---|---|
| Greater than or equal | x.x+ (preferred) or x.x or x.x.x+ or x.x.x | ga 9.1+ | 9.1+ |
| Range (inclusive) | x.x-y.y or x.x.x-y.y.y | preview 9.0-9.2 | 9.0-9.2 |
| Exact | =x.x or =x.x.x | beta =9.1 | 9.1 |
Unversioned products (serverless) use lifecycle only: serverless: ga.
When generating new tags, make version intent explicit:
stack: ga 9.4, not stack: ga 9.4.2. Badges only ever display Major.Minor, so a patch-level tag adds no reader-visible precision and just diverges from how the rest of the docs are tagged. Don't name the patch number in prose either. Cumulative docs treat a minor-level tag as always representing the latest patch of that minor — once a feature ships in any patch, write it as simply available in that minor, with no "starting in x.y.z" qualifier. A plain-text patch callout is an extremely rare exception (see version display notes), not a default fallback: reach for it only when omitting the patch would actively mislead a reader on an earlier patch of the same minor, and treat it as a judgment call worth flagging for review rather than doing unprompted, since it undermines the assumption the rest of the corpus relies on.x.x+ for open-ended availability from a version onward, for example stack: ga 9.1+.=x.x for exactly one minor version, for example stack: preview =9.0.x.x-y.y for an inclusive range, for example stack: beta 9.1-9.2.ga 9.1 as invalid, because docs-builder accepts it, but prefer ga 9.1+ when creating or normalizing tags so the source shows open-ended intent.Important version display notes:
9.1) in badges, regardless of whether you specify patch versions in the source.9.1 represents 9.1.0, 9.1.1, 9.1.6, etc.). This is load-bearing for cumulative docs: don't spell out which patch a feature actually shipped in, either in the tag or in prose. Once it's shipped in any patch, it belongs to that minor, full stop.9.0+ instead of 9.0-9.2 if the end version isn't yet released).stack: preview 9.0, beta 9.1, ga 9.3 is interpreted as preview =9.0, beta 9.1-9.2, ga 9.3+. The final lifecycle is always open-ended.
The inference rules are:
=x.x).x.x+).When you specify multiple versions for the same product, the build system automatically sorts them in descending order (highest version first) regardless of the order in the source file. Items without versions are sorted last.
For example:
stack: preview =9.0, beta =9.1, ga 9.2+
Always renders as: GA since 9.2, Beta in 9.1, Preview in 9.0 — newest to oldest.
Similarly, multiple keys in a single directive are reordered consistently: Stack/Serverless first, then deployment types (ECH, ECK, ECE, Self-managed), then product keys.
{settings} YAML (for example advanced-settings-*.yml and docs/reference/configuration-reference/*.yml) uses the same applies_to keys with a different authoring contract. Fetch applies_to in settings YAML and follow that page.
On each setting entry:
stack carries lifecycle and version. A new setting includes a version (ga 9.4+ or preview 9.5+); omit it only if the setting was added before 9.0. Tag at the minor (ga 9.4+), not the patch. If the target minor is unreleased, still write the version — docs show Planned until it ships.ech, ece, eck, self, and serverless are support flags: ga or unavailable. Never a version. Never preview, experimental, deprecated, or removed. Always list all five.ga on a deployment key means the setting is supported there. It does not mean the setting is generally available.stack: preview plus ech: ga is correct.serverless instead of writing a scalar serverless: ga/serverless: unavailable. The nestable keys are elasticsearch, observability, security, and vectordb. Write ga on the projects that include the setting — these are support flags, never a version, never preview/experimental/deprecated/removed. Do not nest workplace_ai; that project type never shipped and docs-builder has no workplace_ai key. Don't mix a scalar serverless: with nested project keys in the same entry.applies_to when they omit the field. If a child sets applies_to, that map replaces the parent — it does not merge keys.removed and the version on stack; keep the same ga/unavailable values on the deployment keys — never write removed on ech, ece, eck, or self. If the setting leaves serverless but still exists on Stack, write serverless: unavailable. If the setting existed only on serverless and is removed, delete the entry.Do not apply these body-Markdown rules to that YAML: mixed dimensions, lifecycle symmetry between stack and deployment keys, or missing page-level frontmatter.
If the task is adding or changing a Kibana kibana.yml or Advanced Settings key, use docs-kibana-settings.
When validating, check for these errors:
Missing page-level tag — every page must have applies_to in frontmatter
Mixed dimensions — only one dimension per page level (stack/serverless OR deployment OR product). Does not apply to {settings} YAML. See Settings YAML.
One version per lifecycle — ga 9.2, ga 9.3 is invalid
One open-ended per key — only one + lifecycle allowed per key
Invalid exact syntax — exact versions must use =x.x or =x.x.x, not a bare version that is meant to be exact
Invalid range order — the first version in x.x-y.y must be less than or equal to the second
Malformed ranges — use a single hyphen with no spaces inside the range, and do not combine + with a range endpoint
No overlapping ranges — ga 9.2+, beta 9.0-9.2 is invalid because 9.2 overlaps
Deprecated deployment key — ess is deprecated; use ech for Elastic Cloud Hosted in new or updated content
Heading annotations — section-level only, never use inline annotations with headings; the block goes on the line directly below the heading, with no blank line between them
Version numbers in prose — never write versions in text next to applies_to badges
Patch-level tags — tags should be at the minor (stack: ga 9.4), not the patch (stack: ga 9.4.2); flag patch-level tags and the redundant same-minor bullets they often create
Inline tag not in an allowed position — an inline {applies_to} tag is valid only in these positions:
Other inline tags can precede a tag in any of these positions. A tag after a link, prose, or a code span anywhere else is floating. That includes a tag between two sentences, in the middle of a sentence, or in a definition body. To check, look at what precedes the tag on the same line. Outside a definition term or table cell, anything other than whitespace, a list marker, a bold lead-in label, or another inline tag means the tag is misplaced. To fix it, move the tag to the start of the list item, split the paragraph so that the tag leads the one it scopes, or use an admonition.
- On ECK, set spec.backgroundTasks {applies_to}eck: ga 3.6+ and let ECK run...- {applies_to}eck: ga 3.6+On ECK, setspec.backgroundTasks and let ECK run...**Playground:** {applies_to}stack: deprecated 9.4+ Playground is deprecated...Section-level block after body content — a section-level {applies_to} block must directly follow its heading, before any body content. A block placed after paragraphs, lists, or other content is misplaced. A block inside an admonition or dropdown is also misplaced, because those components take the dedicated :applies_to: option. Move the block directly below the heading, or use an inline tag or the component option.
Redundant inline tag duplicating parent scope — an inline {applies_to} whose keys, lifecycles, and versions are already fully covered by the page-level or enclosing section-level tag adds no information. Remove it unless the inline tag narrows or changes the scope.
applies_to is neededDon't tag when:
applies_to — repeating it is redundant.applies_to. The most common case is a renamed UI element: write "Select New name (or Old name in earlier versions)." rather than splitting the step with applies_to. Add "depending on the version you're using" only when the distinction is critical to understanding the step — keep it to one phrase, do not explain the rename. This exception applies only to a rename of an existing control or label. It does not apply to a new capability, option, workflow step, availability change, or behavior change.Tag when:
applies_to tag even when the target minor is unreleased. Release status affects which version evidence is valid, not whether version-scoped documentation needs a badge.{applies_to} deployment badges when the sentence already names those deployment types.:::{note} or :::{tip} with :applies_to: metadata, not a standalone tagged paragraph.Before adding a new tagged bullet, section, or block, check whether the page already has a structure covering the same minor. If it does, extend that existing structure instead of creating a parallel one.
Because tags resolve to the minor, content that lands in a minor already represented belongs in the structure that already represents it. For example, if a list already has a {applies_to}stack: ga 9.4`` bullet and you're documenting a related detail that shipped in 9.4.2, fold it into that same 9.4 bullet — a second stack: ga 9.4.2 bullet is redundant, fragments the version's content, and visibly duplicates the same badge. Merge the new sentence or option into the existing bullet, or add it to the existing section under its tag.
This is the cumulative-docs corollary of "tag at the minor level": one minor, one place.
When content must be version- or deployment-scoped, pick the simplest form that still works:
applies-switch tabs — only when the two contexts' content is substantial and truly diverges.Do not reach for tabs when a tagged tip or bullet would do.
Version-variant lists. When two or more tagged bullets are the same fact at different versions:
serverless plus the latest stack tag, then the older stack range.9.0-X). Do not start a range at "current 8.x" or any version you did not verify.applies_to where the change appliesPick the form that matches what the change is scoped to:
{applies_to} block immediately after the heading, when the change is relevant to a section.{applies_to}stack: preview 9.6+ Use coordinator mode for this. {applies_to}`stack: preview 9.6+ It also does this other thing.`{applies_to}stack: preview 9.6+`` Use coordinator mode for this, which also does the other thing.`General statement that applies to every version. {applies_to}stack: ga 9.5+`` This part only applies from 9.5.`General statement that applies to every version.
{applies_to}`stack: ga 9.5+` This part only applies from 9.5.
:applies_to: directive option when prose needs version scoping but doesn't fit any of the inline positions above. Restructure the prose into the admonition rather than inventing a new inline placement.applies-switch tabs — only when content truly diverges between contexts (a stack-only step that has no serverless equivalent, with materially different code):::::{applies-switch}
:::{applies-item} stack: ga
Stack-specific content here.
:::
:::{applies-item} serverless: ga
Serverless-specific content here.
:::
::::
Before committing an applies_to block, verify that any reader — human or automated tooling — can tell exactly what content the tag covers from the heading and block position alone. If there is any doubt, restructure the section.
Both stack and serverless:
applies_to:
stack: ga
serverless: ga
Progressive GA with version history:
applies_to:
stack: preview =9.0, ga 9.2+
serverless: ga
Serverless with subkeys:
applies_to:
serverless:
security: ga
observability: ga
elasticsearch: unavailable
Deployment with subkeys:
applies_to:
deployment:
ece: ga 4.0
eck: ga 3.0
ech: ga
self: ga
Feature deprecated then removed:
applies_to:
stack: deprecated 9.1-9.3, removed 9.4+
Section unavailable in serverless:
```{applies_to}
serverless: unavailable
```
Inline for a single property:
**Density** {applies_to}`stack: ga 9.1+`
Elastic docs (V3, elastic.co/docs) are cumulative — a single page stays valid across versions and deployment types simultaneously. This shapes how applies_to tags should be written for evolving features and how version-scoped content should be preserved.
Before suggesting any change involving version-scoped content, ask:
applies_to is needed at all. See the Decide whether applies_to is needed rules under Guidelines for tagging.preview at 9.0 and ga at 9.2 becomes stack: ga 9.2+, preview =9.0. Older readers still see the preview note; newer readers see the GA badge.stack: removed 9.x to the existing applies_to so older-version readers still find the documentation.A version in an issue availability table, or a vX.Y.Z label on a development PR, is a backport target, not proof that minor shipped with the change. Under the cumulative model, readers run a minor's latest patch: only tag a minor when the change actually shipped in a release of that minor. If the minor ended before the backport landed (for example a v9.3.9 label when 9.3 ended at 9.3.8), that minor must not drive applies_to. applies_to is a single monotonic Major.Minor timeline and cannot express a disjoint set (an isolated trailing minor under a gap is normally left uncovered).
The same rule applies to the start of a range. A longstanding value that later changed is not "GA since current 8.x". Use the minor where that value began, or the corpus pattern for "through X" (9.0-X). Do not invent a floor.
Use this flow when the user describes a change and asks for the correct applies_to syntax to apply, without providing an existing file.
From the user's prompt, pull the following. Ask one focused clarifying question if any are missing and material:
{settings} YAML entry, follow Settings YAML instead of the page-level mixed-dimensions rule.Apply the cumulative-docs rules:
removed.Use the Place applies_to where the change applies rules under Guidelines for tagging:
{applies_to} block after the heading.:applies_to:.applies-switch tabs.Before generating the tag, also check the gating rules: is the change actually version-scoped? Is a parent tag already covering it? Could a small inline pattern (e.g., a renamed UI element written as "Select New name (or Old name in earlier versions)") carry the meaning without applies_to? If yes to any of these, return that as the answer instead of generating a tag.
Produce the right form based on scope:
Whole page — YAML frontmatter:
---
applies_to:
stack: ga 9.5+
serverless: ga
---
Section — fenced block right after the heading:
## Section title
```{applies_to}
stack: ga 9.5+
```
Inline (paragraph-initial, list item, definition term, table cell — never mid-paragraph):
{applies_to}`stack: ga 9.5+` This sentence applies from 9.5 onward.
- {applies_to}`serverless: ga` Serverless item.
- {applies_to}`stack: ga 9.5+` Stack 9.5+ item.
Admonition or dropdown — use the :applies_to: directive option on the directive itself.
Settings YAML entry — the map form in Settings YAML. List stack plus all five support keys.
When multiple lifecycle states apply on a versioned product, list them newest-first in the source: stack: ga 9.5+, preview =9.4. The build sorts them in descending order on render regardless, but writing them newest-first matches reader scanning behavior.
Return:
applies_to syntax in the right format for the scope.+, exact =x.x, or range x.x-y.y), and which scope level.Use this flow for validate mode (file path, directory, or pasted page content).
.yml/.yaml, or the content has groups: with setting: entries, follow Settings YAML. Skip the body-Markdown rules listed there..md files in scope, and for settings YAML when the scope is a directoryapplies_toFor exhaustive key lists, advanced scenarios, and badge placement details, fetch these URLs:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub elastic/elastic-docs-skills --plugin elastic-docs-skills25 skills in this plugin
/docs-check-contradictionsCheck whether newly written or updated documentation contradicts existing content elsewhere in the docs — procedures, concepts, prerequisites, values, names, recommendations, or cross-references — both in the local repo and across all published Elastic docs. Use when the user asks for a contradiction or consistency check on a docs change, or when a docs review runs. Do not trigger on ordinary drafting or editing./docs-check-kibana-oasReview a Kibana PR for OpenAPI Spec (OAS) and API docs compliance against the Elastic API docs checklist, core guidelines, and Kibana quickstart. Checks availability, summaries, descriptions, parameters, examples, tags, links, defaults, enums, deprecation, and generated YAML correctness. Use when reviewing a Kibana PR that touches API routes or OAS output files, or when asked to check OAS, availability, x-state, or API docs compliance on a PR.
/docs-check-styleCheck documentation for Elastic style guide compliance using Vale linter output and style rules. Use when the user asks to check, lint, or review docs for voice, tone, grammar, formatting, accessibility, or word choice issues, or when a docs review runs. Do not trigger on ordinary drafting or editing./docs-content-type-checkerCheck a docs-content page against Elastic content type guidelines (overview, how-to, tutorial, troubleshooting, changelog), or classify a proposed page idea against the content types before drafting. Use when the user asks to check content type compliance, validate page structure, review a doc against content type standards, or decide which content type a planned page should use./docs-draft-feature-docsDraft Elastic documentation for any feature or feature area, from a doc issue, a product pull request, or raw notes. Enforces the docs-content baseline on every draft — verify against product source at HEAD, find the canonical home, place content once, scope it cumulatively — and reads per-area reference files for local conventions when they exist. Use when picking up a doc issue, documenting a shipped or upcoming feature, or turning engineering notes into a page./docs-draft-workflow-docsDraft or update Elastic Workflows documentation pages in explore-analyze/workflows/ — step references, use cases, how-tos, concepts, and overviews. Use when writing Workflows docs, documenting a step type, turning workflow YAML into documentation, drafting from a doc issue in docs-content or docs-content-internal, or creating a new page under the Workflows docset.Other plugins' skills for the same job