/sitecore-platform:sitecoreai-serializationfrom Sitecore Platform (SitecoreAI)
Designs Sitecore Content Serialization modules: sitecore.json, module includes, scope, push operations, grain, deploy modes, and traps that delete items. Use when creating or changing a module.
Ships in Sitecore Platform (SitecoreAI). 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.
Read when SKILL.md points to them.
Serialization (SCS) is how developer-owned items (templates, renderings, placeholder settings, branches, the site shell) travel with the code. The CLI mechanics of reaching a tenant (login, connect, user.json, allowWrite, endpoint names) live in sitecoreai-cli-cloud-workflow. This skill is the layer above: what a module contains, how it is cut, and how it is deployed. Almost every failure here is silent or destructive: a default that deletes, a pull that writes the wrong tenant, a push that stops halfway and exits 0.
Schema tables, an annotated module and the xmcloud.build.json options: references/module-json-reference.md.
sitecore.json → modules: [globs] finds every *.module.json. serialization.defaultModuleRelativeSerializationPath sets where YAML lands when a module gives no items.path.namespace (unique) + items.includes[] (+ optional references, roles, users, excludedFields).name (it is the on-disk folder name) + path + scope + allowedPushOperations + rules[].{ "path": "*", "scope": "Ignored" }.| Property | Default | Why it hurts |
|---|---|---|
scope | ItemAndDescendants | An include with no scope takes the whole subtree, including author content under it |
allowedPushOperations | CreateUpdateAndDelete | A push deletes every item in scope that is not on disk, author-created items included |
items.path | the shared default root | Sibling modules share one folder tree (§ Grain) |
-n (environment) | default | Resolves to whatever endpoint the last login wrote, which can be another tenant |
Set scope and allowedPushOperations on every include explicitly, and treat a missing one as a review finding.
Decide this once per collection; it changes every site include.
| Strategy | Site include | When |
|---|---|---|
| Full record (default here) | ItemAndDescendants, CreateAndUpdate, no "*" → Ignored | git must be able to rebuild a tenant or move an estate; content is pulled after authoring |
| Shell only (Sitecore's Accelerate sample) | selected children, /Home SingleItem CreateOnly, "*" → Ignored | authors own all pages and git never holds them |
The shell shape fails quietly when someone expects a record: a site seeded from it serialized the home item and none of its pages, and every subtree an author added later was dropped without a word. Under the full record, add rules only to change a push policy for a subtree, never to opt a subtree in.
| Item class | Push | Why |
|---|---|---|
Templates, branches, renderings, placeholder settings, /sitecore/system/Settings/Project/<C> | CreateUpdateAndDelete | Developer-owned: removals must propagate |
Site /Presentation (page and partial designs, headless variants) | CreateUpdateAndDelete | Structure the code depends on |
Tenant root /sitecore/content/<C> | CreateAndUpdate, SingleItem | The container only, never its sites |
| Pages, datasources, dictionary, media | CreateAndUpdate | A push must never delete an authored item |
/Settings/Site Grouping (hostnames, robots) | CreateOnly | Environment-coupled: lands once on a fresh target, never overwritten |
Never serialize:
CreateOnly does not save you: a fresh tenant still gets the item with dead URLs and the push then refuses to fix it (2026-08-13). Bind the host per environment through the Site Grouping RenderingHost field (a host name).<site media>/System/…; with media at ItemAndDescendants every pull committed them as base64 blobs (632 files, ~14 MB across six sites, 2026-09-28). Cap that folder with a rule at ItemAndChildren.scsModules), personalization variants and A/B tests (tenant state), Edge or cache state, and anything under /sitecore/system you did not create. Sitecore's guidance: serialize only under */Project/*.Include order matters: a template include must come before content that uses it in the same module; use references for templates in another module. An annotated module: references/module-json-reference.md.
On a CM that hosts several collections:
CreateUpdateAndDelete, which is exactly the collision.<x>.module.json in its own directory and set items.path: ".". A distinct items.path alone is not enough: the items-as-resources build groups modules by where the manifest sits, and fails on two manifests in one folder sharing an include name ("There are several modules … with the same include name … split those modules into folders"), after MSBuild reported 0 Error(s). In one measured CM, 9 of 15 conventional include names collided across 6 modules.ser validate list the other collection's files as "EXTRA ITEM … > Fix will delete file", and ser pull aborted. One --fix would have deleted another site's source.site, site-b, …). Unique across modules is better still: an unscoped op on a CM with shared include names fails at config load.-i "<Module.Namespace>" -n <endpoint>. Never run unscoped ser pull, ser validate --fix or --force on a shared repo. An unscoped pull from the wrong default endpoint applied 26 changes from another tenant and reported success (2026-09-26).--what-if first, then explain every [D] line before the real run.ser pull the module, then commit. Do not hand-edit YAML and push it.__Revision, __Updated, __Owner and __Lock, so a value write that does not bump the revision is invisible. Grep the YAML for the value you just wrote.ser validate (read-only) before every commit; --fix only after you have read the delete list. --fix deletes local files: it keeps the newest of a duplicate id and drops whole trees it considers not included..scindex still maps the old paths. ser pull then reports an item "on disk in more than one place", and validate --fix and pull undo each other on every run. Move that include's folders and its .scindex aside (a move, not a delete) and pull it fresh; a second pull must report 0 changes (measured 2026-10-28).| Mechanism | xmcloud.build.json | Effect |
|---|---|---|
| Items as resources | deployItems.modules (omitted = every module) | YAML → .dat at deploy; read-only, merged at runtime |
| Database push | postActions.actions.scsModules.modules | A push into the DB after every deploy, with each include's push policy |
__Revision and by value; a value-only compare missed 9 of 11.ser push skips IAR-only items (90 of 1,026 written in one module). Turning IAR off before materializing them makes them disappear.ser push also wrote to the database survives the deployment that drops its YAML: three removed schema folders still listed on the CM afterwards. A scoped ser push of the module removes them where the include is CreateUpdateAndDelete; its --what-if must list exactly the removed subtree roots (measured 2026-10-28). Content includes are CreateAndUpdate, so a site goes through the Sites API delete instead.scsModules with CreateUpdateAndDelete deletes CM-authored dev items that were never pulled, on every deploy. On a developer CM, prefer manual scoped pushes.scsModules. A role or user pattern pushed before a pull deletes the matching items on the tenant, because orphans are removed.source item path … did not exist). Disable it for the first deploy, create the site, then enable it and pull.The full push-into-an-IAR-CM procedure (NonUniquePathException recovery, the --trace blob truncation, the reconciliation of what-if results) is the serialization-overlays reference of sitecoreai-cli-cloud-workflow; moving a site to another tenant is its estate-move reference.
Template ID <guid> did not exist stops at that item; everything after it in tree order is stranded. continueOnItemFailure: true does not help. Usual culprit: an empty, unreferenced SXA <site>/Data/Datasource Content Resolver item whose base template ships with a foundation the target lacks. Delete it from disk (keep the Headless Variant of the same name), or serialize and push the missing template first. Verify with a second what-if that reports 0.NonUniquePathException aborts push and pull before any evaluation when a DB-only item sits at a git item's path (a generated site thumbnail, a duplicate folder). Recovery order: the overlays reference.scope and allowedPushOperations; nothing authored is CreateUpdateAndDeleteitems.path: "." and a correct $schema path; include names uniqueser explain -p <path> answers which module owns it)ser info -i <module> lists the expected subtrees; ser validate -i <module> reports no errorsdeployItems / scsModules choice is deliberate for this environmentsitecoreai-cli-cloud-workflow: login, connect, endpoints, push procedure, overlays, estate movecontent-sdk-website-build-flow: when in a build the pulls happencontent-sdk-create-component, content-sdk-list-component: the items a module must then carryWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-platform17 skills in this plugin
/sitecoreai-agentSitecoreAI Agent API: high-level REST actions such as create page with components, create personalization version and generate brief. Use as the default entry point for apps, MCP servers or automations. It powers the Marketer MCP./sitecoreai-authOAuth client-credentials auth for the SitecoreAI APIs (Agent, Pages, Publishing, Sites): automation client, token endpoint, scopes, env vars, caching, 401s. Load before the first API call. Not head-app Edge context ids./sitecoreai-brand-voiceWrites Sitecore page content in a brand's voice and identity, taken from the PRD or spec or a Sitecore brand kit, never guessed. Sets register (brand, marketing, technical-neutral). Use for copy on a brand or client site. Not page structure./sitecoreai-cli-cloud-workflowSitecore CLI against a SitecoreAI tenant: login, project and environment lookup, connect, ser pull and push, and their silent traps. Use when pulling, pushing or moving a site between tenants, or on CLI environment errors./sitecoreai-content-compositionInventory-first page composition via the Marketer MCP: inventory the site's real components, then compose a page by choosing and ordering them, with the verified add-component recipe. Use when authoring or extending a page, not a single field./sitecoreai-edge-admin-webhooksExperience Edge Admin API: admin client, token, webhook CRUD (OnEnd vs OnUpdate), settings, cache clear, which webhook fits which job. Use when registering, testing or debugging a publish webhook. Not head-app revalidation code.Other plugins' skills for the same job