sfnext-seo
БесплатноБез исполняемых скриптовНе проверенStorefront Next SEO and AEO/GEO: the SeoMeta component (title, description, noIndex, Open Graph, X cards), JsonLd structured data, canonical URLs and the…
от SalesforceCommerceCloud★ 58 звёзд на GitHubОб этом скилле
Storefront Next SEO
In-project references: docs/README-SEO.md, docs/README-AEO-GEO.md, docs/README-MULTI-SITE.md (URL Config), docs/README-MULTI-DOMAIN.md, docs/README-BASE-PATH.md, docs/migrations/seo-url-rules/README.md. Read them for depth; this skill is the task map.
Page metadata: SeoMeta
import { SeoMeta } from '@/components/seo-meta';
<SeoMeta title={t('meta.title', { defaultValue: 'My Page' })} description={t('meta.description', { defaultValue: '...' })} />
<SeoMeta title="Checkout" noIndex /> {/* private/transactional pages */}
<SeoMeta rawTitle title="Store Name" /> {/* no " | Site Name" suffix */}
<SeoMeta title={name} openGraph={{ type: 'product', url: pageUrl, image }} />
Props (verified in src/components/seo-meta/index.tsx): title, rawTitle, description, noIndex, siteName, twitter, openGraph. Open Graph input auto-derives X card tags unless twitter is set. Use noIndex for cart, checkout, account, and other non-public pages. Root-level canonical and hreflang descriptors come from src/utils/seo.ts and src/utils/canonical-url.ts; routes do not add them.
Structured data: JsonLd
import { JsonLd } from '@/components/json-ld';
<JsonLd data={productSchema} id="product-schema" nonce={nonce} />
Pass the CSP nonce so the inline script is allowed. Builders live in src/utils/product-schema.ts, category-schema.ts, schema-url.ts. PDP emits Product; PLP emits CollectionPage + ItemList (see docs/README-AEO-GEO.md).
One URL everywhere
Canonical <link>, og:url and JSON-LD url must agree. In loaders:
import { buildSeoPageUrl } from '@/lib/seo/page-url.server';
import { redirectToCanonicalPath } from '@/lib/seo/canonical-redirect.server';
redirectToCanonicalPath(requestUrl); // 301 for trailing slash
const pageUrl = buildSeoPageUrl(context, requestUrl); // origin + canonical path/query
Only allowlisted query params survive in canonicals (CONTENT_PARAMS in src/utils/canonical-url.ts: q, offset, sort, refine, pid by default). Add a param only if it changes main page content, and add a test next to canonical-url.test.ts.
Configurable URLs: url.seoRoutes
// config.server.ts
url: {
prefix: '/:siteId/:localeId',
seoRoutes: {
RefArchGlobal: { product: { prefix: 'p' }, category: { prefix: 'c', mode: 'id-suffix' } },
},
}
Key rules (full playbook in references/SEO-ROUTES.md):
- Build-time: changing
seoRoutesrequires a rebuild and redeploy (restart the dev server locally). - Every active site needs an entry, or URL generation throws / the build fails.
- Business Manager URL settings are the source of truth;
seoRoutesis a manual copy that must be kept in sync. - Do not rename route files. Routes are already generic; the config maps prefixes.
- Build links with the semantic builders, never hardcoded
/product/...strings:
import { createProductUrl, createCategoryUrl } from '@/route-paths';
import { useSeoUrlContext } from '@/hooks/use-seo-url-context';
const ctx = useSeoUrlContext();
<Link to={createProductUrl({ productId, slug }, ctx)} />
seoFallback.sites in config supplies per-site fallback behavior when a SEO URL cannot be resolved; see docs/README-MULTI-SITE.md.
Multi-domain and base path
- Origin for canonicals comes from
getAppOrigin(honors forwarded host, falls back toEXTERNAL_DOMAIN_NAME). Each custom domain must be attached to the Managed Runtime environment. See references/MULTI-DOMAIN-BASE-PATH.md. - Mapping domains to sites uses an
X-Site-Idheader set by your CDN. - A base path (
MRT_ENV_BASE_PATH, set from the push config) prefixes asset and route URLs; usegetBasePath()rather than hardcoding.
Crawlers
Crawlers receive full HTML rendering; category pages stay crawlable through a ?page=N parameter with rel prev/next links, while the canonical stays the base category URL. Verify with curl and a crawler user agent. Check docs/README-SEO.md "Crawler Rendering and Pagination" before changing streaming behavior.
Related Skills
storefront-next:sfnext-routing- route modules and URL patternsstorefront-next:sfnext-configuration- config.server.ts and env overridesstorefront-next:sfnext-i18n- locales, hreflang inputsstorefront-next:sfnext-hybrid-storefronts- URLs owned by another storefrontstorefront-next:sfnext-security- CSP nonce for JSON-LDstorefront-next:sfnext-performance- streaming vs crawler rendering
Установить sfnext-seo в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sfnext-seo?
Storefront Next SEO and AEO/GEO: the SeoMeta component (title, description, noIndex, Open Graph, X cards), JsonLd structured data, canonical URLs and the query-parameter allowlist, hreflang, configurable product/category URLs via url.seoRoutes, semantic URL builders (createProductUrl, createCategoryUrl, useSeoUrlContext), redirectToCanonicalPath, crawler rendering and pagination, and how multi-domain and base path affect generated URLs. Use when adding meta tags or JSON-LD to a route, enabling or changing seoRoutes, fixing duplicate or wrong canonical or og:url URLs, or when a build fails for a missing site in seoRoutes. Do not use for route file naming (use `storefront-next:sfnext-routing`), site/locale config in general (use `storefront-next:sfnext-configuration`), or translations (use `storefront-next:sfnext-i18n`).
Как установить скилл sfnext-seo?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sfnext-seo запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic