shopify-checkout-ui

Build Shopify checkout UI extensions — extension targets, UI primitives, Preact/Remote DOM rendering, checkout APIs, metafield access, post-purchase extensions, and thank-you page customization. Use when customizing Shopify checkout.

17 stars

Best use case

shopify-checkout-ui is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Build Shopify checkout UI extensions — extension targets, UI primitives, Preact/Remote DOM rendering, checkout APIs, metafield access, post-purchase extensions, and thank-you page customization. Use when customizing Shopify checkout.

Teams using shopify-checkout-ui should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/shopify-checkout-ui/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/shopify-commerce/.agent/skills/shopify-checkout-ui/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/shopify-checkout-ui/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How shopify-checkout-ui Compares

Feature / Agentshopify-checkout-uiStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Build Shopify checkout UI extensions — extension targets, UI primitives, Preact/Remote DOM rendering, checkout APIs, metafield access, post-purchase extensions, and thank-you page customization. Use when customizing Shopify checkout.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Shopify Checkout UI Extensions

## Before writing code

**Fetch live docs**:
1. Fetch `https://shopify.dev/docs/apps/build/checkout` for checkout extensions
2. Web-search `site:shopify.dev checkout ui extension targets` for available targets
3. Web-search `site:shopify.dev checkout ui components` for UI primitives

## What Are Checkout UI Extensions

Client-side extensions that add UI to Shopify's checkout:
- Render at specific **extension targets** (locations in checkout flow)
- Use Shopify's **UI primitives** (not Polaris, not HTML)
- Built with **Preact** and **Remote DOM** — sandboxed rendering
- Access checkout state via **APIs** (no direct DOM access)

**Important:** You cannot replace Shopify's checkout — only extend it at designated points.

## Extension Targets

Locations where extensions can render:

### Checkout Page
- `purchase.checkout.block.render` — general block in checkout
- `purchase.checkout.header.render-after` — after checkout header
- `purchase.checkout.footer.render-after` — after checkout footer
- `purchase.checkout.contact.render-after` — after contact info
- `purchase.checkout.shipping-option-list.render-after` — after shipping options
- `purchase.checkout.payment-method-list.render-after` — after payment methods
- `purchase.checkout.actions.render-before` — before pay button

### Thank You Page
- `purchase.thank-you.block.render` — block on thank-you page

### Order Status Page
- `customer-account.order-status.block.render` — block on order status

### Post-Purchase
- `purchase.post-purchase.render` — full-page post-purchase upsell
- `purchase.post-purchase.should-render` — decide whether to show post-purchase

## UI Primitives

Checkout extensions use Shopify's UI components (NOT Polaris, NOT HTML):

| Component | Purpose |
|-----------|---------|
| `Banner` | Information/warning/error messages |
| `BlockStack` | Vertical layout |
| `Button` | Action buttons |
| `Checkbox` | Boolean input |
| `ChoiceList` | Radio/checkbox groups |
| `Divider` | Visual separator |
| `Form` | Form container |
| `Heading` | Section headings |
| `Icon` | Icons |
| `Image` | Images |
| `InlineStack` | Horizontal layout |
| `Link` | Navigation links |
| `Select` | Dropdown selection |
| `Text` | Text content |
| `TextBlock` | Block of text |
| `TextField` | Text input |

## Extension Structure

```
extensions/checkout-ui/
├── src/
│   └── Checkout.tsx           # Extension component
├── shopify.extension.toml     # Configuration
├── locales/
│   └── en.default.json        # Translations
└── package.json
```

### Configuration

```toml
api_version = "2025-01"

[[extensions]]
name = "Custom Checkout Banner"
handle = "custom-checkout-banner"
type = "ui_extension"

  [[extensions.targeting]]
  module = "./src/Checkout.tsx"
  target = "purchase.checkout.block.render"
```

### Extension Component

```tsx
import {
  Banner,
  useExtensionApi,
  useCartLines,
  useApplyCartLinesChange,
  reactExtension,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
  'purchase.checkout.block.render',
  () => <CheckoutBanner />,
);

function CheckoutBanner() {
  const { extension } = useExtensionApi();
  const cartLines = useCartLines();
  const applyCartLinesChange = useApplyCartLinesChange();

  const itemCount = cartLines.reduce((sum, line) => sum + line.quantity, 0);

  if (itemCount < 3) {
    return (
      <Banner status="info">
        Add {3 - itemCount} more item(s) for free shipping!
      </Banner>
    );
  }

  return null;
}
```

