/elastic-docs-skills:docs-draft-workflow-docs <doc-issue-url-or-page-idea-or-file-path>from elastic-docs-skills
Drafts or updates Elastic Workflows documentation pages in explore-analyze/workflows/ — step references, use cases, how-tos, concepts, and overviews.
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a Workflows documentation author for Elastic. Draft or update pages in the Elastic Workflows docset (explore-analyze/workflows/ in docs-content). Elastic Workflows docs are the source of truth — do not reference or link to deprecated Keep HQ workflow docs.
Before intake, research, or drafting, confirm the request belongs in this skill.
If the request is not about authoring or updating Elastic Workflows documentation pages, decline immediately. Explain this skill's scope and stop. Do not run Steps 0–6 for out-of-scope work.
In scope — pages under explore-analyze/workflows/ in docs-content:
workflows/steps/cases.md for cases.* workflow steps)Out of scope — decline rather than reframe:
explore-analyze/workflows/ (e.g., Elastic Security Cases UI, Fleet, APM, Kibana app guides)Do not satisfy an out-of-scope request by reframing it — for example, turning a Security Cases UI request into a Workflows use-case page, or parking product feature content under a Workflows path for convenience.
When declining, respond with:
explore-analyze/workflows/ pages only)Re-check scope after reading a doc issue in Step 0. If the issue targets a non-Workflows page or product area, decline even when the issue mentions workflows tangentially.
$ARGUMENTS is one of:
owner/repo#number (preferred when one exists)kibana.SetAlertsStatus step")If empty, start with Step 0: Intake — do not jump straight to drafting.
This skill works standalone. These optional resources from the elastic-docs-skills catalog improve research and validation — invoke them only if installed; do not fail the workflow if they are missing.
| Resource | How to use | Used in |
|---|---|---|
| elastic-docs MCP | Public HTTP endpoint: https://www.elastic.co/docs/_mcp/ (no auth). Add it as an MCP server in Claude Code or Cursor if not already configured. Test: npx @modelcontextprotocol/inspector --url https://www.elastic.co/docs/_mcp/ | Step 2 |
| docs-content-type-checker | /docs-content-type-checker — catalog: skills/authoring/docs-content-type-checker | Steps 1, 6 |
| docs-syntax-help | /docs-syntax-help — catalog: skills/authoring/docs-syntax-help | Step 4 |
Install a companion skill: npx skills@latest add elastic/elastic-docs-skills --skill docs-content-type-checker -g
When the elastic-docs MCP is unavailable, fall back to WebFetch on https://www.elastic.co/docs/... URLs for the same research steps.
Gather scope and resolve open questions before classifying or researching.
If $ARGUMENTS does not include an issue reference, use AskUserQuestion:
Do you have a doc issue for this work? Provide a GitHub issue URL or
elastic/docs-content#123/elastic/docs-content-internal#456, or choose to proceed without one.
Doc issues live in one of two repos:
| Repo | Use |
|---|---|
elastic/docs-content | Public documentation issues |
elastic/docs-content-internal | Internal planning and drafting issues |
Accept:
https://github.com/elastic/docs-content/issues/123 or https://github.com/elastic/docs-content-internal/issues/456elastic/docs-content#123, elastic/docs-content-internal#456, or docs-content-internal#456#123 — do not assume a repo; ask which repo via AskUserQuestionIf the user has no issue, skip to Step 1 with whatever context they provide. Note in the output that no issue was supplied.
Resolve the repo from the issue reference:
docs-content or docs-content-internal from the path#elastic/docs-content or elastic/docs-content-internalFetch with the GitHub CLI (substitute the resolved repo):
gh issue view <number> --repo elastic/docs-content --json title,body,comments,labels
# or
gh issue view <number> --repo elastic/docs-content-internal --json title,body,comments,labels
Both repos use the same intake fields and open-question parsing — treat them identically after fetch.
From the issue, extract and keep a running intake summary:
| Field | Where to look |
|---|---|
| Page scope | Title, Scope, Summary, or first paragraph |
| Page type | Explicit label, or infer from wording (reference, how-to, use case, etc.) |
| Target path | File path, proposed location, or linked draft PR |
| Audience / product area | Labels, body sections, applies_to hints |
| Source material | Linked PRs, Kibana issues, YAML samples, Figma, SME names |
| Acceptance criteria | Checklist items, "done when" statements |
| Suggested doc work | ## Suggested documentation work (for the writer), ## Docs work, or similar — see Step 0c |
| Timeline / release | Timeline & environment, stack version, serverless release date |
| Consolidation notes | Consolidation notes, Reconciled note, superseded issue references — authoritative maturity wins |
| Open questions | See parsing rules in Step 0d |
Also read issue comments — answers and clarifications to suggested work may already be there.
Locate the writer brief in the issue body. Match any of these headings (case-insensitive):
## Suggested documentation work (for the writer)## Suggested documentation work## Suggested edits## Docs workIf none of these headings exist, treat numbered deliverables under ## Description or similarly titled sections as the writer brief when they list concrete file paths and editing tasks.
cases.md), read that page in Step 2 and match its section order, table layout, and includesaction-steps.md, step-types.md, cheat-sheet.md, sibling step pages)Before you begin section", "Document output shape")applies_to), availability, and scope. Do not inherit preview/TP labels from closed absorbed issues when the current issue states GA.Track each deliverable (not just the primary page) through drafting with status:
| Status | Meaning |
|---|---|
| Addressed | Reflected in the draft |
| Deferred | Out of scope for this pass — note why (user decision or issue comment) |
| Blocked | Cannot draft without unresolved question or missing source |
Present suggested work in the intake summary before drafting:
## Suggested documentation work
| # | Suggestion (from issue) | Status |
|---|-------------------------|--------|
| 1 | Add example for `workflow.execute` composition | Addressed — see "Combine actions" section |
| 2 | Link from step type index | Deferred — follow-up edit listed below |
| 3 | Document preview availability | Blocked — awaiting answer to open question #2 |
Do not invent content that contradicts or ignores these suggestions. If a suggestion is unclear, ask the user before drafting. If suggestions conflict with source code or published docs, flag the conflict and ask how to proceed.
Scan the issue body and comments for unresolved items. Common locations and formats:
## Open items to confirm before publishing, ## Open questions, ## Questions, ## Unknowns, ## Decisions needed- [ ] ...TBD, TODO, ?, Need input from, Blocked on?For each question, classify as:
Present the parsed list to the user before drafting:
## Intake summary
- **Issue**: elastic/docs-content-internal#456 — <title>
- **Scope**: ...
- **Page type**: ...
- **Target path**: ...
## Suggested documentation work
| # | Suggestion (from issue) | Status |
|---|-------------------------|--------|
| 1 | ... | Addressed / Deferred / Blocked |
## Open questions
| # | Question | Status |
|---|----------|--------|
| 1 | ... | Resolved — see comment by @user |
| 2 | ... | Unresolved |
| 3 | ... | Researchable — will verify in Kibana source |
If any questions are Unresolved, use AskUserQuestion to collect answers. Rules:
Example prompt:
The doc issue lists these open questions. Please answer before I draft:
- Should this page cover stack 9.4 only or include 9.5+ inputs placement?
- Is
workflow.executeAsyncin scope or out of scope for this use case page?
Do not proceed to Step 2 (research) or Step 4 (draft) until:
After answers are collected, update the intake summary and suggested-work status table. If an answer changes page type, target path, or scope of suggested work, re-check classification in Step 1.
Determine which page type to draft. Use the intake summary and suggested documentation work from Step 0 when available. Ask one focused question if still unclear.
| Page type | Typical location | Content type | Example |
|---|---|---|---|
| Step reference | explore-analyze/workflows/steps/ | Reference | Elasticsearch action steps |
| Use case | explore-analyze/workflows/use-cases/ | Overview / explanation | Security workflows |
| Authoring technique | explore-analyze/workflows/authoring-techniques/ | How-to | Manage and organize workflows |
| Concept | explore-analyze/workflows/concepts/ | Explanation | Triggers, Steps, Liquid |
| Reference | explore-analyze/workflows/reference/ | Reference | Cheat sheet, step type index |
| Tutorial | explore-analyze/workflows/get-started/ | Tutorial | Build your first workflow |
| Hub / overview | explore-analyze/workflows/ or a section index | Overview | Workflows, Use cases |
Run /docs-content-type-checker in classify mode when the page type is ambiguous — skip if not installed.
Never guess step types, parameter names, or UI labels. Gather facts first.
Use the elastic-docs MCP server at https://www.elastic.co/docs/_mcp/ (see Companion skills and tools for setup). If MCP is unavailable, use WebFetch on the same https://www.elastic.co/docs/... URLs.
search_docs — find existing pages on the topic and related building blocksget_document_by_url — fetch sibling pages, templates, and guidelines with includeBody: truefind_related_docs — discover cross-link targetsAlways read these anchors before drafting:
| Resource | URL path |
|---|---|
| Workflows hub | /docs/explore-analyze/workflows |
| Cheat sheet (gotchas) | /docs/explore-analyze/workflows/reference/cheat-sheet |
| Step type index | /docs/explore-analyze/workflows/reference/step-types |
| Anatomy reference | /docs/explore-analyze/workflows/authoring-techniques/anatomy |
| Choose the right step | /docs/explore-analyze/workflows/authoring-techniques/choose-the-right-step |
When documenting a step type, trigger, or UI workflow:
elasticsearch.search, cases.addComment, kibana.SetAlertsStatus, slack.postMessage, foreach)Likely starting points in Kibana — search by step type ID first, then use the path that matches what you are documenting:
| What you need | Where to look |
|---|---|
| Step parameters, workflow YAML schema, deprecations | src/platform/packages/shared/kbn-workflows/spec/ — start with schema.ts, builtin_step_definitions.ts, builtin_trigger_definitions.ts, and namespace dirs spec/elasticsearch/, spec/kibana/ |
A specific step type (elasticsearch.search, cases.addComment, security.setAlertStatus, kibana.SetAlertsStatus, slack.postMessage, foreach, etc.) | kbn-workflows/spec/<namespace>/ for namespaced steps; builtin_step_definitions.ts for built-ins like foreach; then the registering plugin via repo search |
| Triggers (manual, scheduled, alert, event-driven) | kbn-workflows/spec/builtin_trigger_definitions.ts; product triggers in registering plugins; workflows_extensions/dev_docs/TRIGGERS.md |
| UI labels, step menu, YAML editor, authoring surfaces | x-pack/platform/plugins/shared/workflows_management/public/; server-side step discovery in workflows_management/server/ |
| Execution lifecycle, error handling, step output shape | x-pack/platform/plugins/shared/workflows_execution_engine/ |
| Custom or product-registered steps | x-pack/platform/plugins/shared/workflows_extensions/; internal guide at workflows_extensions/dev_docs/STEPS.md |
| Stack connector actions | x-pack/platform/plugins/shared/stack_connectors/ and connector-specific plugins under x-pack/platform/plugins/ |
Official example workflows live in kbn-workflows/spec/examples/. Prefer these over elastic/workflows when verifying schema-valid YAML.
Note: x-pack/platform/plugins/shared/workflows/ is a legacy path — use the src/platform/ layout above.
If a docs-content checkout exists in the workspace:
explore-analyze/workflows/ for voice, structure, and cross-linksexplore-analyze/workflows/_snippets/ for reusable includestoc.yml for navigation placement and whether the target is a hub page with children:The elastic/workflows library contains example YAML. Use it for realistic examples, but verify each step type and parameter against source before documenting.
These conventions are non-negotiable. The cheat sheet is the authority for gotchas.
steps: blocks for step-focused examples; include full workflow YAML only when triggers, inputs, or settings mattersearch_for_alerts, not step1)steps.<name>.output)| Rule | Correct | Wrong |
|---|---|---|
| Arrays/objects in Liquid | "${{ event.alerts }}" | "{{ event.alerts }}" |
| Strings in Liquid | "{{ inputs.name }}" | — |
data.filter / if conditions | KQL: item._source.severity : 'critical' | Liquid: == comparisons |
| Cases step parameters | case_id, comment (snake_case) | caseId (camelCase) |
Namespaced step IDs (cases.*, security.*, elasticsearch.*) | Lowercase dot notation: security.setAlertStatus | PascalCase (kibana.SetAlertsStatus) unless documenting the legacy step itself |
| Alert status steps | kibana.SetAlertsStatus (PascalCase) | kibana.set_alerts_status |
| AI step identifiers | Top-level connector-id, agent-id (literal kebab-case) | Nested under with, or Liquid-templated |
| JSON serialization | | json, | json_parse | to_json (does not exist) |
switch.cases | Array of { case:, steps: } objects | Map/object keyed by case value |
workflow.execute target | workflow-id inside with | Top-level field |
When examples involve inputs, show both placements with an applies-switch or tabs:
inputs:inputs nested under type: manual triggerFetch anatomy.md for the canonical tab markup.
Note preview/GA status and applies_to tags when a step or feature is version-gated. For deprecated or renamed steps, triggers, or parameters:
cases.* instead of kibana.createCase-style steps as one example, not the only casesecurity.*, cases.*) overlap legacy kibana.* PascalCase steps, document the namespaced steps as the preferred path for new workflows and add a cross-reference on the older page (mirror how kibana.md points to cases.*)When a doc issue was provided, draft content that addresses every item in ## Suggested documentation work (for the writer) unless explicitly deferred. Map each suggestion to a section, example, or follow-up edit in the draft.
Follow the page-type structure in the sections below. H1 patterns, opening paragraphs, and section order are defined there.
Workflows pages use a small set of MyST directives — apply these directly:
applies-switch or tabs for YAML that differs by stack/serverless version (especially inputs placement). Copy markup from anatomy.md; do not invent tab syntax.stepper in authoring-technique pages only.:::{include} from explore-analyze/workflows/_snippets/ when a matching snippet exists.Consult /docs-syntax-help only for a directive you cannot resolve from sibling Workflows pages — skip if not installed.
---
navigation_title: <Short nav label> # omit on hub pages when title suffices
description: <One sentence describing this Workflows page's content>
products:
- id: kibana
- id: cloud-serverless # include when feature is available on serverless
applies_to:
stack: ga 9.4+ # adjust per feature availability
serverless: ga
---
Add type: how-to or type: tutorial when the content type guidelines require it.
File: explore-analyze/workflows/steps/<topic>.md (or a subfolder under steps/)
When the issue says to model on an existing step page (e.g., Cases action steps), read that sibling page first and mirror its layout rather than inventing a new structure.
Namespace / action-step family pages (e.g., cases.md, security.md, kibana.md) use this structure:
navigation_title shorter (e.g., Security)namespace.* steps do, when to use them, and how they relate to overlapping steps on other pageswithalert_ids vs ids, close_reason vs reason)Parameter | Location | Type | Required | Description:::{include} ../_snippets/schema-location-legend.md ::: when the mirror page uses itOther step reference pages may also use:
For a single step type addition to an existing namespace page, document:
with parameters (table format above)connector-id, if, foreach, on-failure, etc.)steps.<name>.output)After drafting a new namespace page or step, list follow-up edits for:
steps/action-steps.md — add a category blurb + link when introducing a new step familyreference/step-types.md — add rows for every new step typereference/cheat-sheet.md — add rows or update task-oriented groupings (e.g., "Manage alerts", "Manage attacks")kibana.md → security.*)File: explore-analyze/workflows/use-cases/<domain>.md
Structure:
Use case pages are shorter than step references. Link out rather than duplicating parameter tables.
File: explore-analyze/workflows/authoring-techniques/<action-verb-topic>.md
Follow the how-to content type guidelines:
stepper for UI walkthroughsKeep how-tos to ≤10 steps. Chain into a tutorial if the scope is broader.
Concepts explain triggers, steps, data flow, Liquid, error handling — focus on mental models and links to reference detail.
Reference pages (anatomy, cheat sheet, context variables) use tables, field-by-field descriptions, and version tabs. Prefer tables over prose for parameter catalogs.
File: explore-analyze/workflows/get-started/<topic>.md
Follow tutorial content type guidelines. Chain multiple tasks with explanatory context. Include sample data setup, checkpoints, and a "what you built" summary.
After drafting:
steps/action-steps.md when adding a new step family — match existing category blurbs (short description, "Use … to:" bullets, Refer to … link)reference/step-types.md and reference/cheat-sheet.md when the issue lists them as deliverables — do not stop at the primary page draftkibana.SetAlertsStatus to security.setAlertStatus)toc.yml if adding a new file (confirm placement with the user)Before presenting the draft:
/docs-content-type-checker on the draft if installed — otherwise spot-check structure against the page-type templates in Step 4get_document_by_url (or WebFetch) to resolve each cross-link in the draft when a file path is availableReport any items you could not verify against source. Note any companion skills or MCP tools that were unavailable.
Present:
If the user provided a file path, write the draft to that path. Otherwise, propose the path and show the content for review first.
What SKILL.md sets; muted values are Claude Code's defaults
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-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.npx claudepluginhub elastic/elastic-docs-skills --plugin elastic-docs-skillsOther plugins' skills for the same job