Hreflang Check 标志

Hreflang Check

社区
indranilbanerjee
hreflang-check

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

Add to TypingMind

概览

发布者indranilbanerjee
代码仓库digital-marketing-pro
技能名称hreflang-check
星标数
866
复刻数
138
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 indranilbanerjee 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Hreflang Check AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/hreflang-check
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro.git /tmp/digital-marketing-pro
mkdir -p .claude/skills
cp -r /tmp/digital-marketing-pro/skills/hreflang-check .claude/skills/hreflang-check
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Hreflang Check,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Hreflang Check。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Hreflang Check 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

/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.

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

常见问题

Hreflang Check AI 技能有什么作用?

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

为什么在 TypingMind 中使用 Hreflang Check?

因为您只需安装一次,就能搭配任何模型使用。Hreflang Check 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Hreflang Check?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/hreflang-check。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Hreflang Check?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Hreflang Check 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Hreflang Check 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Hreflang Check AI 技能免费吗?

是的。indranilbanerjee 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