update-redirects

Manage redirects for moved documentation files with validation and cleanup.

78|252|Updated Feb 7, 2024
One-click install
npx skills add https://github.com/hashicorp/web-unified-docs --skill update-redirects
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-redirects
Source: https://github.com/hashicorp/web-unified-docs/tree/main/content/well-architected-framework/docs/.claude/skills/update-redirects
Command: npx skills add https://github.com/hashicorp/web-unified-docs --skill update-redirects

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the management of redirects when documentation moves or renames files, ensuring users and internal links don't break.

Core Features & Use Cases

  • Add and update redirects based on file moves or renames, with validation against existing targets.
  • Scan repositories to detect moved files and suggest necessary redirects.
  • Validate redirects for circular references, broken targets, and orphaned entries; provide cleanup opportunities.
  • Maintain redirects.jsonc formatting and comments; batch operations across large doc suites.
  • Integrate with link-check and cross-reference workflows to stabilize navigational paths.

Quick Start

  • Run: /update-redirects --scan docs/
  • Validate all redirects: /update-redirects --validate
  • Apply cleanup suggestions: /update-redirects --validate --cleanup

Frequently Asked Questions about update-redirects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate documentation redirects when moving files in a git repository?

Automating documentation redirects involves scanning your git history for moved files and applying rules to a redirects.jsonc file. This skill adds and updates redirect entries automatically, ensuring internal links remain stable and unbroken after repository restructuring.

What's the best way to detect broken targets and circular references in redirects.jsonc?

Detecting broken targets and circular references in redirects.jsonc requires a validation routine that checks redirect mappings. This skill validates all redirect entries, identifies orphaned paths, and provides cleanup suggestions to eliminate loops and dead links across your documentation.

Can I preserve comments in redirects.jsonc during large-scale documentation restructuring?

Yes, you can preserve comments in redirects.jsonc during batch operations. This skill maintains the existing redirects.jsonc formatting and comments while applying bulk redirect updates across large documentation suites.

How do I scan git history to propose new redirects for renamed documentation files?

Scanning git history to propose new redirects involves analyzing past file moves and renames. This skill scans your documentation repositories to detect relocated files and suggests the necessary redirect entries to maintain navigational path stability.

Why do I need redirect validation for link stability after a section reorganization?

Redirect validation for link stability is needed because section reorganizations often leave orphaned entries or broken targets. This skill enforces the redirects file format and integrates with link-check workflows to ensure users and internal links don't break.