Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes.

MITAuto-check passedMarketing & SEO

Install Hreflang Check

skills CLI
$ npx skills add indranilbanerjee/digital-marketing-pro --skill hreflang-check -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install indranilbanerjee/digital-marketing-pro hreflang-check --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hreflang-check .claude/skills/hreflang-check && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hreflang-check
GitHub stars
862
Used in
1 other repo
Token cost
~3.1k tokens
SKILL.md length
1,700 words
Files
1
Skills in repo
162
Repo updated
First seen
Licence
MIT

At a glance

Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes.

  • Works in 6 steps: Load brand context: Read… → Obtain hreflang data: If a URL is… → Parse all hreflang annotations: Extract… → …
  • Tasks that involve Technical SEO
  • SKILL.md covers Purpose, Input Required, Process and Output, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hreflang Check is an agent skill from indranilbanerjee/digital-marketing-pro. Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes. "check our hreflang tags"

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Marketing & SEO, covering Technical SEO. The repository describes itself as: An open-source AI marketing operating system for strategy, SEO, AEO/GEO, paid media, content, CRM, and analytics - grounded in brand context, human approval, and verifiable… The licence is MIT.

When your agent uses it

  • Tasks that involve Technical SEO

Example prompts

  • “check our hreflang tags”
  • “/hreflang-check”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Load brand context: Read ~/.claude-marketing/brands/_active-brand.json for the active slug, then load…
  2. Obtain hreflang data: If a URL is provided, note that actual website crawling requires external tooling — the plugin does not perform HTTP…
  3. Parse all hreflang annotations: Extract every hreflang annotation from the provided data. For each page, build a map of: the page's own…
  4. Check each page for hreflang correctness: For every page with hreflang annotations, run the following checks
  5. Cross-reference against brand language configuration: Compare the set of language-region codes found in hreflang annotations against the…
  6. Generate prioritized fix list with code snippets: For every issue found, generate the specific corrected hreflang code. For missing…

What it can do on your machine

Read from SKILL.md and the folder at commit 9e949f3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hreflang Check loads about 3.1k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 1,700 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from indranilbanerjee/digital-marketing-pro at commit 9e949f3, republished under its MIT licence (© indranilbanerjee). 1,700 words, ~3,138 tokens.

