> ## Documentation Index
> Fetch the complete documentation index at: https://www.commercengine.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Coding Agent Skills

> Install Commerce Engine's ce-seo and ce-ai Agent Skills so coding assistants implement the packages using the same production contracts as the starters.

The [`commercengine/skills`](https://github.com/commercengine/skills) repository teaches AI coding agents the same implementation contracts documented here. The `ce-seo` and `ce-ai` skills encode deployment decisions, framework mounting, bundle boundaries, cart semantics, and failure modes that are easy to miss from API signatures alone.

These are **coding-agent skills**. They are different from `@commercengine/ai`, which exposes runtime WebMCP tools to agents visiting the storefront.

## Install the skills

### Agent Skills CLI

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx skills add commercengine/skills
```

### Claude Code plugin marketplace

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
/plugin marketplace add commercengine/skills
/plugin install ce@commercengine/skills
```

### Manual Claude Code install

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
git clone https://github.com/commercengine/skills ~/.claude/skills/commercengine
```

The repository follows the Agent Skills format and can also be consumed by tools that support compatible skill/plugin manifests.

## `ce-seo`

Use `ce-seo` for metadata, Product/ProductGroup JSON-LD, canonical URLs, robots, XML sitemaps, `llms.txt`, Markdown mirrors, preview noindex policy, deployment-mode selection, and CMS-owned storefront routes.

The skill starts with the key decision:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Does a server receive requests after deployment?
├─ yes → mount one SEO request adapter
└─ no  → run one SEO asset prebuild
```

For server mode, the skill enables `robots: true` and `sitemap: true` explicitly because both request-handler options default to off. It also distinguishes the package route default (`/products/:slug`) from the starter convention (`productBase: "/product"`) and treats `indexable` as an override on top of deployment detection, not a required production flag.

Example prompts:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Use ce-seo to replace the hand-written SEO in this Next.js storefront with @commercengine/seo.
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Use ce-seo to add JSON-LD, llms.txt, sitemaps, and Markdown mirrors to this Astro static site.
```

## `ce-ai`

Use `ce-ai` for WebMCP registration, catalog/cart tools, Hosted Checkout bridges, navigation, session capability reporting, diagnostics, policy/FAQ tools, and custom AI modules.

It preserves the runtime safety boundary:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Agent may:   search → inspect → configure cart → open checkout
Human does:  credentials → address/payment → final purchase
```

Example prompts:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Use ce-ai to let browser agents search products and add items to the real cart in this Next.js app.
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Use ce-ai to review our custom agent tools for accidental customer-data or payment exposure.
```

## Start with `/ce` when unsure

The Commerce Engine router can combine the specialist skills for a broader request:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
/ce make this storefront production-ready for search engines and browser agents
```

The router knows about `ce-setup`, `ce-catalog`, `ce-cart-checkout`, `ce-seo`, `ce-ai`, and the framework skills.

## What skills add beyond API docs

| Topic           | API surface alone      | Skill guidance                                          |
| --------------- | ---------------------- | ------------------------------------------------------- |
| SEO serving     | exposes handlers       | choose server middleware vs static prebuild first       |
| client bundle   | types compile          | keep SEO instance server-bound; share only pure config  |
| static Markdown | generator exists       | do not mount `.md` catch-all routes in static apps      |
| breadcrumbs     | JSON-LD helper exists  | resolve URLs through SEO route resolvers                |
| AI registration | function exists        | mount early, diagnose registration, abort on cleanup    |
| cart quantity   | mutation method exists | distinguish add vs absolute set; honor promo/free lines |
| WebMCP safety   | tool schema exists     | never add address/payment/order-placement tools         |

## Starter projects as executable reference

The skills intentionally point agents back to [`tark-ai/ce-starter-projects`](https://github.com/tark-ai/ce-starter-projects). All 15 starters use the published packages across React, Next.js, TanStack Start, Astro, and SvelteKit.

Use the starters when an agent needs to answer questions such as:

* Where should this code live in this framework?
* Is this module safe to import into the browser?
* How should generic social tags yield to page-specific metadata?
* When does WebMCP registration mount and clean up?
* Which directory receives generated static SEO files?

## Keep docs, skills, and starters aligned

For Commerce Engine maintainers, these surfaces have different roles:

1. **Package source and tests** define behavior.
2. **Starter projects** demonstrate complete application wiring.
3. **Agent skills** encode decision rules and pitfalls for coding agents.
4. **These docs** explain the supported public workflow to developers.

When behavior changes, update all four together.

<CardGroup cols={2}>
  <Card title="AI-assisted development" icon="wand-magic-sparkles" href="/docs/ai/overview">
    General Commerce Engine coding-agent resources.
  </Card>

  <Card title="Skills repository" icon="github" href="https://github.com/commercengine/skills">
    Browse the complete skill source.
  </Card>
</CardGroup>
