# marketplace-add-xmc

Adds XM Cloud API access to a Sitecore Marketplace app, covering Sites, Pages, Authoring, Content Transfer, Search and Agent APIs.

Skill by Vercel. Category: Web and browsers.

## Install

Project (for this project only):

```sh
npx skills add vercel-labs/sitecore-skills --skill marketplace-add-xmc
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add vercel-labs/sitecore-skills --skill marketplace-add-xmc -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass
- Runlayer: Pass

Installs: 49. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/vercel-labs/sitecore-skills/marketplace-add-xmc)

## Source

[Open the source](https://github.com/vercel-labs/sitecore-skills/tree/HEAD/.claude/skills/marketplace-add-xmc). Checked 2026-10-24. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: marketplace-add-xmc
description: Adds XM Cloud API integration to a Sitecore Marketplace app. Use when the user wants to access Sites, Pages, Authoring, Content Transfer, Search, or Agent APIs from XM Cloud.
argument-hint: "[api-name]"
---

# Add XM Cloud API Integration

You are helping the user add XM Cloud API integration to their Sitecore Marketplace app.

## Prerequisites

The XMC package must be installed. If not:
```bash
npx shadcn@latest add https://marketplace-sdk.sitecorecloud.io/r/xmc.json
```

## Step 1: Determine Which API

Ask the user (or infer from $ARGUMENTS) which XMC API they need:

| API | Namespace | Use For |
|-----|-----------|---------|
| **Sites** | `xmc.sites.*` | List/get sites, current site context |
| **Pages** | `xmc.pages.*` | List/get pages, current page context |
| **Authoring** | `xmc.authoring.*` | GraphQL queries/mutations against authoring API |
| **Content Transfer** | `xmc.contentTransfer.*` | Import/export content |
| **Search** | `xmc.search.*` | Search content items |
| **Agent** | `xmc.agent.*` | Invoke XM Cloud agents |

## Step 2: Choose Client-Side or Server-Side

- **Client-side**: Use `client.query()` / `client.mutate()` — simpler, works in any architecture
- **Server-side**: Use `experimental_createXMCClient()` — requires Auth0 (full-stack architecture)

## Step 3: Implement

See [xmc-patterns.md](references/xmc-patterns.md) for complete code patterns for each API.

## Step 4: Suggest Related Skills

- Use `/marketplace-build-component` to build UI for the data
- Use `/marketplace-sdk-reference` for detailed type information

## Reference Files
- [XMC Patterns](references/xmc-patterns.md) — Code patterns for each XMC API
````

- Previous: [marketplace-sdk-reference](https://syn4pse.dev/terminal/sitecore-marketplace-sdk-reference.md)
- Next: [marketplace-add-extension](https://syn4pse.dev/terminal/sitecore-marketplace-add-extension.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
