Agent skill

shopify

Shopify platform development. Stack: Shopify CLI, GraphQL/REST APIs, Polaris UI, Liquid templating. Capabilities: app development (OAuth), checkout UI extensions, admin UI extensions, POS extensions, theme development, webhooks, billing API, product/order/customer management. Actions: build, extend, customize, integrate Shopify apps/themes. Keywords: Shopify, Shopify CLI, GraphQL Admin API, REST API, Polaris, Liquid, checkout extension, admin extension, POS extension, theme, webhook, billing API, OAuth, app bridge, metafields, product, order, customer, storefront, hydrogen, oxygen. Use when: building Shopify apps, customizing checkout, creating admin interfaces, developing themes, integrating payments, managing store data via APIs, extending Shopify functionality.

Stars 10
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/samhvw8/dot-claude/tree/main/skills/shopify

SKILL.md

Shopify Development

Comprehensive guide for building on Shopify platform: apps, extensions, themes, and API integrations.

Platform Overview

Core Components:

  • Shopify CLI - Development workflow tool
  • GraphQL Admin API - Primary API for data operations (recommended)
  • REST Admin API - Legacy API (maintenance mode)
  • Polaris UI - Design system for consistent interfaces
  • Liquid - Template language for themes

Extension Points:

  • Checkout UI - Customize checkout experience
  • Admin UI - Extend admin dashboard
  • POS UI - Point of Sale customization
  • Customer Account - Post-purchase pages
  • Theme App Extensions - Embedded theme functionality

Quick Start

Prerequisites

bash
# Install Shopify CLI
npm install -g @shopify/cli@latest

# Verify installation
shopify version

Create New App

bash
# Initialize app
shopify app init

# Start development server
shopify app dev

# Generate extension
shopify app generate extension --type checkout_ui_extension

# Deploy
shopify app deploy

Theme Development

bash
# Initialize theme
shopify theme init

# Start local preview
shopify theme dev

# Pull from store
shopify theme pull --live

# Push to store
shopify theme push --development

Development Workflow

1. App Development

Setup:

bash
shopify app init
cd my-app

Configure Access Scopes (shopify.app.toml):

toml
[access_scopes]
scopes = "read_products,write_products,read_orders"

Start Development:

bash
shopify app dev  # Starts local server with tunnel

Add Extensions:

bash
shopify app generate extension --type checkout_ui_extension

Deploy:

bash
shopify app deploy  # Builds and uploads to Shopify

2. Extension Development

Available Types:

  • Checkout UI - checkout_ui_extension
  • Admin Action - admin_action
  • Admin Block - admin_block
  • POS UI - pos_ui_extension
  • Function - function (discounts, payment, delivery, validation)

Workflow:

bash
shopify app generate extension
# Select type, configure
shopify app dev  # Test locally
shopify app deploy  # Publish

3. Theme Development

Setup:

bash
shopify theme init
# Choose Dawn (reference theme) or start fresh

Local Development:

bash
shopify theme dev
# Preview at localhost:9292
# Auto-syncs to development theme

Deployment:

bash
shopify theme push --development  # Push to dev theme
shopify theme publish --theme=123  # Set as live

When to Build What

Build an App When:

  • Integrating external services
  • Adding functionality across multiple stores
  • Building merchant-facing admin tools
  • Managing store data programmatically
  • Implementing complex business logic
  • Charging for functionality

Build an Extension When:

  • Customizing checkout flow
  • Adding fields/features to admin pages
  • Creating POS actions for retail
  • Implementing discount/payment/shipping rules
  • Extending customer account pages

Build a Theme When:

  • Creating custom storefront design
  • Building unique shopping experiences
  • Customizing product/collection pages
  • Implementing brand-specific layouts
  • Modifying homepage/content pages

Combination Approach:

App + Theme Extension:

  • App handles backend logic and data
  • Theme extension provides storefront UI
  • Example: Product reviews, wishlists, size guides

Essential Patterns

GraphQL Product Query

