Logo Hydrogen Markets Localization

Hydrogen Markets Localization

Tổ chức
Weaverse
hydrogen-markets-localization

Triển khai hoặc rà soát bản địa hóa thị trường Shopify Hydrogen — dùng khi thêm thị trường, tuyến theo ngôn ngữ, bản dịch, hreflang, RTL hoặc hành vi giỏ hàng, tài khoản và thanh toán đã bản địa hóa trong Hydrogen + Weaverse.

Add to TypingMind

Tổng quan

Nhà phát hànhWeaverse
Kho mãshopify-hydrogen-skills
Tên kỹ nănghydrogen-markets-localization
Sao
87
Bản fork
26
Tệp đi kèm
1
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Weaverse công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Hydrogen Markets Localization trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Weaverse/shopify-hydrogen-skills/tree/main/skills/hydrogen-markets-localization
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Weaverse/shopify-hydrogen-skills.git /tmp/shopify-hydrogen-skills
mkdir -p .claude/skills
cp -r /tmp/shopify-hydrogen-skills/skills/hydrogen-markets-localization .claude/skills/hydrogen-markets-localization
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Hydrogen Markets Localization trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Hydrogen Markets Localization ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Hydrogen Markets Localization với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Hydrogen Markets & Localization

Implement or review market localization as one end-to-end contract. A locale switch is incomplete until routing, Shopify context, Weaverse content, document metadata, navigation, commerce, accounts, SEO, and production configuration agree.

Live documentation

Run these from this skill's own folder. The helpers ship inside the sibling shopify-hydrogen skill, so ../shopify-hydrogen/scripts/ exists whenever the whole pack is installed.

If you installed this skill on its own, that folder is absent and the commands below fail with MODULE_NOT_FOUND. Add the helpers once:

bash
npx skills add Weaverse/shopify-hydrogen-skills --skill shopify-hydrogen

The references/ files in this skill remain a usable offline fallback if you would rather not install it.

Check current contracts before changing framework or platform behavior:

bash
node ../shopify-hydrogen/scripts/search_shopify_docs.mjs "Hydrogen localization Shopify Markets i18n country language"
node ../shopify-hydrogen/scripts/search_shopify_docs.mjs "Hydrogen Customer Account logout postLogoutRedirectUri"
node ../shopify-hydrogen/scripts/search_shopify_docs.mjs "Hydrogen SEO canonical hreflang sitemap"
node ../shopify-hydrogen/scripts/search_weaverse_docs.mjs "localization Translation Manager locale"

Use repository references only as an offline fallback. Never infer current Shopify or Weaverse APIs from examples in this skill.

Core contract

  • Derive every supported market from one merchant-specific allowlist. Do not copy another storefront's market list.
  • Keep one canonical public market identity: language, country, path prefix, hreflang, direction, currency, and any verified provider or bundle-language override.
  • Accept only configured locale prefixes. Reject invented locale-shaped prefixes such as an unsupported xx-yy, but preserve ordinary first-segment slugs.
  • Keep the selected market through SSR, hydration, links, forms, redirects, React Router data requests, cart mutations, account flows, logout, and checkout.
  • Emit canonical and hreflang entries only for routes proven equivalent in every advertised market. Omit uncertain alternates.
  • Treat Shopify Markets enablement and readback as release prerequisites. Application configuration cannot make an unavailable Shopify market real.

Procedure

1. Trace before editing

Map the complete request path and every consumer of locale state:

  1. URL parser and route tree.
  2. createHydrogenContext Storefront i18n.
  3. Weaverse client/storefront i18n and loadPage({locale}).
  4. Root loader, <html lang> and <html dir>.
  5. Link helpers, forms, server redirects, Storefront redirects, and .data routes.
  6. Cart creation/mutations, buyer identity, country selector, and checkout redirect.
  7. Customer Account login, unauthorized redirect, and logout URI.
  8. Canonical, hreflang, sitemap, robots, and CMS SEO composition.
  9. Translation Manager payloads, bundled translations, legacy settings, and Studio design-mode preview.

