URL Structure Optimizer

Url structure

by kostja94 · MIT license · ★ 1,006 on GitHub

Url structure cover

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…

---
name: url-structure
description: 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.
metadata:
  version: 1.1.0
---

# 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)

Overview

Guides URL structure optimization for SEO: readability, hierarchy, and best practices.

What you get

  • URL structurerecommendation
  • Slugconventions
  • Hierarchyfor key content types
  • Redirectplan if changing URLs
  • ReferencesAlignify URL optimization; Google URL guidelines
Manual install (npx, ZIP)
Claude Codenpx skills add kostja94/marketing-skills --skill url-structure -g -a claude-code
Claude Code (degit)npx degit kostja94/marketing-skills/skills/seo/on-page/url-structure#main ~/.claude/skills/url-structure
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md5.0 KB
Read SKILL.md here
kostja94/main1 file shown
SKILL.md
Show the full text119 lines

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

Project context: Read root contextus.md when present and load only the modules relevant to this task. Without Contextus, use available project material or user-provided facts and ask for missing information; do not create a parallel context system.

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

  • 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

1---
2name: url-structure
3description: 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.
4metadata:
5 version: 1.1.0
6---
7 
8# SEO On-Page: URL Structure
9 
10Guides URL structure optimization for SEO: readability, hierarchy, and best practices.
11 
12**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.
13 
14## Scope (On-Page SEO)
15 
16- **URL hierarchy**: Path structure, categories, depth
17- **URL format**: Static vs dynamic; omit file extensions
18- **URL slug**: See **url-slug-generator** for slug creation (3–5 words, under 60 chars)
19- **Duplicate variants**: See **canonical-tag** for HTTPS, www, trailing slash
20 
21## Initial Assessment
22 
23**Project context:** Read root `contextus.md` when present and load only the modules relevant to this task. Without Contextus, use available project material or user-provided facts and ask for missing information; do not create a parallel context system.
24 
25Identify:
261. **Site structure**: Categories, subcategories, content types
272. **Current URLs**: Existing patterns and issues
283. **Multi-language**: URL structure for zh/en (e.g., /zh/, /en/ or subdomains)
29 
30## Best Practices
31 
32### URL Guidelines
33 
34| Principle | Guideline |
35|-----------|-----------|
36| **Readable** | Use words, not IDs; `/blog/seo-guide` not `/p/12345` |
37| **Short** | Shorter is generally better; avoid unnecessary depth |
38| **Keyword** | Include target keyword when natural |
39| **Lowercase** | Use lowercase; avoid mixed case |
40| **Hyphens** | Use hyphens to separate words: `seo-guide` |
41| **Avoid** | Special chars, query params for core content, session IDs |
42 
43### Hierarchy
44 
45| Pattern | Example | Use |
46|---------|---------|-----|
47| **Flat** | `/page-name` | Simple sites |
48| **Category** | `/blog/post-name`, `/tools/tool-name` | Content sites |
49| **Nested** | `/category/subcategory/page` | Deep hierarchies (keep shallow) |
50 
51### Multi-language
52 
53| Pattern | Example |
54|---------|---------|
55| **Path prefix** | `/zh/page`, `/en/page` |
56| **Subdomain** | `zh.example.com`, `en.example.com` |
57| **ccTLD** | `example.cn`, `example.com` |
58 
59### Static vs Dynamic vs Pseudo-Static URLs
60 
61| Type | Example | Use |
62|------|---------|-----|
63| **Static** | `/blog/seo-guide` | Direct file; best SEO; content stable |
64| **Dynamic** | `/product?id=123` | Program-generated; avoid for indexable content |
65| **Pseudo-static** | `/blog/seo-guide` (rewritten from `.php`) | Combines both; common in CMS |
66| **Rule** | Prefer static or pseudo-static; if dynamic, keep params ≤2; use **canonical-tag** and **robots-txt** (Clean-param) |
67 
68### File Extensions
69 
70- **Omit** `.html`, `.php`, `.aspx` — keeps URLs technology-agnostic, shorter, easier to refactor
71- **Example**: `/seo-guide` not `/seo-guide.html`
72 
73### URL Parameter Handling
74 
75| Scenario | Approach |
76|----------|----------|
77| **UTM / tracking** | Canonical to base URL; params in query string only |
78| **Search results** | Canonical to search page; avoid indexing result URLs |
79| **Filters / sort** | Canonical to base; or **robots-txt** Clean-param |
80| **Session IDs** | Use cookies; never in indexable URLs |
81 
82### Use Cases
83 
84| Scenario | Focus |
85|----------|-------|
86| **New site** | Plan hierarchy upfront; avoid later restructuring |
87| **Migration** | 301 mapping; canonical; see **canonical-tag** |
88| **Large site** | Dynamic URLs, params, multi-language — canonical + robots |
89| **SEO audit** | Check structure, params, canonical consistency |
90 
91## Common Issues
92 
93| Issue | Fix |
94|-------|-----|
95| Long URLs | Shorten; remove redundant words |
96| Dynamic params | Use canonical; clean params in robots (Yandex Clean-param) |
97| Mixed case | Redirect to lowercase |
98| Changed URLs | 301 redirect old to new |
99 
100## Output Format
101 
102- **URL structure** recommendation
103- **Slug** conventions
104- **Hierarchy** for key content types
105- **Redirect** plan if changing URLs
106- **References**: [Alignify URL optimization](https://alignify.co/zh/seo/url-optimization); [Google URL guidelines](https://developers.google.com/search/docs/crawling-indexing/url-structure)
107 
108## Related Skills
109 
110- **website-structure**: Plan structure and URL paths; apply url-structure rules after structure is defined
111 
112- **canonical-tag**: HTTPS, www, trailing slash — handles duplicate URL variants
113- **url-slug-generator**: Slug creation for content pages; length, keywords, format
114- **category-page-generator**: E-commerce category URL hierarchy, faceted URLs
115- **products-page-generator**: Product URL hierarchy
116- **services-page-generator**: Service URL hierarchy
117- **robots-txt**: Clean-param for query params
118- **internal-links**: URL structure affects link patterns
119 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 1,006
Checked
Source
kostja94/marketing-skills ↗
Creator
kostja94 · 106 listings
View creator

Similar skills

See all →

More from kostja94

SkillAffiliate Marketing Strategykostja94/marketing-skills · by kostja94When the user wants to plan, implement, or optimize affiliate marketing strategy. Also use when the user mentions "affiliate marketing," "affiliate program strategy," "CPS model," "affiliate recruitment," "commission structure," "affiliate partners," "affiliate network," "affiliate tracking," "affiliate commission," or "partner marketing." For affiliate page, use affiliate-page-generator.★ 1k GitHub starsSkillAI Search Traffic Trackerkostja94/marketing-skills · by kostja94When the user wants to track AI search traffic in GA4 or GSC. Also use when the user mentions "AI traffic," "ChatGPT referral," "Perplexity traffic," "AI Overviews," "GA4 AI sources," "AI search analytics," "track AI referrals," "AI search traffic," "Claude traffic," or "how to track AI traffic." For AI SEO strategy, use generative-engine-optimization.★ 1k GitHub starsSkillGA4 Analytics Optimizerkostja94/marketing-skills · by kostja94When the user wants to set up, audit, or optimize analytics tracking (GA4, events, conversions). Also use when the user mentions "Google Analytics," "GA4," "event tracking," "conversions," "attribution model," "gtag," "data layer," "GA4 setup," "conversion tracking," "event setup," "User ID tracking," or "CTA attribution." For traffic insights, use traffic-analysis.★ 1k GitHub starsSkillMobile App Campaign Managerkostja94/marketing-skills · by kostja94When the user wants to run app install ads, user acquisition (UA), or promote mobile apps. Also use when the user mentions "app ads," "app install ads," "UA," "user acquisition," "Google App Campaigns," "Apple Search Ads," "ASA," "UAC," "App Store ads," "Play Store ads," "CPI," or "app promotion." For store listings, use distribution-channels.★ 1k GitHub starsSkillLong-Form Article Writerkostja94/marketing-skills · by kostja94When the user wants to write, generate, or create article body content—blog post body, long-form content, how-to guide, listicle. Also use when the user mentions "write article," "article content," "blog post content," "article body," "long-form content creation," "generate article," "article draft," "how-to guide content," "listicle content," "information gain," or "content density." For single post page structure, schema, and SEO metadata, use article-page-generator. For blog index/listing page, use blog-page-generator. For short ad, landing, or email copy, use copywriting.★ 1k GitHub starsSkillBacklink Profile Analyzerkostja94/marketing-skills · by kostja94When the user wants to analyze backlinks, audit link profile, or identify link issues. Also use when the user mentions "backlink analysis," "backlink audit," "referring domains," "toxic links," "link profile," or "disavow file." For acquisition, use link-building.★ 1k GitHub stars