Organizes redirect JSON files by path to improve readability and prevent duplicates.
Install
mkdir -p .claude/skills/sort-redirects && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10251" && unzip -o skill.zip -d .claude/skills/sort-redirects && rm skill.zipInstalls to .claude/skills/sort-redirects
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.
Sorts redirect entries in Open Publishing redirection JSON files alphabetically by path. Use after adding redirects or when the file becomes unsorted.Key capabilities
- →Sort redirect entries
- →Format redirection JSON files
- →Maintain alphabetical path order
How it works
It uses a PowerShell script to parse and reorder entries in Open Publishing redirection JSON files alphabetically by path.
Inputs & outputs
When to use sort-redirects
- →Sort redirect file
- →Format redirect json
- →Maintain redirect entries
About this skill
Sort Redirects
Sort redirect entries in Open Publishing redirection JSON files alphabetically by path. This ensures consistency and makes the redirect files easier to maintain.
When to Use
- After adding redirect entries to a JSON file
- When the redirect file has become unsorted
- After merging branches that may have caused unsorted entries
Steps
- Identify the redirection file - Determine which
.openpublishing.redirection.*.jsonfile needs sorting. - Run the sort script - Use the
sort-redirects.ps1script with the file path.
Scripts
sort-redirects.ps1
Sorts all entries in the JSON file alphabetically by path (ignoring leading / for source_path_from_root). Handles both source_path_from_root and source_path properties.
Location (relative to this skill file): ./scripts/sort-redirects.ps1
| Parameter | Required | Description |
|---|---|---|
RedirectionFile | Yes | The path to a redirection JSON file (e.g., .openpublishing.redirection.csharp.json) |
Example:
.\scripts\sort-redirects.ps1 -RedirectionFile ".openpublishing.redirection.csharp.json"
Important Notes
- The script preserves all existing redirect entries, only changing their order.
- Sorting is case-sensitive and alphabetical by the normalized path (without leading
/).
When not to use it
- →Non-JSON redirection files
- →Manual sorting of large files
Prerequisites
Limitations
- →Case-sensitive sorting
- →Requires specific JSON structure
How it compares
It automates the maintenance of redirect files to ensure consistency, avoiding manual reordering errors.
Compared to similar skills
sort-redirects side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| sort-redirects (this skill) | 0 | 5mo | Review | Beginner |
| changelog-automation | 8 | 2mo | Review | Intermediate |
| configured-agent | 5 | 8mo | Review | Beginner |
| plugin-settings | 2 | 6mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by dotnet
View all by dotnet →You might also like
changelog-automation
wshobson
Automate changelog generation from commits, PRs, and releases following Keep a Changelog format. Use when setting up release workflows, generating release notes, or standardizing commit conventions.
configured-agent
anthropics
This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable plugin", ".local.md files", "plugin state files", "read YAML frontmatter", "per-project plugin settings", or wants to make plugin behavior configurable. Documents the .claude/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.
plugin-settings
anthropics
This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable plugin", ".local.md files", "plugin state files", "read YAML frontmatter", "per-project plugin settings", or wants to make plugin behavior configurable. Documents the .claude/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.
skill-builder
ruvnet
Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization. Use when you need to build custom skills for specific workflows, generate skill templates, or understand the Claude Skills specification.
skill-creator-doctor
ananddtyagi
Create, repair, maintain, and consolidate skills. This skill should be used when users want to create new skills, fix broken skills that won't load, diagnose skill system issues, maintain skill health, or consolidate duplicate/obsolete skills. Automatically detects and repairs common skill loading problems including missing registry entries, metadata format issues, and structural problems. Provides comprehensive skill ecosystem management including duplicate detection, merge workflows, and archival processes.
slash-command-creator
greatSumini
Guide for creating Claude Code slash commands. Use when the user wants to create a new slash command, update an existing slash command, or asks about slash command syntax, frontmatter options, or best practices.