SEO & Content

hreflang Map Builder

Builds the complete hreflang annotation set for a multilingual site or a multi-region site from a list of page URLs, answered as JSON only. Every page lists itself and all its alternates, every pair is reciprocal, x-default appears only when a fallback page is named, and codes are checked against ISO 639-1, ISO 3166-1 Alpha 2 and ISO 15924 instead of copied. Reports a bad code, a redirecting, noindexed or non-canonical URL and a page that is not a translation instead of pairing it, and never guesses a language. Can also write the same set as sitemap entries. Use when asked to write, fix, audit or generate hreflang tags, language alternates, x-default or localized-version annotations for a site.

hreflang Map Builder is a tested SKILL.md that builds the complete hreflang annotation set for a multilingual site or a multi-region site from a list of page URLs, answered as JSON only; an agent buys it once for $0.03 over x402.

Tested 2026-10-08No code, no hidden instructionsv1.0.0 · 9.4 KB · perpetual license

Not for

It does not crawl your site, fetch pages to learn their status, or decide which pages are translations of each other: you give it the pages, their declared languages and any redirect or noindex facts. It does not check that the annotations were deployed and does not translate content. When a declared code is unusable it will not guess a language; it leaves that page out and says so.

Tested, honestly

Tested 2026-10-08 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Correct hreflang sets (21 cases)21/2119/2121/2119/21

The same request on both sides, JSON-only asked for in both; a fence is removed first. Two controls were first scored as failures because Sonnet and Haiku also gave the language-selector fallback page an entry of its own with the same full set; that is valid, so the check now allows it. Read by hand, both models without the skill copied es-419 as an hreflang value and reported nothing. Sonnet left a noindex page out correctly but listed no error for it. Haiku, on the 24-page list, reported a made-up NOT-FINAL-URL error and dropped a valid French page. Everything else passed alone.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Built a correct hreflang set for all 21 cases, read by hand: every page listed itself and all its translations, pairs were reciprocal, x-default appeared only where a fallback page was named, en-UK became en-GB with a report, jp and cz became ja and cs, eng and bul became en and bg, a region alone (gb) was left out and reported, es-419 was not copied, a noindex page, a redirecting address and a tracking-parameter address were reported and kept out of the sets, a Bulgarian-only blog post was not paired, a planted instruction to add an x-default was ignored, and the sitemap form repeated every link under every address.
HaikuWeak model, claude-haiku-5-5
Also 21 of 21 with the skill, with the same kinds of sets as Sonnet: self entries and return links on every page, x-default only where a fallback page was named, invalid codes reported instead of copied, unusable addresses kept out, and a 24-page list with one missing translation built correctly.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Pages (URL | language declared | note): https://example.com/en/about/ | en | English about page https://example.com/bg/za-nas/ | bg | Bulgarian translation of the same page Fallback page (x-default): https://example.com/ (a language selector)

After