Run caller/reference sweeps before removing old routes, settings, helpers, aliases, or translation readers. Remove a legacy path only after the canonical path covers every caller.

2. Establish one market model

Use one immutable configuration consumed by routing, context creation, selectors, SEO, and tests. Require exactly one default market with an empty prefix; normalize other prefixes consistently. Model RTL explicitly instead of deriving direction ad hoc in components.

Keep public locale identity separate from provider identity when evidence requires it. Shopify may require a provider language enum while Weaverse translation lookup requires the public language-country key. Pass each boundary the identity it actually consumes; do not mutate one shared object until both happen to work.

Make path helpers idempotent and segment-aware. Handle React Router data-route suffixes without treating them as part of the locale. Preserve query strings where the user flow requires them.

To add one market, change the canonical allowlist first, then prove every derived consumer updates without a second market table. Add a translation bundle only for a language or script not already covered. A second manual locale edit is evidence to consolidate configuration, not a normal rollout step.

3. Preserve market state across the app

  • Set server-rendered and hydrated lang and dir from the same resolved market.
  • Localize internal links and action URLs from the active URL, not a stale default loader value.
  • Delocalize before resolving market-neutral Shopify redirects, then relocalize same-origin targets. Preserve external redirects unchanged. Replace the active redirect header; never append a rewritten target beside the original.
  • Sync cart buyer identity country on cart creation and every mutation path that can enter checkout.
  • Accept client redirect targets only when they are valid app-relative paths beginning with exactly one /. Reject schemes, protocol-relative forms, backslashes, control characters, and parse failures; fall back to the localized cart route.
  • Send Customer Account logout to the localized home. Derive the required allowlist of logout URIs, read back current Customer Account API configuration, and require explicit owner approval before registering or changing URIs.

4. Keep SEO truthful

Build one canonical URL for the current market and prevent CMS metadata from adding a second. Generate hreflang only from an explicit equivalence rule: invariant routes may qualify; localized handles, unpublished resources, and uncertain CMS pages do not. Render-check the framework's x-default form instead of assuming a helper flag produces valid markup. Do not fabricate sitemap alternates to make coverage look complete.

5. Define translation precedence

Verify the actual readers and tests, then enforce this precedence where each source exists:

  1. Live Studio design-mode override.
  2. Persisted Translation Manager override.
  3. Genuine legacy merchant setting retained for migration compatibility.
  4. Bundled/static translation.

Resolve each source by these rules:

  • Use own-property presence checks, not truthiness.
  • Record the historical default shipped by every migrated setting. A persisted value still equal to that default is not proven merchant intent and must fall through.
  • Treat inherited values and unpersisted schema defaults as absent.
  • Treat an explicitly stored empty string as "clear this copy"; it must not fall through.
  • Keep bundled copy separate from merchant-override provenance.
  • Delete legacy settings and bypass props only after every rendering surface uses the shared reader.

6. Prove platform configuration

For every configured market, probe the production Shopify boundary and read back the effective country, language, and currency. Fail the release when Shopify silently falls back. Also verify:

  • Weaverse receives the public locale key used by Translation Manager.
  • Translation Manager theme-key sync is current and published overrides win.
  • Every localized Customer Account logout URI is allowed.
  • Demo/project sync, CI, deployment, and live storefront state correspond to the tested commit.

Keep production proof read-only by default. Before changing Shopify, Customer Account, Weaverse, cart, session, or checkout state, confirm the exact environment, identity, scope, and values and obtain explicit owner approval. Use dedicated test identities and never place a paid order for localization verification.

AI-agent execution path

