Shopify extensions

From toilahuongg/Shopify-Agents-Kit · View interactive version

Shopify extensions is an AI agent skill from the GitHub repository toilahuongg/Shopify-Agents-Kit. Guide for building and managing Shopify Extensions (Admin, Checkout, Theme, Post-purchase, etc.) using the latest Shopify CLI and APIs.

How to use this skill

Skill file

Shopify Extensions Guide

This skill provides a comprehensive guide to building Shopify Extensions. Extensions allow you to integrate your app's functionality directly into Shopify's user interfaces (Admin, Checkout, Online Store, POS) and backend logic.

📚 Official References (Latest)

🛠️ Prerequisites

```bash

npm install -g @shopify/cli@latest

```

🚀 Common Extension Types

1. Admin UI Extensions

Embed your app into the Shopify Admin interface.

```toml

[[extensions]]

type = "ui_extension"

name = "product-action"

handle = "product-action"

[[extensions.targeting]]

target = "admin.product-details.action.render"

module = "./src/ActionExtension.jsx"

```

2. Checkout UI Extensions

Customize the checkout flow (requires Shopify Plus for some features).

```toml

[[extensions]]

type = "ui_extension"

name = "checkout-banner"

handle = "checkout-banner"

[[extensions.targeting]]

target = "purchase.checkout.block.render"

module = "./src/CheckoutBanner.jsx"

```

3. Theme App Extensions

Integrate with Online Store 2.0 themes without modifying theme code.

4. specialized Extensions

💻 CLI Extension Creation

The shopify app generate extension command is the primary way to create new extensions.

Basic Usage

shopify app generate extension

This runs an interactive wizard where you select the extension type and name.

Non-Interactive Usage (CI/CD or Scripts)

You can bypass prompts by providing flags:

shopify app generate extension --name "my-extension" --template <template_type> --flavor <flavor>

Examples

Create a Checkout UI Extension (React):

shopify app generate extension --template checkout_ui --name "checkout-upsell" --flavor react

Create a Theme App Extension:

shopify app generate extension --template theme_app_extension --name "trust-badges"

Create a Shopify Function (Product Discount - Rust):

shopify app generate extension --template product_discounts --name "volume-discount" --flavor rust

Useful Flags

📝 Development Workflow

  1. Generate Extension:

```bash

shopify app generate extension

```

Select the extension type from the list.

  1. Develop:
  1. Deploy:

```bash

shopify app deploy

```

This publishes the extension version to Shopify Partners.

  1. Publish:

💡 Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.