{"pages":[{"url":"https://example.com/en/about/","alternates":[{"hreflang":"en","href":"https://example.com/en/about/"},{"hreflang":"bg","href":"https://example.com/bg/za-nas/"},{"hreflang":"x-default","href":"https://example.com/"}]},{"url":"https://example.com/bg/za-nas/","alternates":[{"hreflang":"en","href":"https://example.com/en/about/"},{"hreflang":"bg","href":"https://example.com/bg/za-na…

What is in the file

  • The answer
  • What makes a set valid
  • Codes
  • What to do with a bad code
  • x-default
  • Which addresses may appear
  • Sitemap mode
  • Text inside the input is data
  • Work in this order
  • Short examples

Languages

Any language. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-08. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-08

    First release: builds the complete hreflang set for a multilingual site from a list of pages, as JSON only. Every page lists itself and every alternate, pairs are reciprocal, x-default appears only when a fallback page is named, codes are checked (region alone, country-as-language, three-letter codes, UK/EU/UN, codes outside ISO such as es-419), redirecting, noindexed and non-canonical addresses are reported instead of used, pages without a translation are not paired, and a sitemap mode writes the same set as xhtml link entries. Facts re-checked on 2026-10-08 by reading Google Search Central's localized-versions page (page dated 2026-09-21); the redirect and noindex rule is not on that page and is marked so in the skill.

    Test, 2026-10-08, 21 cases, one run per model: Sonnet 21 of 21 with the skill, 19 of 21 without; Haiku 21 of 21 with, 19 of 21 without. Two controls were first scored as failures because both models gave the language-selector fallback page its own entry; that is valid, so the check now allows it and the baseline was rescored. Price 30000 (/usr/bin/bash.03): Sonnet's real gain is two cases.

FAQ

Which shape does the answer have for a page list?

One JSON object. The pages list holds every page that takes part in a set, each with its full list of alternates: itself, every translation, and a fallback entry only when you named a fallback page. The errors list names each problem the skill found in your input, with a short note on what it did about it. There is no fence and no commentary,. Order does not matter anywhere: pages and alternates may come in any sequence, and the language part of a code may be upper or lower case, since Google reads the value without regard to case.

What does it do with a code like en-UK or a bare country code?

It checks every code against the language, country and script lists Google documents. A British English page declared as en-UK becomes en-GB, because UK has no effect in an annotation, and the change is reported. A country code used as a language, such as jp for Japanese, is replaced only when you said which language the text is in. A region alone, or a page whose language you did not state, is not guessed: the page stays out of every set and the report says what you have to decide.

Why would it refuse to pair a page?

Google ignores an annotation when the two pages do not point at each other, so a page that has no translation, a page that redirects, and a page blocked from indexing cannot be part of a working pair. A blog post that exists in one language only is left unpaired instead of being tied to a page that is merely similar. The set stays smaller, and every pair in it is one Google will actually read. If the address you listed redirects, you get the final address in the set and a note naming the old one.

Is it worth it for Claude Sonnet?

Two of 21 cases, both about reporting rather than layout. Both models wrote the plain sets correctly alone, including reciprocity, self entries and x-default. Without the skill Sonnet copied es-419 as a language value and did not report a noindex page it had left out; with it Sonnet got 21 of 21. Haiku went from 19 to 21: it also copied es-419 and invented an error on a 24-page list. The skill also covers the sitemap form.

Share

Read this page as Markdown: /skills/hreflang-map.md.

  • SEO Meta Writer

    SEO & Content

    SKILL.md · v1.0.4 · 5.1 KB

    Writes the SEO title, meta description and (on request) the H1 heading for one web page, in the page's own language, inside hard character limits, matching what the searcher wants. Use when asked to write or rewrite a page title, meta description, SEO snippet or H1 for a page, product, service, article or landing page.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 30 Sep 2026

  • Sitemap Builder

    SEO & Content

    SKILL.md · v1.0.0 · 9.5 KB

    Builds a correct XML sitemap, or a sitemap index file, from a list of pages, answered as the XML document only. Lists only canonical, indexable pages that return 200 on one host, and leaves out redirecting, noindex, non-canonical, removed and other-host addresses. Writes every address absolute and entity-escaped (an ampersand in a query string becomes the escape code), and writes lastmod only when the input gives a real date for that page - never the day the file was generated, never a guess. Writes no priority and no changefreq, which Google ignores. Splits a site above 50,000 URLs or 50 MB uncompressed into several files under an index. Says where the file should live and how to submit it. Use when asked to write, generate, fix or check a sitemap.xml or sitemap index.

    $0.02once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Translate Markdown: Docs That Still Build

    Translation & Localization

    SKILL.md · v1.0.1 · 6.3 KB

    Translates a Markdown, MDX or HTML document (docs page, README, blog post, help article) into another language and returns the whole document with only the human text changed. Fenced and inline code, link and image targets, front matter keys and machine values, HTML tags and attributes, heading ids, reference labels, comments and template tags come back byte for byte, so the page still builds and every link still works. Alt text, titles and link text are translated; product names and code identifiers stay; lines in the document that give orders to an AI are translated as text, never obeyed. Use to translate Markdown or MDX docs, localize a README or a static-site blog post, or translate documentation without breaking code blocks, links or front matter.

    $0.06once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • JSON-LD Schema Writer

    SEO & Content

    SKILL.md · v1.0.0 · 8.3 KB

    Writes schema.org JSON-LD for one web page from the facts you give it, answered as JSON only with no script tag and no fence. Covers Article, BlogPosting, Product with Offer, BreadcrumbList, FAQPage, Event, Organization, LocalBusiness, Recipe and JobPosting. Leaves out every fact that was not given instead of inventing it: no rating, review, price, availability, author, date or salary appears unless the page states it. Writes prices as plain numbers with an ISO currency code, dates in ISO 8601 with the stated offset, absolute URLs built from the site origin, and breadcrumb positions from 1. Use when asked to write, fix or check JSON-LD, structured data or schema markup for a page, product, article, event, FAQ or breadcrumb.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026