ワンクリックで
docs-redirects
// Create and manage redirects in Elastic documentation when pages are moved, renamed, or deleted. Use when moving docs pages, renaming files, restructuring content, or when the user asks about redirects.
// Create and manage redirects in Elastic documentation when pages are moved, renamed, or deleted. Use when moving docs pages, renaming files, restructuring content, or when the user asks about redirects.
Suggest improved text for changelog YAML files against current Elastic standards. Mirrors the pattern catalog from docs-review-changelog to provide consistent fixes. Includes type-title alignment checking and technical content assessment to catch overly technical titles that need user-focused rewrites. Features repository-aware area validation and enhanced confidence scoring. Supports single files or directories. Fetches canonical guidance to stay in sync. Use after review identifies quality issues, or when drafting new changelogs.
Provide Elastic Docs syntax guidance, troubleshoot markup issues, and help write directives correctly. Use when writing or editing documentation that uses MyST Markdown with Elastic extensions, or when troubleshooting build errors related to syntax.
Check documentation for Elastic style guide compliance using Vale linter output and style rules. Use when writing, editing, or reviewing docs to catch voice, tone, grammar, formatting, accessibility, and word choice issues.
Validate and assess the quality of Elastic changelog YAML files against current Elastic standards. Reports schema errors, content quality issues, systematic pattern violations, type-title alignment mismatches, and overly technical content that needs user-focused rewrites. Features repository-aware area validation. Fetches canonical guidance to stay in sync. Use when checking or reviewing changelog files before merging — pairs with docs-fix-changelog to get suggested fixes.
Validate 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 (preview, beta, GA, deprecated, removed).
Check 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.
| name | docs-redirects |
| version | 1.0.4 |
| description | Create and manage redirects in Elastic documentation when pages are moved, renamed, or deleted. Use when moving docs pages, renaming files, restructuring content, or when the user asks about redirects. |
| argument-hint | <old-path> <new-path> |
| context | fork |
| allowed-tools | Read, Grep, Glob, Edit, Write |
| sources | ["https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/contribute/redirects"] |
You are a redirect specialist for Elastic Docs V3. Your job is to create and manage redirects in redirects.yml when documentation pages are moved, renamed, or deleted.
Trigger this skill when:
.md file is being moved, renamed, or deletedRedirects are configured in redirects.yml (or _redirects.yml), located next to the docset.yml (or _docset.yml) file in each content set. All paths are relative to the redirects.yml file location.
Redirects only work within Elastic Docs V3 content sets. They cannot target external URLs.
redirects:
'old/path/page.md': 'new/path/page.md'
Any anchors on the old URL are carried over to the new URL automatically.
Prefix the target with ! or use the expanded form:
redirects:
# Short form
'old-page.md': '!new-page.md'
# Expanded form
'old-page.md':
to: 'new-page.md'
anchors: '!'
Remap specific anchors. Set a value to empty to drop that anchor:
redirects:
'old-page.md':
to: 'new-page.md'
anchors:
'old-anchor': 'new-anchor'
'removed-anchor':
When a page hasn't moved but specific anchors were removed, omit the to: field:
redirects:
'existing-page.md':
anchors:
'removed-anchor':
Use the repo-name://path syntax:
redirects:
'old-page.md': 'other-repo://path/to/new-page.md'
When different anchors on the old page need to redirect to different targets, use the many: key. Setting to: at the top level determines the default target for any anchor not matched by a many: entry:
redirects:
# Default target stays on the same page; specific anchors redirect elsewhere
'old-page.md':
to: 'old-page.md'
many:
- to: 'target-two.md'
anchors:
'anchor-a': 'anchor-b'
- to: 'target-three.md'
anchors:
'anchor-c':
# Default target is a different page with anchors stripped
'deleted-page.md':
to: 'default-target.md'
anchors: '!'
many:
- to: 'target-two.md'
anchors:
'anchor-a': 'anchor-b'
- to: 'other-repo://path/to/new-page.md'
anchors:
'anchor-b': 'anchor-c'
To define a catch-all that matches any anchor not covered by individual entries, use {} as the anchor value:
redirects:
'old-page.md':
many:
- to: 'specific-page.md'
anchors:
'section-one': 'new-section'
- to: 'catch-all-page.md'
anchors: {}
Notes:
anchors key or setting it to empty are both equivalent.other-repo://path) are supported in many: entries.to:, anchors:, and many: can be combined to handle complex scenarios.Find the redirects file: Locate redirects.yml or _redirects.yml next to the content set's docset.yml or _docset.yml. If it doesn't exist, create it.
Determine old and new paths: Identify the old path (the URL that will break) and the new path (where it should go). Both must be relative to the redirects.yml location.
Choose the redirect type:
Add the redirect entry: Edit redirects.yml to add the new entry under the redirects: key. If the file is new, create it with the redirects: top-level key.
Update internal links: Search the repository for any links pointing to the old path and update them to the new path. Use Grep to find references:
](old/path/page.mdrepo-name://old/path/page.mdReport: Summarize what was done — redirects added and links updated.
Run docs-builder diff validate locally to verify all necessary redirect rules are in place after your changes. This also runs automatically on pull requests — if you see validation errors, double-check that all steps were followed.