Download SKILL.mdSave it as .claude/skills/hreflang-check/SKILL.md (or your agent's skills folder).
name
hreflang-check
description
Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes. "check our hreflang tags"

/digital-marketing-pro:hreflang-check

Purpose

Audit hreflang tag implementation for multilingual and multi-regional SEO. Hreflang annotations tell search engines which language and regional version of a page to serve to which audience — when implemented incorrectly, the wrong language version appears in search results, pages compete against each other for the same queries, and international organic traffic is lost to mis-served content. This command performs a thorough technical audit of hreflang implementation, checking that all language versions are properly cross-referenced with correct annotations, that every page references itself, that references are bidirectional (if page A points to page B, page B points back to page A), that language-region codes are valid, that x-default fallback is configured, and that no orphaned references point to non-existent pages.

Critical for any brand operating multilingual or multi-regional websites. Hreflang errors are among the most common international SEO issues — they are invisible to users, rarely caught in manual QA, and silently degrade search performance across every affected market. Even a single missing bidirectional reference can prevent search engines from correctly associating language versions, causing the wrong page to rank or duplicate content signals to suppress both versions. This command surfaces every implementation error with specific fix instructions and corrected code snippets.

Input Required

The user must provide (or will be prompted for):

  • Website URL or sitemap URL: The starting point for the audit. Can be a single page URL (audits hreflang on that page and its referenced alternates), a sitemap URL (audits all pages listed in the sitemap), or a list of specific page URLs to check. Note: the plugin does not crawl websites directly — if a URL is provided, the user will be guided to provide the HTML source or hreflang data for analysis. Alternatively, the user can paste HTML source, hreflang tag sets, or exported hreflang data directly
  • Specific page URLs to check (optional): A subset of pages to focus the audit on — useful for auditing a specific section (e.g., all product pages, all blog posts) rather than the entire site. If omitted, all pages with hreflang annotations in the provided data are audited
  • Expected language-region codes (optional): The set of language-region codes that should appear in hreflang annotations (e.g., en-US, de-DE, fr-FR, es-ES, ja-JP). Defaults to the brand's configured languages from the language configuration in profile.json. Used to flag missing language versions — if the brand targets de-DE but no hreflang for de-DE exists on a page, that is flagged as a gap

Process

  1. Load brand context: Read ~/.claude-marketing/brands/_active-brand.json for the active slug, then load ~/.claude-marketing/brands/{slug}/profile.json. Load the language configuration to determine expected languages — primary language, secondary languages, and content languages. These form the expected hreflang set that every page should ideally reference. Apply compliance rules for target markets (skills/context-engine/compliance-rules.md) and industry context. Also check for guidelines at ~/.claude-marketing/brands/{slug}/guidelines/_manifest.json — if present, load any international SEO guidelines. Check for agency SOPs at ~/.claude-marketing/sops/. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults.
  2. Obtain hreflang data: If a URL is provided, note that actual website crawling requires external tooling — the plugin does not perform HTTP requests to arbitrary websites. Guide the user to provide hreflang data in one of these formats: (a) raw HTML source of pages containing <link rel="alternate" hreflang="..." href="..."> tags, (b) HTTP header hreflang annotations, (c) XML sitemap with xhtml:link hreflang entries, (d) a structured export from an SEO tool (Screaming Frog, Sitebulb, Ahrefs) listing hreflang annotations per URL, or (e) a manually compiled list of URL-to-language mappings. If the user has already provided HTML or hreflang data inline, proceed directly to parsing.
  3. Parse all hreflang annotations: Extract every hreflang annotation from the provided data. For each page, build a map of: the page's own URL, and every hreflang attribute with its associated href URL. Track the source of each annotation (HTML <link> tag, HTTP header, or XML sitemap) since implementation method affects how fixes should be applied. Build a complete cross-reference matrix: for every page, which other pages does it reference, and in which languages.
  4. Check each page for hreflang correctness: For every page with hreflang annotations, run the following checks:
    • (a) Self-referential tag present: Every page must include a hreflang annotation pointing to itself with its own language-region code. Missing self-referential tags are the most common hreflang error and cause search engines to ignore the entire hreflang set for that page. Severity: critical.
    • (b) Bidirectional references: If page A in en-US references page B in de-DE, then page B must also reference page A in en-US. Check every reference pair for bidirectional consistency. One-directional references are treated as errors by search engines and may cause the entire annotation set to be disregarded. Severity: critical.
    • (c) Valid language-region codes: Validate every hreflang value against ISO 639-1 for the language component and ISO 3166-1 Alpha-2 for the optional region component. Common errors: using en-UK instead of en-GB, using three-letter codes like eng instead of en, using country codes alone like US without the language prefix. Severity: critical for invalid codes (search engines ignore them), warning for non-standard but parseable codes.
    • (d) x-default tag present: Check that an x-default hreflang annotation exists, pointing to the fallback page for users whose language does not match any specific hreflang. Typically points to the English version or a language selector page. Missing x-default means users in non-targeted regions may see an arbitrary language version. Severity: warning.
    • (e) No duplicate language codes: Check that each page does not have multiple hreflang annotations with the same language-region code pointing to different URLs. Duplicate codes create ambiguity and search engines may ignore all annotations for that language. Severity: critical.
    • (f) URLs are absolute: Verify all href values in hreflang annotations are absolute URLs (starting with https:// or http://), not relative paths. Relative URLs in hreflang are invalid per the specification. Severity: critical.
    • (g) URL consistency: Check that all referenced URLs use consistent protocols (all HTTPS or all HTTP, not mixed), consistent www/non-www prefixes, and consistent trailing slash conventions. Inconsistencies may cause search engines to treat references as pointing to different pages. Severity: warning.
  5. Cross-reference against brand language configuration: Compare the set of language-region codes found in hreflang annotations against the brand's configured languages (from profile.json language config or user-provided expected codes). Flag any configured language that is missing from hreflang annotations — this means a language the brand actively targets has no hreflang support, so search engines cannot properly route users to that language version. Also flag any hreflang language codes that are not in the brand's configuration — these may be legitimate (languages configured elsewhere) or may indicate stale annotations for discontinued language versions.
  6. Generate prioritized fix list with code snippets: For every issue found, generate the specific corrected hreflang code. For missing self-referential tags: provide the exact <link rel="alternate" hreflang="xx-XX" href="https://..."> tag to add. For bidirectional mismatches: provide the tags that need to be added to the page missing the back-reference. For invalid codes: provide the corrected code with the valid language-region value. For missing x-default: provide the recommended x-default tag with the appropriate fallback URL. Group fixes by page so implementation can be done page-by-page, and also group by issue type so systemic problems (e.g., "self-referential tags missing on all 47 blog posts") can be addressed with a single template fix rather than 47 individual corrections.
Show full SKILL.md (484 more words)Show less

Output

A structured hreflang audit report containing:

  • Hreflang audit score: Overall implementation quality score (0-100) reflecting the ratio of correct annotations to total annotations, weighted by issue severity — critical issues reduce the score significantly, warnings moderately, and info items minimally
  • Audit summary statistics: Total pages audited, total hreflang annotations found, total unique language-region codes detected, total issues found (broken down by critical/warning/info), and percentage of pages with fully correct hreflang implementation
  • Issues by type: Grouped findings for each check category — missing self-referential tags (count and affected pages), orphaned references (references pointing to non-existent or non-responding pages), invalid language-region codes (with the invalid code and correction), missing x-default (pages without fallback configuration), bidirectional mismatches (page pairs where the reference is one-directional), duplicate language codes (pages with conflicting annotations for the same language), relative URLs (annotations using non-absolute paths), and URL consistency issues (mixed protocols, www/non-www, trailing slash mismatches)
  • Specific fix recommendations: For every issue, the exact corrected hreflang code snippet ready for implementation — the user can copy the corrected <link> tag or sitemap entry directly into their page. Fixes are grouped both by page (for page-level implementation) and by issue type (for systemic fixes across the site)
  • Language coverage matrix: A table showing pages (rows) versus language-region codes (columns), with each cell indicating whether a correct hreflang annotation exists (pass), exists with issues (warning), or is missing (gap). Immediately visualizes which pages have complete hreflang coverage and which have holes
  • Brand language configuration comparison: Side-by-side comparison of the brand's configured languages versus the languages found in hreflang annotations — highlighting languages that the brand targets but that have no hreflang support (missing coverage), and hreflang languages that are not in the brand's configuration (potentially stale or unmanaged)
  • Implementation method notes: Based on the source of annotations (HTML link tags, HTTP headers, XML sitemap), provide implementation-specific guidance for applying fixes — where to add tags in the HTML <head>, how to configure HTTP headers, or how to update the XML sitemap with xhtml:link entries

Agents Used

  • seo-specialist — Leads the hreflang technical audit. Parses hreflang annotations from HTML, HTTP headers, and XML sitemaps. Executes all seven validation checks (self-referential, bidirectional, valid codes, x-default, duplicate codes, absolute URLs, URL consistency) against international SEO specifications. Generates corrected hreflang code snippets for every issue found. Assesses the SEO impact of hreflang errors on international search visibility and provides prioritization guidance based on which fixes will have the greatest impact on organic traffic routing. References skills/technical-seo/international-seo.md for hreflang specification details and best practices
  • localization-specialist — Validates language-region codes against ISO 639-1 and ISO 3166-1 standards, cross-references hreflang language coverage against the brand's configured languages to identify coverage gaps, and flags language codes that may be technically valid but inappropriate for the brand's target markets (e.g., generic zh instead of zh-Hans or zh-Hant for distinct Chinese market targeting). Provides language-specific context for the coverage matrix and recommends language-region granularity based on the brand's market strategy

© indranilbanerjee, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/hreflang-check of indranilbanerjee/digital-marketing-pro.

Open the folder on GitHubat commit 9e949f3

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in indranilbanerjee/digital-marketing-pro, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Hreflang Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hreflang Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hreflang Check this skillindranilbanerjee/digital-marketing-pro8621 repos~3.1kAutomated safety check: PassMIT
Hreflang and International SEOAgriciDaniel/claude-seo19k5 repos~3.4kAutomated safety check: PassMIT
Google SEO APIsAgriciDaniel/claude-seo19k1 repos~4.2kAutomated safety check: PassMIT
GEO-First SEO Audit Toolzubair-trabzada/geo-seo-claude11k—~2.8kAutomated safety check: NotesMIT
SEO Optimizerailabs-393/ai-labs-claude-skills4551 repos~3.2kAutomated safety check: PassMIT
SEO Drift MonitorAgriciDaniel/claude-seo19k1 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Hreflang and International SEO

    AgriciDaniel/claude-seo

    Audits, validates and generates hreflang tags for multi-language and multi-region sites in HTML, HTTP headers or XML sitemaps, flagging common code and return-tag mistakes.

    19k GitHub starsUsed in 5 repos~3.4k tokens
    Marketing & SEOAuto-check passed
  • Google SEO APIs

    AgriciDaniel/claude-seo

    Pulls real Google data for SEO work: Search Console, PageSpeed Insights, CrUX field data, the Indexing API and GA4 organic traffic, through /seo google commands.

    19k GitHub starsUsed in 1 repo~4.2k tokens
    Marketing & SEOAuto-check passed
  • GEO-First SEO Audit Tool

    zubair-trabzada/geo-seo-claude

    Audits a website for AI search visibility across ChatGPT, Claude, Perplexity and Google AI Overviews while checking traditional SEO, schema and E-E-A-T content quality.

    11k GitHub stars~2.8k tokensUpdated yesterday
    Marketing & SEOAuto-check: notes
  • SEO Optimizer

    ailabs-393/ai-labs-claude-skills

    This skill should be used when analyzing HTML/CSS websites for SEO optimization, fixing SEO issues, generating SEO reports, or implementing SEO best practices.

    455 GitHub starsUsed in 1 repo~3.2k tokens
    Marketing & SEOAuto-check passed
  • SEO Drift Monitor

    AgriciDaniel/claude-seo

    Captures baselines of a page's SEO-critical elements, compares later snapshots against them and flags regressions by severity, like version control for on-page SEO.

    19k GitHub starsUsed in 1 repo~1.9k tokens
    Marketing & SEOAuto-check passed
  • llms.txt Analyzer and Generator

    zubair-trabzada/geo-seo-claude

    Validates an existing llms.txt file or crawls a site to generate a new one, following the format rules for a root-level Markdown file aimed at AI systems.

    11k GitHub starsUsed in 2 repos~3.9k tokens
    Marketing & SEOAuto-check: notes

More from indranilbanerjee/digital-marketing-pro

All 162 skills in this repo
  • Import Template

    indranilbanerjee/digital-marketing-pro

    Import a deliverable template as a reusable placeholder template per brand.

    862 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Ab Test Plan

    indranilbanerjee/digital-marketing-pro

    Plan an A/B test by script: sample size per variant, days to run, stopping rules.

    862 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Aeo Audit

    indranilbanerjee/digital-marketing-pro

    Run a one-time AEO audit of six AI answer engines, scored per surface.

    862 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Agent Readiness Audit

    indranilbanerjee/digital-marketing-pro

    Audit agent readiness by script: AI-crawler rules, product schema, no-JS HTML, feeds.

    862 GitHub starsUsed in 1 repo~3.7k tokens
    Auto-check passed
  • Backlink Gap

    indranilbanerjee/digital-marketing-pro

    Find backlink gap domains linking to competitors, not you, scored by script.

    862 GitHub starsUsed in 1 repo~2.6k tokens
    Auto-check passed
  • C2pa Metadata

    indranilbanerjee/digital-marketing-pro

    Embed C2PA provenance in AI-generated images, video or PDF by script.

    862 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed

Categories

Questions about Hreflang Check

What does Hreflang Check do?

Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes. Hreflang Check is an agent skill from indranilbanerjee/digital-marketing-pro. Validate hreflang, alternate-language link tags and x-default from pasted HTML or sitemaps, with fixes.

When should I use Hreflang Check?

Hreflang Check fits situations like: tasks that involve Technical SEO.

How do I install Hreflang Check in Claude Code?

Run `npx skills add indranilbanerjee/digital-marketing-pro --skill hreflang-check -a claude-code`. Or copy the skill folder (skills/hreflang-check in indranilbanerjee/digital-marketing-pro) into .claude/skills/hreflang-check in your project. Claude Code loads it when a task matches its description.

How do I install Hreflang Check in Codex?

Run `npx skills add indranilbanerjee/digital-marketing-pro --skill hreflang-check -a codex`. Or copy the skill folder (skills/hreflang-check in indranilbanerjee/digital-marketing-pro) into .agents/skills/hreflang-check in your project. Codex loads it when a task matches its description.

Can I use Hreflang Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add indranilbanerjee/digital-marketing-pro --skill hreflang-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hreflang-check, .gemini/skills/hreflang-check, .github/skills/hreflang-check and .opencode/skills/hreflang-check in your project.

What does Hreflang Check need to run?

SKILL.md names no scripts, command-line tools or credentials: Hreflang Check is instructions for the agent only.

Does Hreflang Check access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hreflang Check safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hreflang Check use?

Hreflang Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hreflang Check use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hreflang Check?

Skills that share tags, products or a category with Hreflang Check: Hreflang and International SEO (AgriciDaniel/claude-seo, 19k stars), Google SEO APIs (AgriciDaniel/claude-seo, 19k stars), GEO-First SEO Audit Tool (zubair-trabzada/geo-seo-claude, 11k stars) and SEO Optimizer (ailabs-393/ai-labs-claude-skills, 455 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hreflang Check?

indranilbanerjee (a GitHub user) maintains it in indranilbanerjee/digital-marketing-pro, which has 862 GitHub stars. The repository holds 162 skills in this directory. The repository was last updated on October 9, 2026.

Source: indranilbanerjee/digital-marketing-pro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.