generate-extension

generate-extension is a command for Claude Code from khadinakbarlabs/shopify-app-builder. It costs 21 tokens per session (688 once invoked), scanned A, original, MIT.

A workflow for creating Shopify app extensions, which add custom behavior to a store theme, checkout, cart, payment choices, or the Shopify admin.

In plain words
What is it for?
Use it to scaffold Shopify Functions, theme extensions, and admin interfaces for cart changes, discounts, payment customization, or custom app pages.
Why use it?
It helps select the appropriate extension type and create the expected files, configuration, and development structure.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the shopify-app-builder plugin — 32 skills, 9 commands, 5 agents shipped together

Good fit Use it to scaffold Shopify Functions, theme extensions, and admin interfaces for cart changes, discounts, payment customization, or custom app pages.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/khadinakbarlabs/shopify-app-builder/generate-extension
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/khadinakbarlabs/shopify-app-builder

Made for: Claude Code.

Or install shopify-app-builder, the plugin that ships this one along with the rest of its 32 skills, 9 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-extension

README.md
[![agentmods](https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/generate-extension/github.svg)](https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/generate-extension)
Your own site
<a href="https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/generate-extension"><img src="https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/generate-extension/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-extension

Your own site · 80×15
<a href="https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/generate-extension"><img src="https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/generate-extension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00688
Opus 5 $0.00010 $0.00344
Sonnet 5 $0.00004 $0.00138
Haiku 4.5 $0.00002 $0.00069

Measured 8d ago against content hash 6d2d5a666205, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

generate-extension scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/generate-extension.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Shopify Extension

You are creating a Shopify app extension to extend storefront or admin functionality using Shopify Functions, Theme App Extensions, or Admin UI components.

Extension Type Selection

  1. Choose extension architecture

    • Cart Transformer (Shopify Functions): Modify cart before checkout
    • Discount Customization (Shopify Functions): Dynamic discount logic (WASM-based, Rust/JavaScript)
    • Payment Customization (Shopify Functions): Control payment method visibility
    • Theme App Extension: Inject liquid sections/blocks into Online Store 2.0 themes
    • Admin UI Extension: Custom app pages using App Bridge 4.x and Polaris
    • Reference skill: extension types (04_functions_auth_billing_mcp.md)
  2. Scaffold extension template

    • Run shopify app extension create --type [extension-type] --name [feature-name]
    • Select language (JavaScript recommended for Functions; JSX for Admin UI)
    • Confirm directory structure created in /extensions/[feature-name]
    • Install dependencies for extension workspace

Function Development (if applicable)

  1. Build Shopify Function logic

    • Create input.graphql with query for cart/discount/payment data
    • Implement function.ts with pure function logic (no side effects)
    • Keep execution within 5ms time window (critical constraint)
    • Use Rust for performance-critical discount/payment logic
    • Reference skill: Functions architecture (04_functions_auth_billing_mcp.md)
  2. Define function configuration

    • Set shopify.extension.toml with API version and capability
    • Map graphQL query to inputs for function execution
    • Define function output format (cart updates, discounts, or payment methods)
    • Test function with example payloads before deployment
    • Reference skill: function configuration (04_functions_auth_billing_mcp.md)

Frontend Extension (if applicable)

  1. Build Admin or Theme UI
    • Use App Bridge 4.x for Admin UI extensions (web components, session tokens)
    • Use Polaris React 18+ components for admin page styling
    • Import resource picker API for product/collection selection
    • Implement real-time updates with Admin API subscriptions
    • For Theme App Extensions, dedupe all schema settings[].id values and blocks[].type values before returning code. Resolve this plugin's installation root, then run node <plugin-root>/scripts/validate-shopify-schema-ids.mjs extensions/[feature-name] if a Liquid schema or app block is generated.
    • Reference skill: App Bridge and Polaris (03_frontend.md)

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 68 lines · 21 tokens per session scan A 6d2d5a666205

Subscribe to this mod's changes

generate-extension is a command published in the GitHub repository khadinakbarlabs/shopify-app-builder (1 stars, last pushed 29d ago), licensed MIT. It adds 21 tokens to every session and 688 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.