Skip to main content

AI-Assisted Development

Commerce Engine provides first-class support for AI-assisted development. We publish a comprehensive skills package that gives AI coding agents deep knowledge of our platform — SDK patterns, decision trees, code templates, and common pitfall documentation.

Machine-Readable Documentation

llms.txt

Our docs site hosts an llms.txt file that indexes every page. AI agents use this to discover what documentation is available before diving in.
https://www.commercengine.io/docs/llms.txt

LLM-Optimized API Reference

We maintain a dedicated LLM-optimized site with our complete API reference, SDK methods, schemas, and webhooks in clean markdown:

LLM API/SDK Reference

Browse the full LLM-optimized API reference at llm-docs.commercengine.io
Any page can be fetched as raw markdown by sending an Accept: text/markdown header:
curl -H "Accept: text/markdown" https://llm-docs.commercengine.io/
SectionURL PathContent
Index/Full documentation overview
SDK Methods/sdk/151 SDK method references with signatures
API Operations/operations/All REST endpoint documentation
Schemas/schemas/244 request/response type definitions
Webhooks/webhooks/14 webhook event payload specs
Parameters/parameters/Shared API parameter definitions
Responses/responses/Shared response type definitions

Adding Skills to Your Agent

The fastest way to add Commerce Engine capabilities to your AI agent:
npx skills add commercengine/skills
This installs task-based skills that give your agent deep knowledge of Commerce Engine patterns — SDK setup, auth, catalog, cart, checkout, orders, webhooks, and Next.js integration. Skills follow the Agent Skills specification.

Claude Code Plugin Marketplace

If you’re using Claude Code, add the Commerce Engine marketplace directly:
/plugin marketplace add commercengine/skills
Then browse and install individual skills with /plugin, or install the router skill that auto-routes to the right one:
/plugin install ce@commercengine/skills

Manual

git clone https://github.com/commercengine/skills ~/.claude/skills/commercengine

What Agents Can Do

With the skill installed, your AI coding assistant can:

Generate SDK Code

Produce correct, type-safe SDK calls with proper error handling and token management

Look Up TypeScript Definitions

Fetch exact TypeScript interfaces for any of the 244 schemas or 151 SDK methods on demand

Build Full Features

Scaffold complete e-commerce flows: auth, catalog, cart, checkout, orders

Debug Issues

Understand error codes, token refresh behavior, and framework-specific gotchas

Looking Up TypeScript Definitions

The LLM docs site at llm-docs.commercengine.io is the definitive reference for TypeScript types. Every schema and every SDK method includes its full TypeScript definition with JSDoc comments.

Schema Types

To look up the TypeScript definition for any schema (e.g., Cart, Product, Order):
curl -H "Accept: text/markdown" https://llm-docs.commercengine.io/storefront/schemas/Cart
This returns the complete interface with every field, its type, and a description. Use this when you need to know the exact shape of a response object. Browse all schemas at /schemas/.

SDK Method Signatures

To look up the full TypeScript signature for any SDK method (e.g., createCart, listProducts):
curl -H "Accept: text/markdown" https://llm-docs.commercengine.io/storefront/operations/create-cart
Each page includes the SDK method name, a usage example, and the full TypeScript definition with parameter types, request body, and response shape. Browse all methods at /sdk/storefront.

Importing Types

All types are auto-generated from the OpenAPI spec and exported as direct named exports from the SDK. Always import types from the package — never write custom interfaces for API schemas.
// Schema types — import directly by name
import type {
  Cart,
  Product,
  Order,
  UpdateCartItem,
  CartItem,
  Variant,
} from "@commercengine/storefront-sdk";

// Operation types — request bodies, responses, query/path params
import type {
  CreateCartBody,
  CreateCartContent,
  ListProductsQuery,
  ListProductsContent,
  GetProductDetailContent,
} from "@commercengine/storefront-sdk";

// Next.js SDK re-exports all the same types
import type {
  Cart,
  Product,
  CreateCartBody,
} from "@commercengine/storefront-sdk-nextjs";
Operation types follow a consistent naming convention:
  • {OperationName}Body — Request body
  • {OperationName}Content — Response data (the content field)
  • {OperationName}Query — Query parameters
  • {OperationName}PathParams — Path parameters
For edge cases where a type isn’t directly exported, fall back to the raw OpenAPI types:
import type { components } from "@commercengine/storefront-sdk";
type MyType = components["schemas"]["SomeSchema"];
Never define custom TypeScript interfaces for Commerce Engine API types. The SDK exports all 244 schema types and all operation types as named exports. Custom interfaces will drift out of sync and cause runtime bugs that the compiler can’t catch.

Ready-to-Use Prompts

We provide a library of copy-paste prompts for common Commerce Engine tasks. These are designed to give AI assistants the right context to produce production-quality code on the first try.

Browse Prompts

Copy-paste prompts for authentication, catalog, cart, checkout, Next.js, and more