ck:shopify
Shopify CLIを使って、GraphQL/REST APIやPolaris UI、Liquidテンプレートなどを活用し、Shopifyアプリやテーマ、拡張機能などを開発・構築、さらに決済やWebhook連携まで実現するSkill。
📜 元の英語説明(参考)
Build Shopify apps, extensions, themes with Shopify CLI. Use for GraphQL/REST APIs, Polaris UI, Liquid templates, checkout customization, webhooks, billing integration.
🇯🇵 日本人クリエイター向け解説
Shopify CLIを使って、GraphQL/REST APIやPolaris UI、Liquidテンプレートなどを活用し、Shopifyアプリやテーマ、拡張機能などを開発・構築、さらに決済やWebhook連携まで実現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ck-shopify.zip https://jpskill.com/download/23657.zip && unzip -o ck-shopify.zip && rm ck-shopify.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23657.zip -OutFile "$d\ck-shopify.zip"; Expand-Archive "$d\ck-shopify.zip" -DestinationPath $d -Force; ri "$d\ck-shopify.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
ck-shopify.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
ck-shopifyフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 10
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Shopify開発
Shopifyプラットフォーム上でアプリ、拡張機能、テーマ、API連携を構築するための包括的なガイドです。
プラットフォーム概要
コアコンポーネント:
- Shopify CLI - 開発ワークフローツール
- GraphQL Admin API - データ操作の主要API(推奨)
- REST Admin API - レガシーAPI(メンテナンスモード)
- Polaris UI - 一貫性のあるインターフェースのためのデザインシステム
- Liquid - テーマ用のテンプレート言語
拡張ポイント:
- Checkout UI - チェックアウト体験のカスタマイズ
- Admin UI - 管理ダッシュボードの拡張
- POS UI - POS(販売時点情報管理)のカスタマイズ
- Customer Account - 購入後のページ
- Theme App Extensions - 組み込みテーマ機能
クイックスタート
前提条件
# Shopify CLIをインストール
npm install -g @shopify/cli@latest
# インストールを確認
shopify version
新しいアプリの作成
# アプリを初期化
shopify app init
# 開発サーバーを起動
shopify app dev
# 拡張機能を生成
shopify app generate extension --type checkout_ui_extension
# デプロイ
shopify app deploy
テーマ開発
# テーマを初期化
shopify theme init
# ローカルプレビューを起動
shopify theme dev
# ストアからプル
shopify theme pull --live
# ストアにプッシュ
shopify theme push --development
開発ワークフロー
1. アプリ開発
セットアップ:
shopify app init
cd my-app
アクセススコープの設定 (shopify.app.toml):
[access_scopes]
scopes = "read_products,write_products,read_orders"
開発の開始:
shopify app dev # トンネル付きのローカルサーバーを起動
拡張機能の追加:
shopify app generate extension --type checkout_ui_extension
デプロイ:
shopify app deploy # ビルドしてShopifyにアップロード
2. 拡張機能開発
利用可能なタイプ:
- Checkout UI -
checkout_ui_extension - Admin Action -
admin_action - Admin Block -
admin_block - POS UI -
pos_ui_extension - Function -
function(割引、支払い、配送、検証)
ワークフロー:
shopify app generate extension
# タイプを選択し、設定
shopify app dev # ローカルでテスト
shopify app deploy # 公開
3. テーマ開発
セットアップ:
shopify theme init
# Dawn(リファレンステーマ)を選択するか、新規で開始
ローカル開発:
shopify theme dev
# localhost:9292でプレビュー
# 開発テーマに自動同期
デプロイ:
shopify theme push --development # 開発テーマにプッシュ
shopify theme publish --theme=123 # ライブとして設定
何をいつ構築するか
アプリを構築する場合:
- 外部サービスとの連携
- 複数のストアにわたる機能の追加
- マーチャント向けの管理ツールの構築
- ストアデータをプログラムで管理
- 複雑なビジネスロジックの実装
- 機能に対する課金
拡張機能を構築する場合:
- チェックアウトフローのカスタマイズ
- 管理ページへのフィールド/機能の追加
- 小売店向けのPOSアクションの作成
- 割引/支払い/配送ルールの実装
- 顧客アカウントページの拡張
テーマを構築する場合:
- カスタムストアフロントデザインの作成
- ユニークなショッピング体験の構築
- 商品/コレクションページのカスタマイズ
- ブランド固有のレイアウトの実装
- ホームページ/コンテンツページの変更
組み合わせアプローチ:
アプリ + テーマ拡張機能:
- アプリがバックエンドロジックとデータを処理
- テーマ拡張機能がストアフロントUIを提供
- 例: 商品レビュー、ウィッシュリスト、サイズガイド
必須パターン
GraphQL商品クエリ
query GetProducts($first: Int!) {
products(first: $first) {
edges {
node {
id
title
handle
variants(first: 5) {
edges {
node {
id
price
inventoryQuantity
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
チェックアウト拡張機能 (React)
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商品表示
{% 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 %}
ベストプラクティス
API利用:
- 新規開発ではRESTよりもGraphQLを優先
- コスト削減のため、必要なフィールドのみをリクエスト
- 大規模なデータセットにはページネーションを実装
- バッチ処理には一括操作を使用
- レート制限を遵守(GraphQLはコストベース)
セキュリティ:
- API認証情報を環境変数に保存
- Webhook署名を検証
- 公開アプリにはOAuthを使用
- 最小限のアクセススコープを要求
- 組み込みアプリにはセッショントークンを実装
パフォーマンス:
- 適切な場合はAPIレスポンスをキャッシュ
- テーマ内の画像を最適化
- Liquidロジックの複雑さを最小限に抑える
- 拡張機能には非同期読み込みを使用
- GraphQLのクエリコストを監視
テスト:
- テストには開発ストアを使用
- さまざまなストアプランでテスト
- モバイル応答性を検証
- アクセシビリティ(キーボード、スクリーンリーダー)を確認
- GDPR準拠を検証
参考資料
高度なトピックに関する詳細ガイド:
スクリプト
shopify_init.py - Shopifyプロジェクトを対話的に初期化
python scripts/shopify_init.py
トラブルシューティング
レート制限エラー:
X-Shopify-Shop-Api-Call-Limitヘッダーを監視- I
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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
# Install Shopify CLI
npm install -g @shopify/cli@latest
# Verify installation
shopify version
Create New App
# 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
# 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:
shopify app init
cd my-app
Configure Access Scopes (shopify.app.toml):
[access_scopes]
scopes = "read_products,write_products,read_orders"
Start Development:
shopify app dev # Starts local server with tunnel
Add Extensions:
shopify app generate extension --type checkout_ui_extension
Deploy:
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:
shopify app generate extension
# Select type, configure
shopify app dev # Test locally
shopify app deploy # Publish
3. Theme Development
Setup:
shopify theme init
# Choose Dawn (reference theme) or start fresh
Local Development:
shopify theme dev
# Preview at localhost:9292
# Auto-syncs to development theme
Deployment:
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
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)
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
{% 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
python scripts/shopify_init.py
Troubleshooting
Rate Limit Errors:
- Monitor
X-Shopify-Shop-Api-Call-Limitheader - 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:
- Shopify Docs: https://shopify.dev/docs
- GraphQL API: https://shopify.dev/docs/api/admin-graphql
- Shopify CLI: https://shopify.dev/docs/api/shopify-cli
- Polaris: https://polaris.shopify.com
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.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (7,393 bytes)
- 📎 README.md (1,687 bytes)
- 📎 references/app-development.md (9,657 bytes)
- 📎 references/extensions.md (10,544 bytes)
- 📎 references/themes.md (10,324 bytes)
- 📎 scripts/.coverage (53,248 bytes)
- 📎 scripts/requirements.txt (452 bytes)
- 📎 scripts/shopify_init.py (12,675 bytes)
- 📎 scripts/tests/.coverage (53,248 bytes)
- 📎 scripts/tests/test_shopify_init.py (13,319 bytes)