/sitecore-marketplace:marketplace-sdk-lifecyclefrom Sitecore Marketplace
Documents the Sitecore Marketplace app lifecycle: custom vs public, Cloud Portal registration, app architecture options, Auth0 setup, hosting, Blok compliance, and submission checklist.
Ships in Sitecore Marketplace. 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.
This skill is a catalog, not a contract. It documents lifecycle phases, app-architecture options, and Auth0 model. It does not document tenant-side preconditions (e.g.
Sites.Host.targetHostnamemust be populated for the Live URL to resolve), nor does it document the runtime availability of any specific SDK call. Verify in a real tenant before declaring shipped.
For Client SDK reference (ClientSDK.init, query/mutate/subscribe, extension-point types) see the marketplace-sdk-client skill.
For XMC endpoint keys (xmc.* — sites, pages, agent, GraphQL) see the marketplace-sdk-xmc skill.
For AI skills module (@sitecore-marketplace-sdk/ai) see the marketplace-sdk-ai skill.
For local dev + iframe debugging see the marketplace-sdk-testing-debug skill.
| Dimension | Custom app | Public app |
|---|---|---|
| Availability | Your organization + any organizations you whitelist | All Sitecore organizations via public Marketplace listing |
| Approval | None — self-serve | Sitecore review required before publication |
| Hosting | Self-hosted (your infra / cloud) | Self-hosted, but discoverable via public Marketplace |
| Listing | Private — not in public Marketplace | Public Marketplace listing (https://portal.sitecorecloud.io/marketplace) |
| Blok compliance | Recommended | Effectively required for submission approval |
| Typical use | Internal tools, customer-specific integrations, prototypes | Reusable integrations distributed to the ecosystem |
Decision rule: If the integration is for a single customer or internal use, build a custom app. Only target public if the integration is reusable across organizations and you accept the review/compliance overhead.
1. Register → Create the app in Cloud Portal → App Studio
2. Configure → Set extension points, API access, dev URL, authorization
3. Install → Install into one or more organizations
4. Build → Implement with Marketplace SDK (client / xmc / ai)
5. Finish → Post-build configuration (prod URL, access grants, updates)
Build (phase 4) and Install (phase 3) can be iterative — install early with a localhost dev URL, then iterate on code.
1. Register → Same as custom
2. Configure → Same as custom
3. Install → Internal install for testing
4. Build → Implement with Marketplace SDK
5. Finish → Post-build configuration
6. Test → End-to-end verification in real portal
7. Prepare → Marketing materials, icons, descriptions, Blok review
8. Submit → Submit for Sitecore approval
9. Publish → Appears in public Marketplace after approval
Phases 7–9 are unique to public apps. Phases 1–6 are shared with custom apps.
Required role: You must be Organization Admin or Organization Owner in the target Sitecore Cloud Portal organization.
What's configured during Register + Configure phases:
| Field / concept | Notes |
|---|---|
| App name | Distinct, descriptive. Use Test application suffix for throwaway test apps. |
| App URL (development) | https://localhost:3000 for local dev (must be HTTPS — see § 5). |
| App URL (production) | Set during Finish phase once hosting is live. |
| Extension points | One or more of standalone, xmc:fullscreen, xmc:pages:contextpanel, xmc:pages:customfield, xmc:dashboardblocks. See the marketplace-sdk-client skill, § 7, for capabilities per point. For Route URL per extension point (including multi-route Dashboard widgets) run the marketplace-sdk-extension-routes skill after scaffold. |
| API access | Which XMC/Authoring/Preview/Live/AI APIs the app may call. Enable only what's needed; for local dev enable all. |
| Authorization type | Determines whether Auth0 flow is iframe-embedded vs server-to-server (see § 5). |
| Environment binding | Which SitecoreAI environment(s) the app is installed against. |
| Access grants | Which users / groups in the organization may see the app (leave minimal during dev). |
Sub-pages that document each phase:
register-a-custom-app.html — app name, URL, extension pointsconfigure-and-activate-a-custom-app.html — API access, authorization, environmentsinstall-an-activated-custom-app.html — install into orgfinish-configuration.html — prod URL, access grantsupdate-an-installed-app.html — version updatesThree architectures are viable. Pick one at architecture time — do not plan "we'll try both as fallbacks".
Browser
└─ Sitecore portal (parent window)
└─ <iframe src="https://your-app.example.com">
└─ Your Next.js app
└─ ClientSDK.init({ target: window.parent, modules: [XMC, AI?] })
└─ client.query('xmc.sites.listSites', …)
setup-marketplace-client-side skill, or setup-marketplace-full-stack if you want SSR routes for your own UI only.marketplace-sdk-client skill for Client SDK base, the marketplace-sdk-xmc skill for XMC endpoints, the marketplace-sdk-ai skill for AI skills — all assume this architecture.Same as 4a, but the Next.js app has its own API routes for non-XMC server logic (your own DB, third-party APIs). XMC/AI calls still go through the Client SDK via postMessage.
setup-marketplace-full-stack skill.Browser ←→ Your Next.js app ←→ Auth0 ←→ Sitecore XMC/AI APIs (direct)
(iframe or standalone)
experimental_createXMCClient and/or experimental_createAIClient with an Auth0 access token.standalone extension point.When to use 4c:
When NOT to use 4c:
Browser
└─ Sitecore portal (parent window)
└─ <iframe src="https://your-app.example.com">
└─ Your Next.js app
├─ Client side: ClientSDK.init() — subscribes to pages.context, application.context
│ (Mode A — same as 4a/4b)
└─ Server side: app/api/<route>/route.ts
└─ uses OAuth 2.0 client-credentials (machine-to-machine)
to call SitecoreAI Agent / Pages / Publishing / Sites APIs
on behalf of an automation client
A hybrid that doesn't fit 4a/4b/4c cleanly. The app runs in the portal iframe (so the user sees pageId, siteName from pages.context) and has Next.js API routes that call SitecoreAI APIs server-to-server using OAuth 2.0 client-credentials — not Auth0 PKCE. The two halves talk to two different auth systems:
sub claim, not from a logged-in user.Use when:
/screenshot, Publishing job creation) — the only way to make that call is server-to-server against the underlying REST API.Don't use when:
xmc.*) — use 4a or 4b instead. Don't reinvent.Auth model:
sitecoreai-auth skill. Three-segment env vars (SITECORE_<API>_CLIENT_ID/SECRET, server-only — NOT NEXT_PUBLIC_*).Scaffold: start from setup-marketplace-full-stack (you need the API routes), then skip the Auth0 PKCE post-scaffold steps — see that skill's "Auth modes" section for the exact substitution. Optionally remove the @auth0/auth0-react dep + components/providers/auth.tsx + custom-auth/ examples if you don't need PKCE at all.
Example: a Pages Context Panel screenshot app that subscribes to pages.context, sends the resulting pageId to its own app/api/screenshot/[pageId]/route.ts, which holds OAuth client-credentials server-side and proxies to the SitecoreAI Agent API /screenshot endpoint. Discovered as a real architecture while rebuilding that app (2026-05-02), not previously named in this taxonomy.
All Marketplace apps authenticate via Sitecore's Auth0 tenant. The auth model differs by architecture.
The portal handles auth. Your app does not configure Auth0 directly. Tokens never reach your app code — the postMessage bridge uses the portal's session.
What you do: nothing beyond registering the app in Cloud Portal with the right API access scopes. The Client SDK handles the rest.
You integrate Auth0 directly in your Next.js app.
Sitecore Auth0 tenant + required env vars:
AUTH0_DOMAIN=https://auth.sitecorecloud.io
AUTH0_AUDIENCE=https://api-webapp.sitecorecloud.io
AUTH0_SCOPE='openid profile email offline_access'
SITECORE_ORGANIZATION_ID=<from Cloud Portal>
SITECORE_TENANT_ID=<from standalone app URL after install — see the marketplace-sdk-testing-debug skill, § 5b>
Client-side example (Auth0 React):
import { useUser } from '@auth0/nextjs-auth0';
const { user } = useUser();
const xmc = await experimental_createXMCClient({
getAccessToken: () => getAccessTokenSilently(),
});
Server-side Auth0Client config (cookies + authorizationParameters): lives in the marketplace-sdk-testing-debug skill, § 4a. Do not reproduce here — it drifts.
| Value | What it's for | Where to capture |
|---|---|---|
organization_id | authorizationParameters.organization_id + env var SITECORE_ORGANIZATION_ID | Cloud Portal → your organization |
tenant_id | authorizationParameters.tenant_id + env var SITECORE_TENANT_ID | Standalone app URL after install (post-install step) |
sitecoreContextId | Every query: param of experimental_* calls | client.query('application.context') once from a Client-SDK page |
Capture procedures for each: the marketplace-sdk-testing-debug skill, § 5. The sitecoreContextId capture is a chicken-and-egg step — a small Client-SDK page reads application.context once, then you wire the value into the server-to-server flow.
Iframe login under server-to-server enforces strict cookie policies: HTTPS, sameSite: 'none' + secure: true on session and transaction cookies, cross-origin third-party cookie rules. Full block + symptom table: the marketplace-sdk-testing-debug skill, § 4. Missing any rule makes auth "just not work" with no clear error.
| App type | Who hosts | Requirements |
|---|---|---|
| Custom | You — any HTTPS-reachable host (Vercel, Azure, AWS, self-managed) | HTTPS, stable URL, matches the URL registered in Cloud Portal |
| Public (post-approval) | You still host — Marketplace listing points at your URL | Same + production-grade SLA expected |
Requirements (both):
Sitecore expects Marketplace apps to match the Blok design system (https://blok.sitecore.com/) for look-and-feel consistency.
What this means in practice:
Integration: shadcn/ui scaffolds from the setup-scaffold skill ship with Blok-compatible defaults. If you diverge from shadcn, verify the chrome against Blok tokens before submission. See the blok-setup, blok-components, and blok-marketplace-integration skills for full guidance.
Only required for phase 7–9 of the public-app lifecycle. From prepare-to-submit-a-public-app-for-approval.html:
Submission flow: Cloud Portal → App Studio → your app → Submit for approval. Sitecore reviews; approval can take days to weeks.
Client SDK ClientSDK.init() handshakes with the portal and fails if the app isn't registered. Register in Cloud Portal first (step 1), then scaffold the code (step 4).
setup-scaffold skill, § 2 vs § 3 (client-side-xmc.json vs full-stack-xmc.json)experimental_* clients — no shadcn quickstart covers this yetADR the architecture decision before picking the scaffold.
It is not. You own the Auth0 integration, token refresh, iframe cookie config, and orgId/tenantId wiring. The iframe Client SDK path is significantly simpler. Only reach for experimental when the iframe model genuinely can't satisfy the requirement.
If you're building a public app, evaluate Blok from day one. Swapping out a custom design system at submission time is expensive. Use shadcn defaults or Blok-native components from the start.
Both are required. tenantId is only visible after install — you open the standalone app from the portal shell and read the URL. Plan this as an explicit post-install step in your implementation plan.
During discovery: Identify custom vs public during discovery. Public apps add 3–4 weeks of submission/Blok work — surface this in the requirements. Ask about target audience (internal-only vs ecosystem distribution) to decide.
During architecture: Produce an ADR covering (1) custom vs public, (2) architecture 4a/4b/4c, (3) auth model decision, (4) hosting. Record the registration values (app name, extension points, API scopes) as a planning artifact — they drive Cloud Portal setup. Do not plan both client-side iframe and server-to-server paths "for flexibility" — pick one.
During implementation planning: the plan's stack/dependencies section must include: (a) the exact Cloud Portal registration steps with required role, (b) the scaffold command from the setup-scaffold skill matching the chosen architecture, (c) required env vars (AUTH0_*, SITECORE_ORGANIZATION_ID, SITECORE_TENANT_ID if experimental), (d) HTTPS requirement for local dev (next dev --experimental-https), (e) the mandatory Auth0 cookie config if experimental mode is chosen. Reference the marketplace-sdk-testing-debug skill for the local dev loop.
During testing: Add a validation spike for iframe cookie flow — this is the single highest-impact silent failure in Marketplace apps. All verification runs in the real portal against a registered test app.
During implementation: Follow the architecture decision in the ADR. Do not cast between architectures mid-implementation. If you hit an auth error, check § 5d (HTTPS + cookie config) before debugging anywhere else.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sitecore-marketplace, app-lifecycle, cloud-portal, auth0, blok
Other plugins' skills for the same job
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-marketplace7 skills in this plugin
/marketplace-sdk-aiAPI reference for @sitecore-marketplace-sdk/ai: module vs experimental client, generateBrandReview, payload traps, file inputs. Load when a Marketplace app calls AI skills such as brand review or content compliance./marketplace-sdk-clientAPI reference for @sitecore-marketplace-sdk/client: ClientSDK.init, provider patterns, query, mutate, subscribe, extension points, custom-field values, errors, test stubs. Entry point for any Marketplace app talking to the Cloud Portal./marketplace-sdk-extension-routesPost-scaffold step for a Marketplace app: pick Cloud Portal extension points, generate a Next.js App Router route for each, and produce the App Studio values. Use right after scaffolding or when adding an extension point./marketplace-sdk-host-frame-testingVisual testing of a Marketplace app inside its real host (Cloud Portal, Pages, Dashboard): find the app iframe, clip it, compare against the design. Use for visual or regression tests; a standalone localhost render is not enough./marketplace-sdk-testing-debugLocal dev loop for a Marketplace app: HTTPS with mkcert, test-app registration, Chrome Local Network Access, context ids, iframe sandbox limits, handshake and cookie debugging. Load during development and QA./marketplace-sdk-xmcAPI reference for @sitecore-marketplace-sdk/xmc: SitecoreAI endpoints (sites, pages, agent, authoring, preview, live, search), client modes, context id rules, response unwrapping. Load when a Marketplace app reads or writes SitecoreAI data.