shopify-checkout-extensions
БесплатноБез исполняемых скриптовНе проверенCustomize Shopify's checkout with UI extensions for upsells and custom fields, plus Shopify Functions for serverless discount and shipping logic
от finsilabs★ 69 звёзд на GitHubОб этом скилле
Shopify Checkout Extensions
Overview
Shopify Checkout Extensions allow apps to render custom UI blocks inside Shopify's checkout without forking the checkout template. Shopify Functions let you replace backend logic — discounts, shipping, payment methods, and order validation — with custom WebAssembly modules that run inside Shopify's infrastructure. Together they replace the deprecated checkout.liquid customization approach and work with both Shopify Plus and non-Plus stores (UI extensions) or Plus-only (some Functions targets).
When to Use This Skill
- When adding custom UI blocks to checkout (upsells, trust badges, gift message fields, warranty options)
- When implementing custom discount logic beyond native Shopify discount rules (e.g., tiered discounts, B2B pricing)
- When creating custom shipping method filtering or renaming based on cart contents
- When building payment customization to hide/rename payment methods for specific customers
- When validating order contents before checkout completes (e.g., quantity limits, region restrictions)
- When replacing deprecated
checkout.liquidcustomizations for Shopify Plus stores
Core Instructions
Scaffold an extension with Shopify CLI
# Inside an existing Shopify app directory shopify app generate extension # Choose: Checkout UI extension OR Shopify Function # Name: my-checkout-extensionThis creates an
extensions/my-checkout-extension/directory withsrc/index.tsx(UI) orsrc/index.ts(Function).Build a Checkout UI extension
Checkout UI extensions use a React-like component API from
@shopify/ui-extensions-react/checkout:// extensions/order-upsell/src/index.tsx import { reactExtension, useCartLines, useApplyCartLinesChange, useSettings, BlockStack, Button, Image, Text, InlineStack, Divider, } from "@shopify/ui-extensions-react/checkout"; const CheckoutBlock = reactExtension( "purchase.checkout.block.render", () => <OrderUpsell /> ); export { CheckoutBlock }; function OrderUpsell() { const cartLines = useCartLines(); const applyCartLinesChange = useApplyCartLinesChange(); const { upsell_variant_id: upsellVariantId } = useSettings(); // Only show upsell if a variant is configured and cart doesn't already contain it if (!upsellVariantId) return null; const alreadyInCart = cartLines.some( (line) => line.merchandise.id === upsellVariantId ); if (alreadyInCart) return null; const handleAddUpsell = async () => { await applyCartLinesChange({ type: "addCartLine", merchandiseId: upsellVariantId, quantity: 1, }); }; return ( <BlockStack spacing="base"> <Divider /> <InlineStack blockAlignment="center" spacing="base"> <Image source="https://cdn.shopify.com/s/files/..." aspectRatio={1} /> <BlockStack> <Text emphasis="bold">Add a gift bag for $3.99</Text> <Text appearance="subdued">Beautiful packaging for your order</Text> </BlockStack> <Button onPress={handleAddUpsell}>Add</Button> </InlineStack> </BlockStack> ); }Configure the extension in
shopify.extension.tomlapi_version = "2025-01" extensions type = "ui_extension" name = "Order Upsell" handle = "order-upsell" extensions.targeting module = "./src/index.tsx" target = "purchase.checkout.block.render" [extensions.settings] extensions.settings.fields key = "upsell_variant_id" type = "variant_reference" name = "Upsell Product Variant"Build a Shopify Function for custom discounts
Shopify Functions compile to WebAssembly. Use Rust or JavaScript:
// extensions/volume-discount/src/index.ts import type { RunInput, FunctionRunResult, CartLineInput, } from "../generated/api"; const NO_CHANGES: FunctionRunResult = { discounts: [], discountApplicationStrategy: "FIRST" }; export function run(input: RunInput): FunctionRunResult { const { cart } = input; // Calculate total quantity across all lines const totalQuantity = cart.lines.reduce( (sum, line) => sum + line.quantity, 0 ); // Tiered volume discount let discountPercent = 0; if (totalQuantity >= 20) discountPercent = 20; else if (totalQuantity >= 10) discountPercent = 10; else if (totalQuantity >= 5) discountPercent = 5; if (discountPercent === 0) return NO_CHANGES; return { discounts: [ { value: { percentage: { value: discountPercent.toString() }, }, targets: [{ orderSubtotal: { excludedVariantIds: [] } }], message: `${discountPercent}% volume discount (${totalQuantity} items)`,
Установить shopify-checkout-extensions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
claude-codecursorgemini-clicopilotcodex-clikiroopencodeВложенные файлы
FAQ
Что делает скилл shopify-checkout-extensions?
Customize Shopify's checkout with UI extensions for upsells and custom fields, plus Shopify Functions for serverless discount and shipping logic
Как установить скилл shopify-checkout-extensions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shopify-checkout-extensions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic