/sitecore-content-sdk-nextjs-app-router:content-sdk-app-router-component-scaffoldfrom Sitecore Content SDK - Next.js App Router
Scaffolds a new Sitecore component in a Content SDK App Router app: creates file layout, props interface, and places it in src/components/. Use when asked to add or create a component for Sitecore layout rendering.
Ships in Sitecore Content SDK - Next.js App 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.
Scaffold new Sitecore components so they integrate with the layout and editing pipeline. This app uses App Router with separate server and client component maps.
src/components/ (or existing feature folder). Define props (fields, params), export a single default component.'use client' only if the component needs hooks or event handlers.src/components/ during npm run dev and npm run build; run npm run sitecore-tools:generate-map to refresh them on demand (see the content-sdk-app-router-component-registration skill).npm run build to verify, then confirm the component appears in the expected map.A Server Component is the default — value components (Text/Image/Link) and field types both import from @sitecore-content-sdk/nextjs. Convention is one folder per component: src/components/<Name>/<Name>.tsx.
// src/components/Promo/Promo.tsx — Server Component (the default)
import { JSX } from 'react';
import { Text, Image, Link } from '@sitecore-content-sdk/nextjs';
import type { TextField, ImageField, LinkField } from '@sitecore-content-sdk/nextjs';
import type { ComponentRendering, ComponentParams } from '@sitecore-content-sdk/nextjs';
export interface PromoFields {
Title?: TextField;
Image?: ImageField;
Cta?: LinkField;
}
export interface PromoProps {
rendering: ComponentRendering & { fields?: PromoFields };
fields?: PromoFields;
params?: ComponentParams;
}
const Promo = ({ fields }: PromoProps): JSX.Element => (
<section>
<h2>
<Text field={fields?.Title} />
</h2>
<Image field={fields?.Image} />
{/* guard field EXISTENCE, not value — empty fields stay authorable in Pages
(see content-sdk-field-usage-image-link-text / -editing-safe-rendering) */}
{fields?.Cta && <Link field={fields.Cta} />}
</section>
);
export default Promo;
Needs hooks or event handlers (interactivity)? Make it a Client Component — add 'use client' as the first line. Everything else (props interface, field helpers, default export) is identical, and the generator takes care of placement: a 'use client' component lands in .sitecore/component-map.client.ts and in .sitecore/component-map.ts tagged componentType: 'client'.
src/components/. Use existing folder conventions.fields: { title: Field; ... }) and any params. Use types from @sitecore-content-sdk/react or the app's types.'use client' only for interactivity (hooks, event handlers). The generator decides map placement from that directive — Server components into .sitecore/component-map.ts, Client components into .sitecore/component-map.client.ts and the server map tagged componentType: 'client'.npm run sitecore-tools:generate-map over hand-editing the maps; register manually only when the generator cannot handle the change, and expect the next dev/build to overwrite it.content-sdk-app-router-component-registration skill). Do not leave it unregistered..next/, node_modules/, or build output.content-sdk-component-naming-traps — everything under src/components/ registers as a rendering, and a _ or - in the name is version-sensitive.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-content-sdk-nextjs-app-router17 skills in this plugin
/content-sdk-app-router-atom-createWrites a Content SDK atom (beta.atoms): atom vs component, field schemas and enum tokens, renderer, catalog and registry keys, container slots, lock lifecycle, mock-MMS proof. Use when adding or changing an atom. Not wiring atoms into an app./content-sdk-app-router-atomsContent SDK Atoms (beta.atoms only): catalog, atomsConfig, ComponentRef rendering, lock CI gate, runtime CSS, Content Kit install, null-render traps. Use when wiring atoms or a low-code component renders nothing. Not code components or stable apps./content-sdk-app-router-cache-components-and-osrOther plugins' skills for the same job