url-structure
When the user wants to optimize URL structure, fix URL issues, or plan URL hierarchy. Also use when the user mentions "URL structure," "URL optimization," "slug," "clean URLs," "URL hierarchy," "URL path," "permalink structure," "URL best practices," "dynamic URLs," or "URL parameters." For per-page slug wording, use url-slug-generator. For canonical consolidation, use canonical-tag.
Best use case
url-structure is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
When the user wants to optimize URL structure, fix URL issues, or plan URL hierarchy. Also use when the user mentions "URL structure," "URL optimization," "slug," "clean URLs," "URL hierarchy," "URL path," "permalink structure," "URL best practices," "dynamic URLs," or "URL parameters." For per-page slug wording, use url-slug-generator. For canonical consolidation, use canonical-tag.
Teams using url-structure should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/url-structure/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How url-structure Compares
| Feature / Agent | url-structure | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
When the user wants to optimize URL structure, fix URL issues, or plan URL hierarchy. Also use when the user mentions "URL structure," "URL optimization," "slug," "clean URLs," "URL hierarchy," "URL path," "permalink structure," "URL best practices," "dynamic URLs," or "URL parameters." For per-page slug wording, use url-slug-generator. For canonical consolidation, use canonical-tag.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# SEO On-Page: URL Structure Guides URL structure optimization for SEO: readability, hierarchy, and best practices. **When invoking**: On **first use**, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On **subsequent use** or when the user asks to skip, go directly to the main output. ## Scope (On-Page SEO) - **URL hierarchy**: Path structure, categories, depth - **URL format**: Static vs dynamic; omit file extensions - **URL slug**: See **url-slug-generator** for slug creation (3–5 words, under 60 chars) - **Duplicate variants**: See **canonical-tag** for HTTPS, www, trailing slash ## Initial Assessment **Check for project context first:** If `.claude/project-context.md` or `.cursor/project-context.md` exists, read it for site structure. Identify: 1. **Site structure**: Categories, subcategories, content types 2. **Current URLs**: Existing patterns and issues 3. **Multi-language**: URL structure for zh/en (e.g., /zh/, /en/ or subdomains) ## Best Practices ### URL Guidelines | Principle | Guideline | |-----------|-----------| | **Readable** | Use words, not IDs; `/blog/seo-guide` not `/p/12345` | | **Short** | Shorter is generally better; avoid unnecessary depth | | **Keyword** | Include target keyword when natural | | **Lowercase** | Use lowercase; avoid mixed case | | **Hyphens** | Use hyphens to separate words: `seo-guide` | | **Avoid** | Special chars, query params for core content, session IDs | ### Hierarchy | Pattern | Example | Use | |---------|---------|-----| | **Flat** | `/page-name` | Simple sites | | **Category** | `/blog/post-name`, `/tools/tool-name` | Content sites | | **Nested** | `/category/subcategory/page` | Deep hierarchies (keep shallow) | ### Multi-language | Pattern | Example | |---------|---------| | **Path prefix** | `/zh/page`, `/en/page` | | **Subdomain** | `zh.example.com`, `en.example.com` | | **ccTLD** | `example.cn`, `example.com` | ### Static vs Dynamic vs Pseudo-Static URLs | Type | Example | Use | |------|---------|-----| | **Static** | `/blog/seo-guide` | Direct file; best SEO; content stable | | **Dynamic** | `/product?id=123` | Program-generated; avoid for indexable content | | **Pseudo-static** | `/blog/seo-guide` (rewritten from `.php`) | Combines both; common in CMS | | **Rule** | Prefer static or pseudo-static; if dynamic, keep params ≤2; use **canonical-tag** and **robots-txt** (Clean-param) | ### File Extensions - **Omit** `.html`, `.php`, `.aspx` — keeps URLs technology-agnostic, shorter, easier to refactor - **Example**: `/seo-guide` not `/seo-guide.html` ### URL Parameter Handling | Scenario | Approach | |----------|----------| | **UTM / tracking** | Canonical to base URL; params in query string only | | **Search results** | Canonical to search page; avoid indexing result URLs | | **Filters / sort** | Canonical to base; or **robots-txt** Clean-param | | **Session IDs** | Use cookies; never in indexable URLs | ### Use Cases | Scenario | Focus | |----------|-------| | **New site** | Plan hierarchy upfront; avoid later restructuring | | **Migration** | 301 mapping; canonical; see **canonical-tag** | | **Large site** | Dynamic URLs, params, multi-language — canonical + robots | | **SEO audit** | Check structure, params, canonical consistency | ## Common Issues | Issue | Fix | |-------|-----| | Long URLs | Shorten; remove redundant words | | Dynamic params | Use canonical; clean params in robots (Yandex Clean-param) | | Mixed case | Redirect to lowercase | | Changed URLs | 301 redirect old to new | ## Output Format - **URL structure** recommendation - **Slug** conventions - **Hierarchy** for key content types - **Redirect** plan if changing URLs - **References**: [Alignify URL optimization](https://alignify.co/zh/seo/url-optimization); [Google URL guidelines](https://developers.google.com/search/docs/crawling-indexing/url-structure) ## Related Skills - **website-structure**: Plan structure and URL paths; apply url-structure rules after structure is defined - **canonical-tag**: HTTPS, www, trailing slash — handles duplicate URL variants - **url-slug-generator**: Slug creation for content pages; length, keywords, format - **category-page-generator**: E-commerce category URL hierarchy, faceted URLs - **products-page-generator**: Product URL hierarchy - **services-page-generator**: Service URL hierarchy - **robots-txt**: Clean-param for query params - **internal-links**: URL structure affects link patterns
Related Skills
website-structure
When the user wants to plan website structure, decide which pages to build, or prioritize pages for a new or existing site. Also use when the user mentions "website structure," "site structure," "which pages do I need," "page planning," "sitemap planning," "Must Have pages," "website architecture," or "site hierarchy." For a specific page template (e.g. homepage), use homepage-generator or landing-page-generator as appropriate. Not for organic SEO roadmap alone; use seo-strategy.
heading-structure
When the user wants to optimize heading structure (H1-H6), fix heading hierarchy, or improve content structure. Also use when the user mentions "H1," "heading," "heading hierarchy," "content structure," "H2," "H3," "heading tags," "heading SEO," "multiple H1," or "heading structure." For SEO workflow, use seo-strategy.
seo-strategy
When the user wants to plan SEO strategy, prioritize SEO work, or understand the SEO workflow. Also use when the user mentions "SEO strategy," "SEO plan," "SEO roadmap," "SEO priority," "SEO audit," "SEO workflow," "where to start SEO," "SEO approach," "organic growth strategy," "why SEO," "SEO value," or "search strategy." For technical/crawl audit execution, use seo-audit. For keyword research, use keyword-research. For AI search visibility, use generative-engine-optimization.
seo-audit
When the user wants to run an SEO audit, technical SEO audit, or site health check. Also use when the user mentions "SEO audit," "technical audit," "site audit," "crawl audit," "indexing audit," "SEO health," or "fix SEO issues." For prioritization and organic strategy, use seo-strategy. For GSC data analysis, use google-search-console.
retention-strategy
When the user wants to reduce churn, improve customer retention, or plan lifecycle marketing. Also use when the user mentions "retention," "churn," "customer lifecycle," "churn prevention," "at-risk customers," or "loyalty program." For lifecycle, use growth-funnel.
research-sources
When the user wants to find information sources for content ideation, competitor monitoring, or industry tracking. Also use when the user mentions "research sources," "information sources," "content ideation," "industry monitoring," "competitor monitoring," "market intelligence," "content research," or "topic research." For keywords, use keyword-research.
product-launch
When the user wants to plan a product launch, execute launch channels, or create a launch checklist. Also use when the user mentions "product launch," "launch strategy," "product announcement," "launch channels," or "market launch." For GTM motion and positioning, use gtm-strategy. For cold start and first users, use cold-start-strategy. For Product Hunt day-of, use product-hunt-launch.
pmf-strategy
When the user wants to validate product-market fit, measure PMF, or plan before scaling. Also use when the user mentions "PMF," "product-market fit," "product market fit," "Sean Ellis test," "very disappointed," "vitamin vs painkiller," "PMF validation," "premature scaling," or "validate before scale." For GTM after validation, use gtm-strategy.
indie-hacker-strategy
When the user wants indie hacker or bootstrapping founder strategy—growth, channels, Build in Public, or solo founder tactics. Also use when the user mentions "indie hacker," "indie developer," "bootstrapping," "bootstrapped founder," "solo founder," "Build in Public," "scratch your own itch," "Micro-SaaS," "first 100 users," or "solo company." For cold start, use cold-start-strategy.
gtm-strategy
When the user wants to plan go-to-market strategy, GTM framework, or market entry. Also use when the user mentions "GTM," "go-to-market," "market entry," "new market," "repositioning," "PLG," "sales-led," "product-led," "marketing-led," "ICP," "buyer persona," "GTM motion," or "market expansion." For launch checklist, use product-launch.
growth-funnel
When the user wants to plan growth using the AARRR framework, diagnose growth bottlenecks, or map actions across the customer lifecycle. Also use when the user mentions "growth funnel," "AARRR," "pirate metrics," "acquisition activation retention," "customer lifecycle metrics," or "growth framework." For retention tactics, use retention-strategy.
conversion-optimization
When the user wants to improve conversion rates, run A/B tests, optimize funnels, or reduce friction. Also use when the user mentions "CRO," "conversion rate optimization," "A/B test," "split test," "funnel optimization," "checkout optimization," "form optimization," or "conversion funnel." For pricing psychology, use pricing-strategy.