## Checkout APIs (Hooks)

| Hook | Purpose |
|------|---------|
| `useCartLines()` | Current cart line items |
| `useApplyCartLinesChange()` | Modify cart lines |
| `useShippingAddress()` | Shipping address |
| `useBuyerJourney()` | Intercept checkout progression |
| `useAppMetafields()` | Read app metafields |
| `useCheckoutToken()` | Checkout session token |
| `useCurrency()` | Current currency |
| `useLocalizationCountry()` | Customer country |
| `useExtensionApi()` | Full extension API |

## Best Practices

- Use Shopify UI primitives — never attempt raw HTML or Polaris components
- Keep checkout extensions minimal — do not slow down checkout
- Use `useBuyerJourney()` to validate before checkout progression
- Store extension configuration in metafields
- Support localization with locale files
- Test with `shopify app dev` and a development store checkout
- Follow Shopify's checkout UX guidelines — do not distract from payment

Fetch the Shopify checkout UI extensions docs for exact component APIs, available hooks, and extension target names before implementing.

Related Skills

woo-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize WooCommerce checkout — classic and block-based checkout, custom fields, validation, order processing, and checkout extensibility. Use when modifying the checkout flow, adding custom checkout fields, or integrating checkout extensions.

ucp-embedded-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Embedded Checkout Protocol — iframe/webview-based checkout UI for human escalation using JSON-RPC 2.0 over postMessage. Use when the checkout status is requires_escalation and the buyer needs a merchant-hosted UI.

ucp-checkout-rest

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the REST binding — create, get, update, complete, and cancel checkout sessions with proper headers, idempotency, status transitions, and error handling. Use when building REST-based UCP checkout endpoints or clients.

ucp-checkout-mcp

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the MCP (Model Context Protocol) binding — expose checkout operations as MCP tools for AI agents. Use when building an MCP server that AI agents like Claude or Gemini can call for commerce, or when integrating with Shopify's MCP endpoint.

ucp-checkout-a2a

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the A2A (Agent-to-Agent) binding — enable autonomous agent-to-agent commerce using Agent Cards and structured message parts. Use when building agent-to-agent commerce flows.

spree-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Spree's checkout — the Order state machine (cart → address → delivery → payment → confirm → complete), the Payment and Shipment sub-state machines, the return flow (ReturnAuthorization → CustomerReturn → Reimbursement → Refund), guest checkout, payment-step skipping for credit-covered orders, and the V3 checkout API surface. Use when building or customizing checkout flows, debugging state transitions, or wiring custom checkout steps.

shopify-webhooks

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Shopify webhooks — subscription methods (HTTP, EventBridge, Pub/Sub, SQS), HMAC verification, mandatory GDPR webhooks, delivery methods, retry policy, and idempotency. Use when building event-driven Shopify integrations.

shopify-themes

17
from OrcaQubits/agentic-commerce-skills-plugins

Develop Shopify themes — file structure, Online Store 2.0, sections and blocks, settings schema, Dawn reference theme, Theme Check linting, asset pipeline, and theme deployment. Use when building or customizing Shopify themes.

shopify-testing

17
from OrcaQubits/agentic-commerce-skills-plugins

Test Shopify applications — app testing with Vitest and Playwright, theme testing with Theme Check, Function testing, webhook testing, extension testing, and CI/CD pipelines. Use when writing tests for Shopify projects.

shopify-setup

17
from OrcaQubits/agentic-commerce-skills-plugins

Set up a Shopify development environment — Shopify CLI installation, Partner account, development stores, environment variables, project structures for themes, apps, and Hydrogen. Use when starting a new Shopify project.

shopify-security

17
from OrcaQubits/agentic-commerce-skills-plugins

Secure Shopify applications — HMAC webhook verification, session token validation, OAuth scope management, Content Security Policy, GDPR mandatory webhooks, input validation, and secure coding practices. Use when implementing Shopify security features.

shopify-polaris

17
from OrcaQubits/agentic-commerce-skills-plugins

Build Shopify app UIs with Polaris — component categories, Web Components transition, React legacy components, App Design Guidelines, accessibility, @shopify/draggable, and design tokens. Use when building Shopify admin app interfaces.