graphql
query GetProducts($first: Int!) {
  products(first: $first) {
    edges {
      node {
        id
        title
        handle
        variants(first: 5) {
          edges {
            node {
              id
              price
              inventoryQuantity
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Checkout Extension (React)

javascript
import { reactExtension, BlockStack, TextField, Checkbox } from '@shopify/ui-extensions-react/checkout';

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

function Extension() {
  const [message, setMessage] = useState('');

  return (
    <BlockStack>
      <TextField label="Gift Message" value={message} onChange={setMessage} />
    </BlockStack>
  );
}

Liquid Product Display

liquid
{% for product in collection.products %}
  <div class="product-card">
    <img src="{{ product.featured_image | img_url: 'medium' }}" alt="{{ product.title }}">
    <h3>{{ product.title }}</h3>
    <p>{{ product.price | money }}</p>
    <a href="{{ product.url }}">View Details</a>
  </div>
{% endfor %}

Best Practices

API Usage:

  • Prefer GraphQL over REST for new development
  • Request only needed fields to reduce costs
  • Implement pagination for large datasets
  • Use bulk operations for batch processing
  • Respect rate limits (cost-based for GraphQL)

Security:

  • Store API credentials in environment variables
  • Verify webhook signatures
  • Use OAuth for public apps
  • Request minimal access scopes
  • Implement session tokens for embedded apps

Performance:

  • Cache API responses when appropriate
  • Optimize images in themes
  • Minimize Liquid logic complexity
  • Use async loading for extensions
  • Monitor query costs in GraphQL

Testing:

  • Use development stores for testing
  • Test across different store plans
  • Verify mobile responsiveness
  • Check accessibility (keyboard, screen readers)
  • Validate GDPR compliance

Reference Documentation

Detailed guides for advanced topics:

  • App Development - OAuth, APIs, webhooks, billing
  • Extensions - Checkout, Admin, POS, Functions
  • Themes - Liquid, sections, deployment

Scripts

shopify_init.py - Initialize Shopify projects interactively

bash
python scripts/shopify_init.py

Troubleshooting

Rate Limit Errors:

  • Monitor X-Shopify-Shop-Api-Call-Limit header
  • Implement exponential backoff
  • Use bulk operations for large datasets

Authentication Failures:

  • Verify access token validity
  • Check required scopes granted
  • Ensure OAuth flow completed

Extension Not Appearing:

  • Verify extension target correct
  • Check extension published
  • Ensure app installed on store

Webhook Not Receiving:

  • Verify webhook URL accessible
  • Check signature validation
  • Review logs in Partner Dashboard

Resources

Official Documentation:

Tools:

  • GraphiQL Explorer (Admin → Settings → Apps → Develop apps)
  • Partner Dashboard (app management)
  • Development stores (free testing)

API Versioning:

  • Quarterly releases (YYYY-MM format)
  • Current: 2025-01
  • 12-month support per version
  • Test before version updates

Note: This skill covers Shopify platform as of January 2025. Refer to official documentation for latest updates.

Expand your agent's capabilities with these related and highly-rated skills.

samhvw8/dot-claude

debugging

Systematic debugging methodology with root cause analysis. Phases: investigate, hypothesize, validate, verify. Capabilities: backward call stack tracing, multi-layer validation, verification protocols, symptom analysis, regression prevention. Actions: debug, investigate, trace, analyze, validate, verify bugs. Keywords: debugging, root cause, bug fix, stack trace, error investigation, test failure, exception handling, breakpoint, logging, reproduce, isolate, regression, call stack, symptom vs cause, hypothesis testing, validation, verification protocol. Use when: encountering bugs, analyzing test failures, tracing unexpected behavior, investigating performance issues, preventing regressions, validating fixes before completion claims.

10 0
Explore
samhvw8/dot-claude

prompt-enhancer

Prompt engineering and optimization for AI/LLMs. Capabilities: transform unclear prompts, reduce token usage, improve structure, add constraints, optimize for specific models, backward-compatible rewrites. Actions: improve, enhance, optimize, refactor, compress prompts. Keywords: prompt engineering, prompt optimization, token efficiency, LLM prompt, AI prompt, clarity, structure, system prompt, user prompt, few-shot, chain-of-thought, instruction tuning, prompt compression, token reduction, prompt rewrite, semantic preservation. Use when: improving unclear prompts, reducing token consumption, optimizing LLM outputs, restructuring verbose requests, creating system prompts, enhancing prompt clarity.

10 0
Explore
samhvw8/dot-claude

refactoring-expert

Systematic code refactoring following Martin Fowler's catalog. Methodologies: characterization tests, Red-Green-Refactor, incremental transformation. Capabilities: SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization, design patterns, functional programming patterns. Actions: refactor, extract, inline, rename, move, simplify code. Keywords: refactor, SOLID, DRY, code smell, complexity, extract method, inline, rename, move, clean code, technical debt, legacy code, design pattern, characterization test, Red-Green-Refactor, functional programming, higher-order function, immutability, pure function, composition, currying, side effects. Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns.

10 0
Explore
samhvw8/dot-claude

infra-engineer

Comprehensive infrastructure engineering covering DevOps, cloud platforms, FinOps, and DevSecOps. Platforms: AWS (EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation), Azure basics, Cloudflare (Workers, R2, D1, Pages), GCP (GKE, Cloud Run, Cloud Storage), Docker, Kubernetes. Capabilities: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), GitOps, infrastructure as code (Terraform, CloudFormation), container orchestration, cost optimization, security scanning, vulnerability management, secrets management, compliance (SOC2, HIPAA). Actions: deploy, configure, manage, scale, monitor, secure, optimize cloud infrastructure. Keywords: AWS, EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation, Azure, Kubernetes, k8s, Docker, Terraform, CI/CD, GitHub Actions, GitLab CI, Jenkins, ArgoCD, Flux, cost optimization, FinOps, reserved instances, spot instances, security scanning, SAST, DAST, vulnerability management, secrets management, Vault, compliance, monitoring, observability. Use when: deploying to AWS/Azure/GCP/Cloudflare, setting up CI/CD pipelines, implementing GitOps workflows, managing Kubernetes clusters, optimizing cloud costs, implementing security best practices, managing infrastructure as code, container orchestration, compliance requirements, cost analysis and optimization.

10 0
Explore
samhvw8/dot-claude

aesthetic

Visual design intelligence and UI aesthetics. Integrates: chrome-devtools, ai-multimodal, media-processing. Capabilities: design analysis, visual hierarchy, color theory, typography, micro-interactions, animation, design systems, accessibility. Actions: analyze, design, create, capture, evaluate, implement UI aesthetics. Keywords: Dribbble, Behance, Mobbin, design inspiration, visual hierarchy, color palette, typography, spacing, animation, micro-interaction, design system, style guide, accessibility, WCAG, contrast ratio, golden ratio, whitespace, visual rhythm. Use when: building beautiful UIs, analyzing design inspiration, implementing visual hierarchy, adding animations/micro-interactions, creating design systems, evaluating aesthetic quality, capturing design screenshots.

10 0
Explore
samhvw8/dot-claude

ui-ux-design

UI/UX design reference database. 50+ styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

10 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results