/elastic-docs-skills:docs-redirects <old-path> <new-path>from elastic-docs-skills
Creates and manages redirects in Elastic Docs V3 when pages are moved, renamed, or deleted. Handles redirects.yml syntax including anchor preservation, stripping, and mapping.
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 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 are currently only implemented for assembler and codex builds. Isolated builds do not process _redirects.yml at deploy time — if the content set builds in isolation, a redirect entry will not take effect, and you should say so when adding one there.
For legacy elastic.co/guide (AsciiDoc) redirects, this skill does not apply — open a web team request instead.
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 moved and specific anchors were removed, keep the page redirect and drop only those anchors:
redirects:
'existing-page.md':
to: 'new-page.md'
anchors:
'removed-anchor':
If the page itself did not move and only a same-page anchor changed, do not add a redirect entry. Instead, update internal links that still point to the old anchor. Redirects are for moved or removed pages, not same-page anchor renames.
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub elastic/elastic-docs-skills --plugin elastic-docs-skills25 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-oasOther plugins' skills for the same job