redirect-article
Automates the process of removing markdown articles and setting up redirects.
Install
mkdir -p .claude/skills/redirect-article && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17904" && unzip -o skill.zip -d .claude/skills/redirect-article && rm skill.zipInstalls to .claude/skills/redirect-article
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Deletes a markdown article and creates a redirect entry pointing to a different article. Use when consolidating articles, renaming or moving content, removing outdated documentation, or reorganizing the docs structure while preserving existing URLs.Key capabilities
- →Delete a markdown article from the repository
- →Create a redirect entry that points users to a different article
- →Update internal links to point to the new article
- →Determine the correct redirection file for an article
How it works
The skill deletes a markdown article and uses a PowerShell script to create a redirect entry in a JSON file, ensuring existing links remain functional.
Inputs & outputs
When to use redirect-article
- →Consolidate documentation articles
- →Move content to new paths
- →Remove outdated docs
About this skill
Redirect Article
Delete a markdown article from the repository and create a redirect entry that points users to a different article. This ensures existing links and bookmarks continue to work after content is reorganized.
When to Use
- Deleting an article that should redirect to another existing article
- Consolidating multiple articles into a single article
- Renaming or moving an article to a new location
- Removing outdated content while preserving URL functionality
Important Notes
- Redirect entries are sorted alphabetically by path (ignoring the leading
/forsource_path_from_root) - Always determine the correct redirection file by searching for existing entries with similar paths before running the script
- Always search the repository for links to the old article and update them
- The
redirect_urlshouldn't include the file extension or domain—just the URL path
Steps
1. Required: Use the provided script
DO NOT manually edit a redirection JSON file. Use the create-redirect-entry.ps1 script to handle the redirect creation automatically.
- Delete the source article - Remove the original markdown file from the repository using
Remove-Item - Create a redirect entry - REQUIRED: Use the
create-redirect-entry.ps1script (see below) to add the redirect entry to the appropriate JSON file. Do not manually edit the JSON file - Update internal links - Search the repository for links to the old article and update them to point to the new article
2. Update the internal links
- Build a list of files that reference the deleted article
- Search for
**/*.mdfiles that reference the redirected file - Search for
**/*.ymlfiles that reference the redirected file
- Search for
- Update the links to point to the new article
Redirection File Selection
To determine the correct redirection file for an article:
- Search for existing redirects - Search the
.openpublishing.redirection.*.jsonfiles for entries with paths similar to your source article (same folder or parent folder) - Match by path prefix - Use the redirection file that contains entries with the longest matching path prefix to your source article
- Use the reference table - If no existing entries match, consult the table below based on the content area
Reference table:
| Product Area | Redirection File |
|---|---|
| AI | .openpublishing.redirection.ai.json |
| Architecture | .openpublishing.redirection.architecture.json |
| Aspire | .openpublishing.redirection.aspire.json |
| Azure | .openpublishing.redirection.azure.json |
| .NET Core | .openpublishing.redirection.core.json |
| C# | .openpublishing.redirection.csharp.json |
| Desktop WPF | .openpublishing.redirection.desktop-wpf.json |
| .NET Framework | .openpublishing.redirection.framework.json |
| .NET Framework WinForms | .openpublishing.redirection.framework-winforms.json |
| .NET Framework WPF | .openpublishing.redirection.framework-wpf.json |
| F# | .openpublishing.redirection.fsharp.json |
| .NET Fundamentals | .openpublishing.redirection.fundamentals.json |
| Machine Learning | .openpublishing.redirection.machine-learning.json |
| Navigate | .openpublishing.redirection.navigate.json |
| Orleans | .openpublishing.redirection.orleans.json |
| .NET Standard | .openpublishing.redirection.standard.json |
| Visual Basic | .openpublishing.redirection.visual-basic.json |
| Default/General | .openpublishing.redirection.json |
Scripts
create-redirect-entry.ps1
ALWAYS use this script to add redirect entries. This script adds the entry in alphabetical order and handles formatting. It supports both source_path_from_root and source_path properties when reading existing entries.
Location (relative to this skill file): ./scripts/create-redirect-entry.ps1
| Parameter | Required | Description |
|---|---|---|
RedirectionFile | Yes | The redirection JSON file name (e.g., .openpublishing.redirection.csharp.json) |
SourcePath | Yes | Repository path of the deleted article (with or without leading /) |
RedirectUrl | Yes | Destination URL to redirect to |
Example:
.\scripts\create-redirect-entry.ps1 `
-RedirectionFile ".openpublishing.redirection.csharp.json" `
-SourcePath "docs/csharp/fundamentals/old-article.md" `
-RedirectUrl "/dotnet/csharp/fundamentals/new-article"
Redirect Entry Format
{
"source_path_from_root": "/docs/csharp/fundamentals/old-article.md",
"redirect_url": "/dotnet/csharp/fundamentals/new-article"
}
- source_path_from_root: File path from the repository root, starting with
/(preferred property) - source_path: Legacy property without leading
/(some older files use this) - redirect_url: URL path to redirect to (starts with
/dotnet/)
Note: The script handles both
source_path_from_rootandsource_pathwhen reading existing entries, but always writes new entries usingsource_path_from_root.
When not to use it
- →When manually editing a redirection JSON file
Limitations
- →Redirect entries are sorted alphabetically by path
- →The redirect_url shouldn't include the file extension or domain
- →The script always writes new entries using source_path_from_root
How it compares
This skill automates the creation of redirect entries and updates internal links, unlike manual file editing.
Compared to similar skills
redirect-article side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| redirect-article (this skill) | 0 | 28d | Review | Beginner |
| lisa-lint | 0 | 1mo | No flags | Beginner |
| scan | 0 | 4mo | No flags | Beginner |
| seo-review | 9 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by dotnet
View all by dotnet →You might also like
lisa-lint
CodySwannGT
Health-check the LLM Wiki: orphan pages, contradictions, stale claims, broken internal links, missing index/log coverage, structure violations, and secret/tenant leaks. Read-only — reports findings, does not fix them.
scan
damianwajser
Scan and map the Claude Code configuration of a target project without auditing. Use when someone says "scan project", "show structure", "map config", or just wants to see what Claude Code configuration exists.
seo-review
leonardomso
Perform a focused SEO audit on JavaScript concept pages to maximize search visibility, featured snippet optimization, and ranking potential
schema-markup
davila7
When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," or "breadcrumb schema." For broader SEO issues, see seo-audit.
concept-workflow
leonardomso
End-to-end workflow for creating complete JavaScript concept documentation, orchestrating all skills from research to final review
seo-structure-architect
sickn33
Analyzes and optimizes content structure including header hierarchy, suggests schema markup, and internal linking opportunities. Creates search-friendly content organization. Use PROACTIVELY for content structuring.