seo-hreflang

seo-hreflang is a skill for Claude Code from AgriciDaniel/claude-seo. It costs 71 tokens per session (3,096 once invoked), scanned A, original, MIT.

A checker and generator for hreflang tags, which tell search engines which language or regional version of a page to show. It supports tags in HTML, HTTP headers, and XML sitemaps.

In plain words
What is it for?
Use it to audit or create language and region tags, check return links between versions, validate canonical URLs, and add an x-default fallback.
Why use it?
It helps prevent broken links between translated or regional pages, invalid language codes, and missing fallback versions that can make international SEO signals fail.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the claude-seo plugin — 31 skills, 18 agents, 1 hook shipped together

Good fit Use it to audit or create language and region tags, check return links between versions, validate canonical URLs, and add an x-default fallback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agricidaniel/claude-seo/seo-hreflang
About the project

Claude SEO is an open-source Claude Code plugin that runs specialized agents and skills to audit websites across technical SEO, content quality, structured data, AI-search optimization, local and e-commerce SEO, and international SEO. SEO practitioners use it to produce prioritized recommendations based on primary-source guidance, with optional extensions for external data and crawling.

AgriciDaniel/claude-seo · 16,692 stars · on GitHub · claude-seo.md

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 AgriciDaniel/claude-seo --skill seo-hreflang
Clone the repo
git clone --depth 1 https://github.com/AgriciDaniel/claude-seo

Made for: Claude Code.

Or install claude-seo, the plugin that ships this one along with the rest of its 31 skills, 18 agents, 1 hook.

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 seo-hreflang

README.md
[![agentmods](https://agentmods.dev/badge/skills/agricidaniel/claude-seo/seo-hreflang/github.svg)](https://agentmods.dev/skills/agricidaniel/claude-seo/seo-hreflang)
Your own site
<a href="https://agentmods.dev/skills/agricidaniel/claude-seo/seo-hreflang"><img src="https://agentmods.dev/badge/skills/agricidaniel/claude-seo/seo-hreflang/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 seo-hreflang

Your own site · 80×15
<a href="https://agentmods.dev/skills/agricidaniel/claude-seo/seo-hreflang"><img src="https://agentmods.dev/badge/skills/agricidaniel/claude-seo/seo-hreflang.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,096 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. ✓ AI security review Fable 5.1 · 6 Sept 2026 📄 Read the review Third-party audits
  • Socket pass 11 May 2026
  • Snyk warn 11 May 2026
  • 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.00071 $0.03096
Opus 5 $0.00036 $0.01548
Sonnet 5 $0.00014 $0.00619
Haiku 4.5 $0.00007 $0.00310

Measured 12d ago against content hash b249aaad4273, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

seo-hreflang 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 12d 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

8 near-identical copies found in the catalogue:

skills/seo-hreflang/SKILL.md · 273 lines

How it starts

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

Hreflang & International SEO

Validate existing hreflang implementations or generate correct hreflang tags for multi-language and multi-region sites. Supports HTML, HTTP header, and XML sitemap implementations.

Validation Checks

1. Self-Referencing Tags

  • Every page must include an hreflang tag pointing to itself
  • The self-referencing URL must exactly match the page's canonical URL
  • Missing self-referencing tags cause Google to ignore the entire hreflang set

2. Return Tags

  • If page A links to page B with hreflang, page B must link back to page A
  • Every hreflang relationship must be bidirectional (A→B and B→A)
  • Missing return tags invalidate the hreflang signal for both pages
  • Check all language versions reference each other (full mesh)

3. x-default Tag

  • Recommended when a selector/fallback URL exists: designates the fallback page for unmatched languages/regions
  • Typically points to the language selector page or English version
  • Only one x-default per set of alternates
  • Must also have return tags from all other language versions

4. Language Code Validation

  • Must use ISO 639-1 two-letter codes (e.g., en, fr, de, ja)
  • An optional ISO 15924 script subtag is the documented, official mechanism for script: zh-Hant (Traditional) / zh-Hans (Simplified). Script may combine with a region, e.g. zh-Hans-US is valid (language + script + region).
  • Common errors:
    • eng instead of en (ISO 639-2, not valid for hreflang)
    • jp instead of ja (incorrect code for Japanese)
    • zh is valid but ambiguous for script-specific pages; prefer zh-Hans or zh-Hant when targeting a script

5. Region Code Validation

  • Optional region qualifier uses ISO 3166-1 Alpha-2 (e.g., en-US, en-GB, pt-BR)
  • Format: language-REGION (lowercase language, uppercase region)
  • A country code alone is invalid, you cannot specify a region without a language (Google's own bad example is be, which is actually the Belarusian language code, not Belgium).
  • Common errors:
    • en-uk instead of en-GB (UK is not a valid ISO 3166-1 region code)
    • EU / UN as a region (not valid ISO 3166-1 values)
    • es-LA (Latin America is not a country; use specific countries)
    • Region without language prefix

Read the full file on GitHub · 273 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 273 lines · 71 tokens per session scan A b249aaad4273

Subscribe to this mod's changes

seo-hreflang is a skill published in the GitHub repository AgriciDaniel/claude-seo (16,692 stars, last pushed 16d ago), licensed MIT. It adds 71 tokens to every session and 3,096 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

blog

Full-lifecycle blog engine with 31 sub-skills, 12 content templates, 5-category 100-point scoring, and 5 specialized agents. Routes user requests to the right sub-skill: writing, rewriting, analysis, outlines, audits, schema, charts, images, repurposing, AI citation SEO, FLOW framework prompts, topic-cluster…

AgriciDaniel/claude-blog · 202 tokens

blog-cluster

Semantic topic cluster planning and automated execution engine for claude-blog. Performs SERP-based keyword research, groups keywords by search intent and SERP overlap, builds a hub-and-spoke cluster architecture, generates an interactive SVG cluster map, and executes the full cluster by orchestrating blog-write calls…

AgriciDaniel/claude-blog · 135 tokens

blog-rewrite

Rewrite and optimize existing blog posts for Google SEO (May 2026 Core Update, March 2026 core/spam context, June 2026 spam context, E-E-A-T) and AI citation visibility as one SEO discipline. Full rewrite for both Google rankings AND AI citations. For AI-citation-only audit (no Google work), use blog-geo instead.…

AgriciDaniel/claude-blog · 176 tokens

blog-discourse

Research what people are actually saying about a topic in the last 30 days across Reddit, X / Twitter, YouTube, Hacker News, dev.to, Medium, and other public discourse platforms. API-free; uses WebSearch with platform-targeted site operators plus recency filters. Produces DISCOURSE.md (a structured brief) and JSON…

AgriciDaniel/claude-blog · 168 tokens

blog-seo-check

Post-writing SEO validation with pass/fail checklist covering title tag length and keyword placement, meta description quality, heading hierarchy and keyword density, internal/external link audit with anchor text analysis, canonical URL verification, Open Graph meta tags (og:title, og:description, og:image), Twitter…

AgriciDaniel/claude-blog · 137 tokens

blog-cannibalization

Detect keyword cannibalization across blog posts by extracting primary keywords from titles and headings, clustering semantically similar targets, and flagging posts competing for the same search intent. Supports local-only mode (grep-based) and DataForSEO API mode (Page Intersection endpoint at $0.01/call). Outputs…

AgriciDaniel/claude-blog · 106 tokens