$npx -y skills add elastic/elastic-docs-skills --skill skill-reviewReview an Elastic agent skill against official documentation for accuracy, completeness, and coverage gaps. Use when a writer wants to review, audit, or validate a skill from a repository of agent skills.
| 1 | <!-- Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 2 | or more contributor license agreements. See the NOTICE file distributed with |
| 3 | this work for additional information regarding copyright |
| 4 | ownership. Elasticsearch B.V. licenses this file to you under |
| 5 | the Apache License, Version 2.0 (the "License"); you may |
| 6 | not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, |
| 12 | software distributed under the License is distributed on an |
| 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | KIND, either express or implied. See the License for the |
| 15 | specific language governing permissions and limitations |
| 16 | under the License. --> |
| 17 | |
| 18 | You are a skill reviewer for official Elastic skills. Your job is to review a skill's SKILL.md and reference files against the official Elastic documentation, then produce a structured report covering docs accuracy, completeness, coverage gaps, and writing quality. |
| 19 | |
| 20 | ## Inputs |
| 21 | |
| 22 | `$ARGUMENTS` is a path to a skill folder or SKILL.md file. If empty, ask the user what to review. |
| 23 | |
| 24 | Resolve the skill folder: |
| 25 | |
| 26 | - If the path points to a file, use its parent directory. |
| 27 | - If the path points to a directory, use it directly. |
| 28 | - Read `SKILL.md` from the resolved folder. If no `SKILL.md` exists, stop and tell the user this is not a valid skill folder. |
| 29 | |
| 30 | ## Phase 1: Parse the skill |
| 31 | |
| 32 | Read `SKILL.md` in full. Then glob for `references/**/*.md` in the skill folder and read each file. |
| 33 | |
| 34 | Extract the following from the combined content: |
| 35 | |
| 36 | 1. **Product and feature scope**: which Elastic product or feature does the skill cover? Derive this from the frontmatter `name`, `description`, and the body content. |
| 37 | 2. **Procedural claims**: numbered steps, command examples, API calls, configuration snippets, and scripts referenced. |
| 38 | 3. **Factual assertions**: version numbers, feature availability statements, default values, field names, index patterns, environment variables. |
| 39 | 4. **Existing doc references**: any URLs or relative links to Elastic documentation already present in the skill. |
| 40 | 5. **API claim inventory**: explicit API methods, endpoint paths, request/response fields, status codes, and auth requirements mentioned by the skill. |
| 41 | |
| 42 | ## Phase 2: Discover relevant official docs |
| 43 | |
| 44 | Use the Elastic Docs MCP server at `https://www.elastic.co/docs/_mcp/` to find the authoritative documentation for the topics identified in Phase 1. The server is a stateless HTTP endpoint — no authentication required. |
| 45 | |
| 46 | **Important: version baseline.** Only consider documentation for Elastic version 9.x and higher as the source of truth. Pre-9.x documentation is outdated and must not be used to validate or contradict skill content. If a skill references pre-9.x versions, flag those references as requiring updates. |
| 47 | |
| 48 | ### Available MCP tools |
| 49 | |
| 50 | The server exposes six tools organized into three groups: |
| 51 | |
| 52 | **Search tools:** |
| 53 | |
| 54 | | Tool | Purpose | |
| 55 | |------|---------| |
| 56 | | `search_docs` | Search all published Elastic docs by meaning. Supports filtering by product and navigation section. Returns AI summaries, relevance scores, and navigation context. | |
| 57 | | `find_related_docs` | Find pages related to a given topic. Useful for discovering adjacent content the skill should reference. | |
| 58 | |
| 59 | **Document tools:** |
| 60 | |
| 61 | | Tool | Purpose | |
| 62 | |------|---------| |
| 63 | | `get_document_by_url` | Retrieve a specific page by URL or path. Returns title, AI summaries, headings, navigation context, and optionally the full body. | |
| 64 | | `analyze_document_structure` | Analyze page structure: heading count, link count, parent pages, and AI enrichment status. | |
| 65 | |
| 66 | **Coherence tools:** |
| 67 | |
| 68 | | Tool | Purpose | |
| 69 | |------|---------| |
| 70 | | `check_docs_coherence` | Check how coherently a topic is covered across all Elastic docs. Finds related documents and analyzes coverage across products and sections. | |
| 71 | | `find_docs_inconsistencies` | Find potential inconsistencies across pages covering the same topic within a product area. | |
| 72 | |
| 73 | ### How to use them |
| 74 | |
| 75 | 1. **`search_docs`**: run 2–3 targeted searches covering the skill's scope. Use the product name and key feature terms as queries. |
| 76 | 2. **`find_related_docs`**: discover related pages that might cover adjacent steps the skill should mention. |
| 77 | 3. **`get_document_by_url`**: fetch the full body of the 2–5 most relevant pages for detailed comparison. Request the body |