/sitecore-content-sdk-nextjs-pages-router:content-sdk-pages-router-component-registrationfrom Sitecore Content SDK - Next.js Pages Router
Registers components in the generated .sitecore/component-map.ts for Sitecore Content SDK Pages Router apps. Use when adding a component, fixing "component not found" errors, or the editor cannot resolve a layout component.
Ships in Sitecore Content SDK - Next.js Pages Router. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Register components in the Sitecore component map so the layout and editing pipeline can resolve and render them. This app has a single map: .sitecore/component-map.ts.
.sitecore/component-map.ts..sitecore/component-map.ts is produced from src/components/ by sitecore-tools project component generate-map, which the scaffold wires into both npm run dev and npm run build, plus a --watch variant during dev. So the normal way to register a component is to create the file in src/components/ and re-run dev/build.npm run sitecore-tools:generate-map. Edit the map by hand only when the generator genuinely cannot express your case — and expect the next dev/build to overwrite it. The map is consumed by getComponentData and the editing API routes; keys must match the layout componentName.Pages Router has ONE map (no component-map.client.ts) and no componentType: 'client' split. The key is the layout componentName (case-sensitive); each entry spreads the imported module.
// .sitecore/component-map.ts — the single Pages Router map
import { NextjsContentSdkComponent } from '@sitecore-content-sdk/nextjs';
import * as Promo from 'src/components/Promo/Promo';
export const componentMap = new Map<string, NextjsContentSdkComponent>([
// ...built-ins from the scaffold (BYOCWrapper, FEaaSWrapper, Form) stay as-is...
['Promo', { ...Promo }],
]);
export default componentMap;
This map is consumed by getComponentData(page.layout, context, components) in src/pages/[[...path]].tsx and by the editing API routes (src/pages/api/editing/config.ts, render.ts, feaas/render.ts). A wrong/missing key renders <MissingComponent>.
.sitecore/component-map.ts — but achieve that by running npm run sitecore-tools:generate-map (or just npm run dev / npm run build), not by editing the map. Do not hand-edit generated entries unless the generator cannot handle the case.getComponentData(page.layout, context, components) in the catch-all page and by editing API routes (src/pages/api/editing/config.ts, render.ts, feaas/render.ts)..sitecore/metadata.json or import-map unless the task explicitly requires it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/content-sdk-pages-router-component-data-strategyComponent data in a Content SDK Pages Router app: getComponentData after getPage resolves component props for the layout. Use when wiring component data or BYOC in a Pages Router app. Not App Router./content-sdk-pages-router-component-scaffoldCreates a new Sitecore component in a Content SDK Pages Router app: file layout, props interface, src/components/ placement, generated component map. Use when adding or scaffolding a component. Not App Router./content-sdk-pages-router-component-variantsImplements component variants: different renderings or data-driven variants of the same component type. Pages Router: register in .sitecore/component-map.ts; getComponentData resolves props. Use when one component has multiple presentations./content-sdk-pages-router-dictionary-and-i18nDictionary and i18n in a Content SDK Pages Router app: next.config i18n locales, context.locale, getDictionary after getPage. Use when adding translated content or changing locale behaviour. Not App Router./content-sdk-pages-router-editing-safe-renderingMakes Content SDK Pages Router components work in SitecoreAI editing and preview: context.preview, previewData, getPreview, design library data. Use when fixing editor or preview behaviour. Not App Router./content-sdk-pages-router-graphql-data-fetchingFetches page, dictionary and component data in a Content SDK Pages Router app: getPage, getDictionary, getComponentData, getPagePaths for SSG. Use when fetching page or dictionary content. Not App Router.npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-content-sdk-nextjs-pages-routerOther plugins' skills for the same job