/sitecore-platform:sitecoreai-cli-cloud-workflowfrom Sitecore Platform (SitecoreAI)
Walks through Sitecore CLI login, project/environment lookup, connect, and ser pull/push against a SitecoreAI Cloud tenant, including fixes for common silent traps.
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.
A first-time login + connect + pull against a SitecoreAI Cloud environment touches at least four undocumented traps. This skill captures the canonical order, the exact commands, and the fixes for each trap so the user never has to discover them again.
Run these in order from the directory containing sitecore.json:
dotnet sitecore cloud login. Prints a URL + device code; user authenticates in a browser. Token persists in .sitecore/user.json under endpoint xmCloud.dotnet sitecore cloud project list — prints every project the user's org can see. There is no --name filter; grep by name yourself. Capture Project Id (e.g. <22-character id>).dotnet sitecore cloud environment list --project-id <PROJECT_ID>. --project-id is REQUIRED — the command errors without it. Capture Environment Id and Environment Name.dotnet sitecore cloud environment connect --environment-id <ENV_ID>. This appends a new endpoint to .sitecore/user.json named after the environment (e.g. "prod"). It does NOT set this as the default; defaultEndpoint remains "default", which doesn't exist.user.json. Open .sitecore/user.json and set "allowWrite": true on the new endpoint (otherwise even read commands like ser pull are blocked). Optionally set "defaultEndpoint": "<env-name>" so subsequent commands work without -n.dotnet sitecore ser pull -n <env-name> (or omit -n if you patched defaultEndpoint). Output lists items added/updated/deleted ([A], [U], [D]).cloud project list outputs prose, not JSON. Use --json if you need structured output for piping. There is no name filter — grep yourself.
cloud environment list requires --project-id. Get it from step 2.
cloud environment connect does not update defaultEndpoint. Either pass -n <env-name> on every subsequent command, or hand-edit user.json to set defaultEndpoint to the new endpoint key.
allowWrite: false blocks ser pull, not just push. The CLI treats local filesystem writes as "writes." Set allowWrite: true on the endpoint before pulling.
The connect command supports --allow-write flag at connect time — pass -aw (--allow-write) to skip the user.json edit step.
Never commit .sitecore/user.json. It contains an access token + refresh token. Verify it is .gitignore'd.
Endpoint name in user.json matches Environment Name from the list output, not the ID. So if the env is named "PROD" the endpoint key is "prod" (lowercased by the CLI in some versions — read the file after connect to confirm).
Run the repo-local tool, never a global one: dotnet tool run sitecore …. A global sitecore.cli (5.2.109) shadowed the repo's pinned local CLI, then refused to load the Serialization / Publishing plugins at the sitecore.json pin (6.0.23) and at the only version plugin add offered (7.0.24): "Plugin is not supported by the current version of the CLI". dotnet tool run sitecore (6.0.23, from .config/dotnet-tools.json) worked (measured 2026-09-28).
Never bump one plugin pin in sitecore.json on its own. Plugin versions track the CLI major. Move the CLI in .config/dotnet-tools.json and every Sitecore.DevEx.Extensibility.* pin together, or not at all.
ser pull diffs by revision, not by value. A live write that does not bump __Shared revision / __Revision is invisible to the pull, which reports "Discovered 0 changes" while the tenant and cm/ disagree. Measured twice in one build (2026-09-27 → 28): a rendering registered live but missing from the serialized Renderings field, and three renderings newline-joined into it, both with disk and live revisions identical.
updateItem (a real value change, such as normalising a GUID's format). That bumps the revision, and the next pull applies it.A repo-deployed CM serves serialized items as read-only resources; a CM edit makes a DB copy that silently wins over git forever after. Before any push to such a CM, read references/serialization-overlays.md. The short form:
ser push skips items that exist only as resources (90 of 1,026 written in one module), so it is not a way to materialize a module into the DB.NonUniquePathException; clear it first, in the order the reference gives.__Revision as well as values; --trace truncates long values, so a "byte-identical" blob may be a prefix compare.-n <endpoint> and -i <module> on every op, the endpoint host asserted, --what-if --trace first, every [D] explained.Moving a site's delivery to another tenant (probe → clean → push → publish → parity → repoint → revert): references/estate-move.md.
GET /api/environments/v1/{id} carries no repositoryDetails. Read the link (repositoryDetails, repositoryBranch, deployOnCommit) from GET /api/environments/v2/{id}. A v1 read reports every environment as unlinked.
cloud project list returns multiple projects whose names look plausible — never guess. The org may have 10+ projects.PROD + solo-website + ...). The right env is the one whose Environment Host matches the host in the existing layout response (or the host in .env.local's SITECORE_API_HOST if set).--allow-write on connect, or hand-toggling endpoint to allowWrite=true with intent to push) without explicit user approval. Pulls are recoverable; pushes overwrite tenant state..sitecore/user.json to "reset" — it carries the live token. Re-login from scratch if reset is needed.[<env>] Changes have been applied to serialized items (N subtrees). and a [roles] + [users] summary. If you see [<env>] Discovered 0 changes after evaluating N total items. and no errors, nothing with a newer revision exists on the tenant. That is not the same as "in sync" (§ A pull that finds 0 changes)..sitecore/user.json with "lastUpdated" and a fresh accessToken on each command — that's expected.sitecoreai-serialization — module DESIGN: what to serialize, include scope and push policy, one module per collection in its own folder, items-as-resources vs scsModules, the push that stops at a missing template. Read it before creating or changing a *.module.json.setup-content-sdk — canonical scaffold; CLI must be installed before this skill applies.content-sdk-debug-layout-probe — useful after pull to compare local YAML vs live layout response.What 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-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./sitecoreai-edge-graphql-capturecurl recipes for Experience Edge GraphQL: endpoint, introspection depth trap, complexity vs pagination, ComponentQuery budget, site, route and layout queries. Use to capture a snapshot, probe live data without the SDK or debug Edge queries.Other plugins' skills for the same job