/elastic-docs-skills:docs-syntax-help <question-or-directive>from elastic-docs-skills
Guides writing MyST Markdown with Elastic extensions: directive syntax, nesting, admonitions, and troubleshooting build errors.
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 Elastic Docs syntax expert. Your job is to help users write correct MyST Markdown with Elastic-specific extensions, troubleshoot syntax errors, and fix malformed directives.
Directives use colon-fenced blocks with the directive name in curly braces:
:::{directive-name} [argument]
:option: value
Content here
:::
{}:option: value)Outer directives need MORE colons than inner ones. Add one colon per nesting level:
::::{tab-set}
:::{tab-item} First
Content
:::
:::{tab-item} Second
Content
:::
::::
Three levels deep:
::::::{stepper}
:::::{step} Title
::::{tab-set}
:::{tab-item} Option A
Content
:::
::::
:::::
::::::
Code blocks use backtick fences (not colons) to prevent Markdown processing:
:::{note}
```yaml
key: value
```
:::
Four standard types plus custom:
:::{note}
Supplemental information. No serious repercussions if ignored.
:::
:::{tip}
Advice to help users work more efficiently.
:::
:::{important}
Ignoring this could impact performance or stability.
:::
:::{warning}
Users could permanently lose data or leak sensitive information.
:::
:::{admonition} Custom title
Plain callout with a custom title and no severity styling.
:::
Rules: Do not stack admonitions. Do not place code blocks inside admonitions (use dropdowns or tabs instead if code is long).
# Page title (h1 — exactly one per page, must be first)
## Section (h2)
### Subsection (h3)
#### Sub-subsection (h4)
Custom anchors: #### My heading [custom-anchor-id]
Default anchors auto-generate as lowercase, hyphenated, alphanumeric (diacritics removed).
In-repo page links: Default to auto-generated link text ([](page.md)). The published label is the target page title.
[](../path/to/page.md)
[](/absolute/path/to/page.md)
Custom link text is allowed when it contextualizes the link. Do not write custom text that restates the page title.
You might want to set up [rules](create-manage-rules.md).
Anti-pattern: [Create and manage {{kib}} alerting rules](create-manage-rules.md) when that string is the page title. Write [](create-manage-rules.md) instead.
Anchors: Do not use auto-generated link text. Write explicit link text for in-repo section links and same-page jumps.
[Link text](/absolute/path/to/page.md#anchor)
[Jump](#section-anchor)
Cross-repository: [Text](kibana://path/to/page.md) — link text is mandatory; omitting it causes the link to fail.
External: [Text](https://example.com) — automatic URL linking (bare URLs rendering as clickable links) is not supported. Always wrap URLs in standard Markdown link syntax with explicit link text, even for external links.
Reference-style:
[link text][ref-id]
[ref-id]: https://example.com
```yaml
key: value
```
Add <N> markers at line ends, followed by a matching numbered list:
```yaml
host: "0.0.0.0" <1>
port: 9200 <2>
```
1. Bind address
2. Port number
The list item count must match the callout count exactly.
Comments on code lines become callouts automatically:
```csharp
var key = new ApiKey("<KEY>"); // Set up the API key
```
Disable callout processing: ````callouts=false`
Rule: Do not mix explicit and automatic callouts in the same code block — use only one type per block.
Use console as the language. First line renders as a dev console command; rest as JSON. A single console block can contain multiple API calls (e.g., a GET followed by a POST); each is displayed as a separate section with its own dev console link.
Enable with subs=true:
```bash subs=true
wget elasticsearch-{{version}}-linux.tar.gz
```
::::{tab-set}
:::{tab-item} Label 1
Content for tab 1
:::
:::{tab-item} Label 2
Content for tab 2
:::
::::
::::{tab-set}
:group: languages
:::{tab-item} Java
:sync: java
Java content
:::
:::{tab-item} Python
:sync: python
Python content
:::
::::
Tabs with matching group and sync values synchronize selection across tab sets on the same page.
Rules: Do not nest tabs. Do not split procedures across tabs. Do not use more than 6 tabs. Do not use tabs in dropdowns.
Creates tabbed content where each tab displays an applies_to badge instead of a text title. Use when content varies by deployment type or version. All applies switches on a page automatically sync together.
::::{applies-switch}
:::{applies-item} stack: ga 9.0+
Content for Stack
:::
:::{applies-item} serverless: ga
Content for Serverless
:::
::::
Use YAML object notation with curly braces {} to specify multiple applies_to definitions in a single applies-item:
::::{applies-switch}
:::{applies-item} { ece: ga 4.0+, ech: ga }
Content for ECE and ECH
:::
:::{applies-item} serverless: ga
Content for Serverless
:::
::::
Automatic syncing: When a user selects an applies_to definition in one switch, all other applies-switch instances on the same page update to the same selection. The format of the definition doesn't matter for sync matching — stack: ga 9.1+, { "stack": "ga 9.1+" }, and { stack: "ga 9.1+" } all identify the same content.
When to use: Use applies-switch instead of generic tab-set when content differs by deployment type or version and you want to show applies_to badges as tab titles.
Sequential steps for tutorials:
:::::{stepper}
::::{step} Step title
Step content here.
::::
::::{step} Another step
:anchor: custom-id
More content.
::::
:::::
Steps auto-generate anchors and appear in the page ToC. Use :anchor: to override. Steps nested inside other directives (tabs, dropdowns) are excluded from the ToC.
:::{dropdown} Title
Collapsed content.
:::
:::{dropdown} Open by default
:open:
Expanded content.
:::
Inline: 
Directive (with options):
:::{image} /path/to/image.png
:alt: Description
:width: 400px
:::
Screenshot (adds border): :screenshot: option.
Sizing (inline):  or 
Carousel:
::::{carousel}
:id: my-carousel
:max-height: small
:::{image} img1.png
:alt: First
:::
:::{image} img2.png
:alt: Second
:::
::::
Constraint: Images must live within the folder containing the toc.yml or docset.yml that references the page.
| Header 1 | Header 2 |
| -------- | -------- |
| Cell | Cell |
Headerless table (empty first header row). Tables are responsive by default (horizontal scroll). Block-level elements cannot be placed inside table cells.
Unordered: -, *, or +. Ordered: 1., 2., etc.
Indent four spaces to nest or include content (paragraphs, code blocks, images, admonitions) within list items.
Term
: Definition text indented with colon + three spaces.
Second paragraph of the definition (indented to match).
Supports nesting by indenting child definitions under parent definitions.
:::{button}
[Button text](/path)
:::
:::{button}
:type: secondary
:align: center
[Secondary](/path)
:::
Group buttons:
::::{button-group}
:::{button}
[Primary](/path1)
:::
:::{button}
:type: secondary
[Secondary](/path2)
:::
::::
Reference: text[^fn-id]. Definition: [^fn-id]: Footnote content.
Named identifiers recommended ([^my-note]). Footnotes auto-number in order of first reference and render at page bottom. Definitions must be at document level (not inside directives).
Syntax: {icon}`icon-name`
Works in headings, lists, tables, and inline. Over 500 icons available (e.g., check, cross, gear, user, logo_elastic).
Syntax: {kbd}`key`
Combinations: {kbd}`cmd+shift+p`
Platform alternatives: {kbd}`ctrl|cmd+c`
Special keys: shift, ctrl, alt, option, cmd, win, enter, esc, tab, space, f1–f12, plus, pipe.
| Syntax | Result |
|---|---|
**bold** | Bold |
_italic_ | Italic |
`code` | Monospace |
~~strike~~ | Strikethrough |
H~2~O | Subscript |
4^th^ | Superscript |
Single-line: % This is a comment (space after % required).
Multi-line: <!-- ... -->. Content after --> on the same line is not rendered.
Defined in docset.yml under sub::
sub:
product-name: Elasticsearch
Usage: {{product-name}}
Operators (pipe-separated): {{var | lc}}, {{var | uc}}, {{var | tc}}, {{var | c}}, {{var | kc}}, {{var | sc}}, {{var | cc}}, {{var | pc}}, {{var | trim}}
Version operators: {{version.stack | M}} (major only), {{version.stack | M.x}} (major.x), {{version.stack | M.M}} (major.minor), {{version.stack | M+1}} (next major), {{version.stack | M.M+1}} (next minor)
In code blocks: Use subs=true flag. Inline code: Use {subs=true}`text {{var}}` role.
Product substitutions: Defined in products.yml by key (for example apm-agent-dotnet: { display: 'APM .NET Agent' }). Use {{product.id}} to render a product's display name, or the shorthand {{.id}} (equivalent to {{product.id}}).
Syntax: {{version.<scheme>}} (e.g., {{version.stack}} → 9.3.0)
Base version: {{version.stack.base}} → first version on V3 docs.
Schemes: stack, ece, eck, ess, esf, ecctl, curator, plus APM agents and EDOT variants.
Included files must live in a _snippets folder:
:::{include} _snippets/reusable-content.md
:::
Link to anchors in included content using the parent page path:
[Link text](parent-file.md#anchor-from-snippet)
:::{csv-include} _snippets/data.csv
:caption: Table caption
:separator: ;
:::
Limits: 25,000 rows, 15 columns, 10 MB. Cells support inline Markdown.
```mermaid
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Done]
```
All Mermaid diagram types supported. Rendered client-side.
:::{math}
:label: equation-id
E = mc^2
:::
Supports LaTeX syntax via KaTeX. Supports \begin{align}, fractions, integrals, matrices, etc.
:::{changelog}
:::
Options: :type: (filter by classification), :subsections: (group by area), :config: path, :product: id.
:::{settings} /path/to/settings.yml
:::
Renders structured settings documentation from YAML source files.
- gh: username
name: Display Name
title: Role
location: City
image: ./custom-avatar.png
New lines create paragraphs. Use <br> for inline breaks within a paragraph. Only <br> is supported (not </br>).
{attribution="Source name"}
> Quoted text here.
Use * * * for horizontal rules.
| Mistake | Fix |
|---|---|
| Mismatched colon count on nested directives | Outer directive needs more colons than inner |
| Code block inside admonition uses colons | Use backtick fences for code blocks inside directives |
Missing space after % in comments | Always write % comment with a space |
| Nesting tabs inside tabs | Not supported — flatten them |
| Lists indented 2 spaces | Indent 4 spaces for nesting and content under list items |
| Images outside toc.yml/docset.yml folder | Move images inside the folder tree |
| Footnote definitions inside directives | Move to document level |
subs=true on regular inline code | Use {subs=true}`code` role syntax |
| Mixing explicit and automatic callouts in a code block | Use only one callout type per block |
| Explicit callout count mismatch | Number of <N> markers must equal the list item count |
| Bare URL expected to auto-link | Not supported — always wrap URLs in [Text](url) syntax |
[](page.md) for in-repo links to whole pages. Custom link text is allowed only when it contextualizes the link. Do not restate the page title as link text. Use explicit link text for anchors, cross-repository links, and external links.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
elastic-docs, myst-markdown, documentation-syntax, directives
25 skills in this plugin
/docs-applies-to-taggingValidate and generate applies_to tags in Elastic documentation, including for cumulative docs across versions and deployment types. Use when writing new docs pages, reviewing existing pages for correct applies_to usage, deciding whether to preserve or replace existing version-scoped content, or when content changes lifecycle state (experimental, preview, beta, GA, deprecated, removed)./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-oasnpx claudepluginhub elastic/elastic-docs-skills --plugin elastic-docs-skillsOther plugins' skills for the same job