Guide · Agent skill
How to use the Hyphens in URLs agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The hyphens agent skill teaches an AI agent one SEO rule: separate words in web addresses with hyphens, such as /best-seo-practices, instead of underscores or spaces. This guide explains what the skill does, how to install it, how to ask for it in plain language, and where to be careful. By the end you will be able to point an agent at a site's URL structure, get flagged URLs with hyphenated replacements, and get a slug function for your CMS.
Quick start
- 1Download the ZIP. Get the hyphens skill ZIP from the directory page.
- 2Install the skill. Unzip into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Describe your URL task. Ask in plain words, for example to audit URLs for underscores or write a slug function.
- 4Provide the real paths. Share your URL list, sitemap, router file or CMS slug field so the agent checks actual addresses.
- 5Review the report. Check the flagged URLs and counts by category before approving any change.
- 6Apply redirects and updates. Set up 301 redirects, update internal links and sitemap.xml, then submit new URLs to Google Search Console.
What the hyphens skill makes the agent do
Agent skills are folders of instructions that an AI agent loads when a task matches the skill's description. The hyphens skill is for URL structure work. Its description covers three jobs: auditing URL structures for word separator format, generating slugs from titles, and planning a URL migration from underscores or spaces to hyphens with appropriate redirects.
When the skill is active, the agent can review a site's URL structure, flag underscore or encoded-space URLs, suggest hyphenated replacements, write a slug-generation function, and outline how to redirect old links to new ones.
- Audit: flag URL paths that use underscores between words, spaces encoded as %20 or +, or mixed separators such as /best-practices_guide
- Fix: generate the hyphenated equivalent of each flagged path
- Slugs: write a function that turns a title into a lowercase, hyphenated slug
- Migration: outline 301 redirects, internal link updates, sitemap changes and re-indexing
Why hyphens instead of underscores
The skill is built on the rule that Google treats hyphens in URLs as word separators, while underscores join words into one token. The source gives the example that /seo_practices is read as one word, 'seopractices', rather than 'seo' and 'practices'. Its reasoning is that a URL with underscores matches fewer individual keyword queries.
- Preferred: /best-seo-practices
- Discouraged: /best_seo_practices or /bestseopractices
Install the hyphens skill
Download the ZIP for the hyphens skill from the directory page. You can install it in one of two ways.
For Claude Code, unzip the download into ~/.claude/skills/ to make it available across your projects, or into a project's .claude/skills/ folder to limit it to that project.
For the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Trigger the skill with natural requests
You do not need a special command. The skill loads when your request matches its description, so describe the job in plain words. Mention URLs, slugs, underscores, spaces or redirects so the match is clear.
Include the material the agent needs, such as a list of URLs, a sitemap, router file or CMS slug field, so it can check real paths rather than guessing.
- Audit my URLs for underscores or %20 spaces and count them by section
- Write a slug function that turns blog post titles into lowercase hyphenated slugs
- Plan a migration of /docs/api_reference paths to hyphens with 301 redirects
Check and fix a URL structure
The audit flags three problem patterns: underscores used as word separators, spaces encoded as %20 or +, and mixed separators in one URL. The skill reports the count of non-hyphenated URLs by category.
For fixes, the source's steps are: find the affected pages, generate hyphenated equivalents, set up 301 redirects from old to new URLs, update internal links, submit the new URLs to Google Search Console for re-indexing, and update sitemap.xml so it lists only the new URLs. Going forward, enforce hyphens in your CMS or slug function.
title.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '')Safety, requirements and when not to use it
The skill lists no required tools. It does not run scripts and does not use the network, so it works by reading and writing text. The skill does not itself create redirects or change your site; you or your team apply the changes.
Do not use it on sites whose URLs are already consistent and stable, because changing them adds redirect risk for little gain. Also avoid changing URLs that bookmarks, API consumers or external links depend on unless proper 301 redirects are in place first.
- Requires: nothing listed
- Runs scripts: no
- Uses network: no
Tips for getting good results
Give the agent the real URL list or router file rather than a description, and ask it to report counts before it proposes changes. Review every proposed redirect map before deploying, since a wrong target loses the search value you are trying to keep.
The skill is rated intermediate difficulty and roughly 10 minutes for the rule itself, but a full migration takes longer because of redirects and re-indexing.
- Ask for a count by category first, then a mapping table
- Check that slug output is lowercase and contains only letters, numbers and hyphens
- Test redirects on a staging copy before going live
What people use it for
- Auditing a site's URLs before a rebuild and listing every underscore or %20 path
- Writing a slug-generation function for a blog or CMS so new posts get hyphenated slugs
- Planning a migration from /docs/api_reference paths to hyphenated paths with 301 redirects
- Reviewing a router file for path segments that contain underscores between words
Frequently asked questions
How do I install the hyphens agent skill?
Download the ZIP from the directory page. For Claude Code, unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Does the hyphens skill cost money or what licence is it under?
The skill is published under the MIT licence. The source does not list any price.
What does the hyphens skill require?
The source lists no required tools. It does not run scripts and does not use the network.
Why are hyphens better than underscores in URLs?
According to the skill's source, Google treats hyphens as word separators and underscores as word joiners. So /best-seo-practices can match individual keywords, while /best_seo_practices is read as one token.
Will changing my underscore URLs hurt my rankings?
The skill's fix steps include 301 permanent redirects from old URLs to new hyphenated ones to preserve link equity. Without proper redirects, changing URLs can break bookmarks and external links, so the skill advises against it in that case.
When should I not use this skill?
Skip it when your URLs are already consistent and stable, since changes add redirect risk for little gain. Also avoid it when changing URLs would break bookmarks, API consumers or external links without 301 redirects in place.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
The hyphens skill suits SEO specialists, developers writing slug code and teams planning URL migrations that must keep rankings. It is a poor choice for sites with stable, consistent URLs, where changing paths adds risk for little benefit.
Download the skill