canonical-tag

canonical-tag is a skill for Claude Code, Codex from kostja94/marketing-skills. It costs 62 tokens per session (1,510 once invoked), scanned A, original, MIT.

A guide to canonical URLs, which tell search engines which version of similar or duplicate pages should be treated as the main one. It also covers redirects and duplicate versions caused by protocols, domains, query parameters, languages, or pagination.

In plain words
What is it for?
Use it to choose canonical tags, plan 301 redirects, consolidate HTTP and HTTPS or www and non-www versions, and handle duplicate content and alternate URLs.
Why use it?
It prevents search engines from splitting attention between competing URLs and helps consolidate their signals on the preferred page. It is useful when the same content can be reached through multiple addresses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose canonical tags, plan 301 redirects, consolidate HTTP and HTTPS or www and non-www versions, and handle duplicate content and alternate URLs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kostja94/marketing-skills/canonical
About the project

Marketing Skills is an open-source library of reusable workflows that helps AI coding agents perform marketing and SEO tasks. It serves people working on search optimization, content, advertising, launches, analytics, and related marketing activities, and its catalogue entries are the individual skills agents can install.

kostja94/marketing-skills · 1,146 stars · on GitHub · alignify.co

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kostja94/marketing-skills --skill canonical
Clone the repo
git clone --depth 1 https://github.com/kostja94/marketing-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for canonical-tag

README.md
[![agentmods](https://agentmods.dev/badge/skills/kostja94/marketing-skills/canonical/github.svg)](https://agentmods.dev/skills/kostja94/marketing-skills/canonical)
Your own site
<a href="https://agentmods.dev/skills/kostja94/marketing-skills/canonical"><img src="https://agentmods.dev/badge/skills/kostja94/marketing-skills/canonical/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for canonical-tag

Your own site · 80×15
<a href="https://agentmods.dev/skills/kostja94/marketing-skills/canonical"><img src="https://agentmods.dev/badge/skills/kostja94/marketing-skills/canonical.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.01510
Opus 5.5 $0.00025 $0.00604
Sonnet 5.5 $0.00012 $0.00302
Haiku 4.5 $0.00006 $0.00151

Measured 23d ago against content hash c266f346d2b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

canonical-tag scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/seo/technical/canonical/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SEO Technical: Canonicalization

Determine the preferred URL for each page identity, consolidate duplicate variants, and verify that redirects, canonical annotations, internal links, sitemaps, and localization signals agree.

Scope

Treat these as one duplicate-page canonicalization problem when they expose the same or substantially similar primary content:

  • HTTP and HTTPS;
  • www and non-www hosts, including combined protocol/host variants;
  • trailing-slash and non-trailing-slash paths;
  • repeated path slashes such as /docs//guide;
  • directory defaults such as /docs/ and /docs/index.html;
  • historical extensions such as /guide.html and /guide;
  • case variants such as /Guide and /guide;
  • UTM and other tracking parameters that do not change primary content.

Do not assume that similar-looking URLs are duplicates. Case, parameters, extensions, and slash behavior can identify different resources. Compare response behavior, primary content, and project intent before consolidating.

Inputs and Context

Read root {project}.md when present and only the modules relevant to the task. Otherwise use project configuration, routing code, deployment rules, sitemaps, and user-provided facts. Establish:

  1. preferred scheme and host;
  2. preferred path conventions;
  3. which parameters change content versus only attribution or presentation;
  4. framework, origin server, CDN, and redirect ownership;
  5. existing indexed URLs, backlinks, migrations, and localization rules when relevant.

Ask only for missing information that would change the preferred URL or make a redirect unsafe.

Decision Rules

Situation Primary action
Duplicate URL should no longer remain accessible Permanent server-side redirect to the final preferred URL
Duplicate or near-duplicate must remain accessible rel="canonical" to the preferred URL
Canonical HTML page Self-referencing canonical
Non-HTML duplicate such as a PDF Canonical HTTP Link header when supported
Tracking parameter that must reach analytics Keep the landing request if needed; canonical to the content URL without tracking parameters
Parameter changes primary content or search intent Evaluate as a separate page; do not strip or canonicalize mechanically
Pagination Give each page a crawlable URL and evaluate it as distinct content; do not canonicalize every page to page 1
Language or regional variant Canonical within the appropriate language identity and coordinate with hreflang

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 23d ago Changed c266f346d2b8
  2. 1mo ago Changed · +2 lines 3023abf3e9f8
  3. 2mo ago Changed 696988c61199
  4. 2mo ago First seen · 125 lines · 62 tokens per session scan A a8490032085c

Subscribe to this mod's changes

canonical-tag is a skill published in the GitHub repository kostja94/marketing-skills (1,146 stars, last pushed 23d ago), licensed MIT. It adds 62 tokens to every session and 1,510 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

canonical-tag compared with skills from other repositories

canonical-tag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
canonical-tagkostja94/marketing-skillsSkill1.1k23d agoMITA62Claude Code, Codex
SEO Content OptimizerNotysoty/openagentskillsSkill93mo agoMITA20Claude Code, Codex
newsletter-monetization-planneraaron-he-zhu/aaron-marketing-skillsSkill3.2ktodayApache-2.0A139Claude Code
conversion-value-mapperaaron-he-zhu/aaron-marketing-skillsSkill3.2ktodayApache-2.0A187Claude Code
inbox-placement-monitoraaron-he-zhu/aaron-marketing-skillsSkill3.2ktodayApache-2.0A166Claude Code
contract-helperaaron-he-zhu/aaron-marketing-skillsSkill3.2ktodayApache-2.0A87Claude Code
budget-optimizeraaron-he-zhu/aaron-marketing-skillsSkill3.2ktodayApache-2.0A78Claude Code