canonicalizing-urls

Use when working with any URL that may contain tracking parameters, redirect wrappers, locale prefixes, or opaque share links — to produce a clean, canonical form. Triggers proactively when the agent uses a URL in a context where cleanliness matters (saving to Notion, quoting in a document, creating a hyperlink). Also triggers explicitly when the user says "canonicalize", "clean this URL", "strip tracking params", or invokes /canonicalize.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "canonicalizing-urls" with this command: npx skills add william-yeh/canonicalizing-urls/william-yeh-canonicalizing-urls-canonicalizing-urls

canonicalizing-urls

Canonicalize URLs by running scripts/canonicalize.py (requires uv).

Proactive use

When a URL appears in a context where it will be saved, shared, or cited:

  1. uv run scripts/canonicalize.py <url> (offline, static rules only)
  2. If the URL matches an opaque short-link pattern (e.g. /share/p/), add --online
  3. If the result differs from the input, substitute the canonical form
  4. Note the change inline: "(canonicalized: removed fbclid)"

Explicit use

When the user asks to canonicalize a URL:

  1. uv run scripts/canonicalize.py <url>
  2. If unchanged and URL looks non-canonical, run --probe to discover rules

Adding a new rule

When the script returns unchanged output but the URL is clearly non-canonical:

  1. uv run scripts/canonicalize.py --probe <url> — review suggested actions
  2. Ask user: generalize to a pattern, or keep domain-specific?
  3. Add a failing UAT row to tests/test_uat.py (BEFORE→AFTER)
  4. Add the confirmed Rule(...) to RULES in scripts/rules.py
    • Insert before HostGlob rules if the rule rewrites the host for a specific domain (the specific Host(...) rule must fire first to prevent the generic glob from also running)
    • Otherwise insert after similar-domain rules, before the closing bracket
  5. uv run scripts/canonicalize.py <original_url> — verify output
  6. uv run --group dev pytest tests/ -v — confirm all tests pass
  7. Commit: feat: add <domain> canonicalization rule

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

agent-skill-linter

No summary provided by upstream source.

Repository SourceNeeds Review
General

epub-chinese-cleaner

No summary provided by upstream source.

Repository SourceNeeds Review
General

pre-publish-checklist

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

common-code-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review