agentleFS
mohitkalemohitkale/shopify-devkit/skills/checkout-ui-ext/SKILL.md

checkout-ui-ext

Skill0 starsChanged 4 months agoMITView on GitHub

Scaffold a Shopify checkout UI extension with extension.toml and src/Checkout.jsx. Use when the user asks to create a checkout extension, add a banner or input to the checkout page, build an upsell widget for checkout, or scaffold a Shopify checkout UI extension.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a Shopify checkout UI extension using React and the @shopify/ui-extensions-react/checkout package.

    line 10
  2. Distinctive:

    Ask the user: "What should the extension do?" Example answers: show a banner, collect a gift note, offer a free item, display loyalty …

    line 18
  3. Distinctive:

    Ask for the target. Common targets are:

    line 19
  4. Distinctive:

    Read the generated extension files, announce each requested change, then make only the requested UI and configuration changes.

    line 28
  5. Very specific:

    Keep the package.json, lockfile, and build scripts emitted by shopify app generate extension.

    line 110
  6. Very specific:

    Every Banner has a title. Screen readers announce it as a region.

    line 142
  7. Very specific:

    Use Text with appearance="subdued" rather than custom colors.

    line 143
  8. Very specific:

    Never render raw HTML from a settings field.

    line 144
  9. Very specific:

    Do not use api_version = "unstable" or omit the version.

    line 148
  10. Very specific:

    Do not fetch from third-party domains without setting network_access = true in the extension TOML and declaring the domain in the app's …

    line 149
  11. Distinctive:

    Do not include secret tokens in the extension bundle.

    line 150
  12. Distinctive:

    Do not block checkout progress unless the extension has a clear validation reason and a visible error message for the buyer.

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scaffold a checkout UI extension

Create a Shopify checkout UI extension using React and the @shopify/ui-extensions-react/checkout package. Start with the files generated by the installed Shopify CLI, then make the minimum requested customization. This keeps package versions and target contracts aligned with the developer's CLI.

Inputs

$ARGUMENTS is an optional extension handle in kebab-case (for example upsell-banner). If empty, ask the user for the handle and purpose.

Workflow

  1. Ask the user: "What should the extension do?" Example answers: show a banner, collect a gift note, offer a free item, display loyalty points.
  2. Ask for the target. Common targets are:
    • purchase.checkout.block.render (flexible, merchant places it in the editor)
    • purchase.checkout.delivery-address.render-before
    • purchase.checkout.shipping-option-list.render-after
    • purchase.checkout.payment-method-list.render-after
    • purchase.checkout.reductions.render-after
    • purchase.thank-you.block.render
  3. Confirm the parent Shopify app directory. Extensions live under extensions/<handle>/.
  4. Confirm before running shopify app generate extension, choose the checkout UI template, and use the requested handle. The CLI owns the initial package versions and file layout.
  5. Read the generated extension files, announce each requested change, then make only the requested UI and configuration changes. Retain the generated package versions unless the user is deliberately upgrading them.
  6. Print the commands to build and preview.

shopify.extension.toml

api_version = "2026-07"

[[extensions]]
name = "Upsell banner"
handle = "upsell-banner"
type = "ui_extension"

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

  [extensions.capabilities]
  network_access = false
  block_progress = false
  api_access = true

  [extensions.settings]
    [[extensions.settings.fields]]
    key = "banner_title"
    type = "single_line_text_field"
    name = "Banner title"
    description = "Heading shown in the checkout banner."

    [[extensions.settings.fields]]
    key = "banner_body"
    type = "multi_line_text_field"
    name = "Banner body"
    description = "Body text shown in the checkout banner."

Example src/Checkout.jsx

import {
  reactExtension,
  Banner,
  BlockStack,
  Text,
  useApi,
  useSettings,
  useTranslate,
} from "@shopify/ui-extensions-react/checkout";

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

function Extension() {
  const translate = useTranslate();
  const { extension } = useApi();
  const { banner_title, banner_body } = useSettings();

  const title = typeof banner_title === "string" && banner_title.length > 0
    ? banner_title
    : translate("defaultTitle");

  const body = typeof banner_body === "string" && banner_body.length > 0
    ? banner_body
    : translate("defaultBody");

  return (
    <Banner title={title} status="info">
      <BlockStack>
        <Text>{body}</Text>
        <Text size="small" appearance="subdued">
          {translate("placement", { target: extension.target })}
        </Text>
      </BlockStack>
    </Banner>
  );
}

Package versions and testing

Keep the package.json, lockfile, and build scripts emitted by shopify app generate extension. Shopify releases Checkout UI extension API packages in lockstep with API versions; the generated template prevents this skill from pinning a stale or nonexistent package version.

The Shopify CLI bundles the extension with its internal builder. You do not need Vite or Rollup. Calling shopify app build from the app root builds every extension in extensions/. For API 2026-04 or later, add focused unit tests with @shopify/ui-extensions-tester when the extension has logic beyond static display.

Locales: locales/en.default.json

{
  "defaultTitle": "Special offer",
  "defaultBody": "Add one more item to unlock free shipping.",
  "placement": "Shown at {target}"
}

Build and preview

From the app root:

shopify app dev

This opens a tunnel, installs the extension on the development store, and shows a preview URL. Open the preview URL and walk through checkout to see the extension in the target position.

Capability notes

  1. network_access = false keeps latency low and removes a surface for data leaks. Turn it on only if the extension must call your backend.
  2. block_progress = false means the extension cannot stop a buyer from completing checkout. Turn it on only when the extension collects information that must be present before the order is placed (for example, a gift note). A blocking extension must use useBuyerJourneyIntercept to validate.
  3. api_access = true is required to read cart and buyer data through the useApi hooks.

Accessibility checks

  1. Every Banner has a title. Screen readers announce it as a region.
  2. Use Text with appearance="subdued" rather than custom colors. Shopify themes handle contrast.
  3. Never render raw HTML from a settings field. Render only inside <Text> or other Shopify UI components.

Do not

  • Do not use api_version = "unstable" or omit the version. Pin to a released version.
  • Do not fetch from third-party domains without setting network_access = true in the extension TOML and declaring the domain in the app's Partner Dashboard. The CLI rejects deploys that call out to undeclared domains.
  • Do not include secret tokens in the extension bundle. The bundle is public.
  • Do not block checkout progress unless the extension has a clear validation reason and a visible error message for the buyer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.