Skip to main content

AI-Assisted Development

Commerce Engine provides first-class support for AI-assisted development. Our documentation is machine-readable out of the box, and we publish a skill.md so AI coding agents can deeply understand our platform.

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://docs.commercengine.io/llms.txt

skill.md

We also host a skill.md file following the Agent Skills specification. This tells agents what they can accomplish with Commerce Engine, what SDK patterns to follow, and what constraints apply.
https://docs.commercengine.io/skill.md
Both files serve different purposes:
  • llms.txt is a directory - it lists all pages so agents know where to find information.
  • skill.md is a capability summary - it tells agents what they can do with Commerce Engine, what inputs they need, and what rules to follow.

LLM-Optimized API Reference

In addition to the standard docs, 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 the Skill to Your Agent

Using the skills CLI

The fastest way to add Commerce Engine capabilities to your AI agent:
npx skills add docs.commercengine.io
This downloads our skill.md and adds Commerce Engine’s capabilities to your agent’s context.

Claude Code

Add the skill directly:
claude skill add docs.commercengine.io

Manual

Fetch https://docs.commercengine.io/skill.md and place it in your project. Any agent that supports the Agent Skills spec will pick it up automatically.

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