The Weaverse Shopify Admin API proxy is a scoped authority bridge. Verify its current mounted route before use; the Builder implementation exposes:

  • POST https://studio.weaverse.io/api/admin-graphql with a GraphQL query or mutation and variables.
  • Authorization: Bearer <WEAVERSE_API_KEY> using a shop-scoped token of type shopify or content_api; agent_cli tokens are rejected.
  • Shopify operations limited to the connected Weaverse app installation and scopes the merchant granted in Weaverse Dashboard → Settings → Shopify Admin API Proxy → Manage Scopes.
  • A proxy limit of 1000 requests per hour per token and a 15-second query timeout.

This is real Shopify Admin access, but not unqualified access to every Shopify resource. Request the minimum scopes required for the verified operation. Storefront API access proves effective storefront behavior but does not replace Admin authority.

Execute in this order:

  1. Discover capabilities. Inspect repository routes/scripts and mounted tools. Fetch current authoritative Shopify/Weaverse documentation. Record the exact GraphQL operation or Admin UI step for each read and write; never invent a mutation, field, endpoint, or assumed capability. Do not claim that Markets settings, enabled languages, countries/currencies, or Customer Account logout URLs are mutable until the current Shopify Admin GraphQL schema or authoritative docs prove the exact operation.
  2. Prepare the key safely. Put WEAVERSE_API_KEY in an untracked server-only environment file with mode 0600, or use an approved credential binding. Never put it in client code, prompts, documentation, URLs, command arguments, or logs.
  3. Read identity and scope. Through the verified proxy, run a harmless current-schema identity/shop read and inspect the granted app scopes before mutation. Fail closed on the wrong shop, missing minimum scope, wrong token type, ambiguous target, rate-limit exhaustion, or timeout.
  4. Draft a reviewed mutation plan. List current and desired values, exact target IDs, verified GraphQL operation or Admin steps, required scopes, idempotency predicate, no-op behavior, rollback, publish boundary, and exact readback. Require explicit owner approval immediately before every external write; call out destructive or high-impact changes separately.
  5. Mutate idempotently. Re-read preconditions, skip already-correct state, and apply only the approved delta. Inspect HTTP/proxy errors, top-level GraphQL errors, and mutation payload userErrors; any one means the write is not proven. Stop on drift, fallback, partial failure, or an unexpected response.
  6. Read back exactly. Use an independent query to compare every approved country, language, currency, market, locale key, and verified logout URL with the plan. Do not treat an accepted mutation response as proof.
  7. Gate publication. Present the complete readback and request explicit publish/deploy approval. Publishing, deploying, or enabling a market is a separate consequential action.
  8. Verify after publish. Exercise the approved route matrix and confirm rendered lang/dir, locale-preserving navigation, cart buyer identity, checkout market/currency, canonical/hreflang, sitemap policy, Translation Manager output, and deployed revision. Redact sensitive URL/query/session values from evidence.

If the key, minimum Shopify scopes, or a verified mutation is unavailable, finish all reachable code and read-only checks, mark the corresponding production setup unproven, and produce the exact admin handoff in the verification checklist. Never claim the market is enabled or end-to-end localization succeeded.

Verification

Read references/verification-checklist.md and execute only the checks applicable to the storefront. Start with focused regressions, then exercise the real dev server and production boundaries. Keep market lists and expected currencies merchant-specific.

Related skills

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Hydrogen Markets Localization làm được gì?

Triển khai hoặc rà soát bản địa hóa thị trường Shopify Hydrogen — dùng khi thêm thị trường, tuyến theo ngôn ngữ, bản dịch, hreflang, RTL hoặc hành vi giỏ hàng, tài khoản và thanh toán đã bản địa hóa trong Hydrogen + Weaverse.

Vì sao nên dùng Hydrogen Markets Localization trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Hydrogen Markets Localization là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Hydrogen Markets Localization trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Weaverse/shopify-hydrogen-skills/tree/main/skills/hydrogen-markets-localization. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Hydrogen Markets Localization?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Hydrogen Markets Localization với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Hydrogen Markets Localization với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Hydrogen Markets Localization có miễn phí không?

Kỹ năng này được Weaverse phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