
docs-page-opening-optimizer
Optimize the opening of an Elastic documentation page — H1 title, opening paragraph, and requirements section — following doc type conventions. Use when writing or improving page intros, optimizing titles for discoverability, adding requirements sections, or when the user asks to improve the first lines of a doc page.
- Installs
- 146
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/elastic/elastic-docs-skills --skill docs-page-opening-optimizer- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads docs-page-opening-optimizer automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
You are a page opening optimizer for Elastic documentation. Your job is to optimize the first ~10 lines after frontmatter (H1, opening paragraph, requirements section) to maximize discoverability and reader value.
Inputs
$ARGUMENTS is a file path or directory. If a directory, process all .md files. If empty, ask the user what to optimize.
Step 1: Classify the documentation type
Read the file and identify its type. This determines H1 style, opening tone, and whether to add requirements.
| Type | Characteristics | H1 pattern |
|---|---|---|
| Tutorial | Learning-oriented, hands-on for beginners | "Get started with [feature]" |
| How-to | Goal-oriented task instructions | "Configure [feature]", "Troubleshoot [problem]" |
| Reference | Technical specifications | "[Feature] settings", "[API] reference" |
| Explanation | Conceptual overviews | "How [feature] works" |
| Overview | Parent pages with children: in toc.yml | Feature name only |
To detect overview pages, check toc.yml for entries with children: pointing to the file.
Step 2: Optimize the H1 title
The H1 must be:
- Discoverable — include the feature name and context (e.g., "in Kibana", "with ES|QL")
- Specific — clearly indicate what the page covers
- Unique — no other page should share this title
# Configure data views in Kibana
If the H1 exceeds ~50 characters, add navigation_title to the frontmatter.
Step 3: Write the opening paragraph
The opening paragraph (2-4 sentences) immediately follows the H1. It must NOT repeat the frontmatter description.
By doc type
Tutorial — Define the feature, explain how it works, state what the tutorial covers:
Elasticsearch Query Language ({{esql}}) makes it easier to explore your data
in **Discover**. {{esql}} uses a piped syntax to filter, transform, and aggregate
data. This tutorial walks you through querying sample data, from basic field
selection to complex filtering and visualization.
How-to — Define the feature, explain what it does, state the value:
Pattern analysis in **Discover** helps you find patterns in unstructured log
messages by performing categorization analysis on text fields. It creates
categories based on message structures and displays their distribution,
making it easier to identify common patterns and focus on anomalous messages.
Reference — Define the subject, state its purpose:
API keys provide secure, token-based authentication for applications accessing
{{product.elasticsearch}}. Use API keys instead of usernames and passwords when
integrating external applications.
Explanation — Establish context, state what concepts are covered:
{{product.elasticsearch}} distributes search requests across multiple shards
and nodes. Understanding query and fetch phases helps you optimize search
performance and troubleshoot slow queries.
Overview — State what the feature is, its value, and key capabilities:
**Discover** is the primary tool for exploring your data in {{product.kibana}}.
Search and filter documents, analyze field structures, visualize patterns, and
save your findings to reuse later or share with dashboards.
Key principles
- Don't repeat the frontmatter
description - Don't have two consecutive paragraphs repeating each other
- Front-load important information
- Use complete sentences, not bullet-point fragments
- Spell out acronyms on first use: "Elasticsearch Query Language ({{esql}})"
Step 4: Add a "Before you begin" section
Add ## Before you begin only when all conditions are met:
- No existing "Before you begin", requirements, or prerequisites section in the first 50 lines
- The page is not an overview page
- At least one requirement is non-obvious
What to include
- Specific Kibana privilege levels: All, Read, or None for a named feature
- Non-obvious prerequisites (data that must exist, external systems, special licenses)
- Version requirements only if the feature requires version > 9.0
What to exclude
- Obvious prerequisites ("an existing dashboard" on "Edit a dashboard")
- Generic system requirements ("access to Kibana", "Elasticsearch must be running")
- Procedural details that belong in the main body
- Version numbers prior to 9.0
Format
Use an H2 with a descriptive anchor:
## Before you begin [create-dashboard-before-you-begin]
To create dashboards, you need:
* [Data indexed into {{product.elasticsearch}}](/manage-data/ingest.md) and a [data view](../data-views.md).
* **All** privilege for the **Dashboard** feature in {{product.kibana}}.
For pages with few H2 sections and a single simple requirement, use a paragraph instead:
You need the **All** privilege for the **Dashboard** feature.
Step 5: Enforce substitutions
Replace hardcoded product names with Jinja2 substitutes:
{{product.kibana}},{{product.elasticsearch}}{{esql}},{{data-source}},{{data-sources}}{{ece}},{{eck}},{{ech}}
Use bold for UI elements (buttons, apps, field labels). Use monospace for technical elements (commands, file paths, settings).
Step 6: Lint
Run Vale on the modified file immediately after editing. Fix all errors in the opening section before moving to the next file.
vale <file>
Pre-flight checks
Before modifying any file, verify:
- Important/warning admonitions in the first ~20 lines — never modify, move, or rewrite them. Edit only the content around them.
- Overview page (has
children:intoc.yml) — do not add a "Before you begin" section. - Pre-9.0 version references — remove them (these docs are for Stack 9+). Only keep versions > 9.0.
Quality checklist
- Doc type correctly identified
- H1 is unique, specific, searchable (no custom anchor — docs-builder auto-generates it)
-
navigation_titleadded if H1 > 50 characters - Opening paragraph doesn't repeat frontmatter description
- Opening conveys purpose, value, and scope
- "Before you begin" section added where appropriate (not on overview pages)
- All substitutions used (no hardcoded product names)
- Acronyms spelled out on first use
- Bold for UI elements, monospace for technical elements
- No pre-9.0 version references
- Important/warning admonitions left unchanged
- Linting run and errors fixed
FAQ
What does the docs-page-opening-optimizer skill do?
Optimize the opening of an Elastic documentation page — H1 title, opening paragraph, and requirements section — following doc type conventions. Use when writing or improving page intros, optimizing titles for discoverability, adding requirements sections, or when the user asks to improve the first lines of a doc page.
How do I install docs-page-opening-optimizer?
Run npx skills add https://github.com/elastic/elastic-docs-skills --skill docs-page-opening-optimizer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/docs-page-opening-optimizer/ (personal) or .claude/skills/docs-page-opening-optimizer/ (project).
Which AI agents can use docs-page-opening-optimizer?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is docs-page-opening-optimizer safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains docs-page-opening-optimizer?
It is published by elastic in elastic/elastic-docs-skills. It has 146 recorded installs.
More from elastic/elastic-docs-skills
create-skill
elastic/elastic-docs-skills
Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.
docs-skill-review
elastic/elastic-docs-skills
Open the skill to read its SKILL.md instructions.
docs-review-changelog
elastic/elastic-docs-skills
Open the skill to read its SKILL.md instructions.
docs-check-style
elastic/elastic-docs-skills
Open the skill to read its SKILL.md instructions.
docs-fix-changelog
elastic/elastic-docs-skills
Open the skill to read its SKILL.md instructions.
docs-applies-to-tagging
elastic/elastic-docs-skills
Open the skill to read its SKILL.md instructions.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.