shopify-local-dev-loop
Configure Shopify local development with Shopify CLI, hot reload, and ngrok tunneling. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Shopify. Trigger with phrases like "shopify dev setup", "shopify local development", "shopify dev environment", "develop with shopify", "shopify CLI dev".
Best use case
shopify-local-dev-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Shopify local development with Shopify CLI, hot reload, and ngrok tunneling. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Shopify. Trigger with phrases like "shopify dev setup", "shopify local development", "shopify dev environment", "develop with shopify", "shopify CLI dev".
Teams using shopify-local-dev-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/shopify-local-dev-loop/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How shopify-local-dev-loop Compares
| Feature / Agent | shopify-local-dev-loop | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Shopify local development with Shopify CLI, hot reload, and ngrok tunneling. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Shopify. Trigger with phrases like "shopify dev setup", "shopify local development", "shopify dev environment", "develop with shopify", "shopify CLI dev".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# Shopify Local Dev Loop
## Overview
Set up a fast, reproducible local development workflow using Shopify CLI, ngrok tunneling for webhooks, and Vitest for testing against the Shopify API.
## Prerequisites
- Completed `shopify-install-auth` setup
- Node.js 18+ with npm/pnpm
- Shopify CLI 3.x (`npm install -g @shopify/cli`)
- A Shopify Partner account and development store
## Instructions
### Step 1: Scaffold with Shopify CLI
```bash
# Create a new Remix-based Shopify app (recommended)
shopify app init
# Or scaffold manually
mkdir my-shopify-app && cd my-shopify-app
npm init -y
npm install @shopify/shopify-api @shopify/shopify-app-remix \
@shopify/app-bridge-react @remix-run/node @remix-run/react
```
### Step 2: Project Structure
```
my-shopify-app/
├── app/
│ ├── routes/
│ │ ├── app._index.tsx # Main app page
│ │ ├── app.products.tsx # Products management
│ │ ├── auth.$.tsx # OAuth callback
│ │ └── webhooks.tsx # Webhook handler
│ ├── shopify.server.ts # Shopify API client setup
│ └── root.tsx
├── extensions/ # Theme app extensions
├── shopify.app.toml # App configuration
├── .env # Local secrets (git-ignored)
├── .env.example # Template for team
└── package.json
```
### Step 3: Configure shopify.app.toml
```toml
# shopify.app.toml — central app configuration
name = "My App"
client_id = "your_api_key_here"
[access_scopes]
scopes = "read_products,write_products,read_orders"
[auth]
redirect_urls = [
"https://localhost/auth/callback",
"https://localhost/auth/shopify/callback",
]
[webhooks]
api_version = "2024-10"
[webhooks.subscriptions]
# Mandatory GDPR webhooks
[[webhooks.subscriptions]]
topics = ["customers/data_request"]
uri = "/webhooks"
[[webhooks.subscriptions]]
topics = ["customers/redact"]
uri = "/webhooks"
[[webhooks.subscriptions]]
topics = ["shop/redact"]
uri = "/webhooks"
```
### Step 4: Start Dev Server with Tunnel
```bash
# Shopify CLI handles ngrok tunnel + OAuth automatically
shopify app dev
# This will:
# 1. Start your app on localhost:3000
# 2. Create an ngrok tunnel
# 3. Update your app URLs in Partner Dashboard
# 4. Open your app in the dev store admin
# 5. Hot reload on file changes
```
### Step 5: Set Up Testing
```typescript
// tests/shopify-client.test.ts
import { describe, it, expect, vi, beforeEach } from "vitest";
// Mock the Shopify API client
vi.mock("@shopify/shopify-api", () => ({
shopifyApi: vi.fn(() => ({
clients: {
Graphql: vi.fn().mockImplementation(() => ({
request: vi.fn().mockResolvedValue({
data: {
products: {
edges: [
{ node: { id: "gid://shopify/Product/1", title: "Test Product" } },
],
},
},
}),
})),
},
session: {
customAppSession: vi.fn(() => ({ shop: "test.myshopify.com" })),
},
})),
}));
describe("Shopify Integration", () => {
it("should fetch products", async () => {
// Test your product-fetching logic here
});
it("should handle GraphQL errors", async () => {
// Test error handling
});
});
```
```json
{
"scripts": {
"dev": "shopify app dev",
"build": "remix vite:build",
"test": "vitest",
"test:watch": "vitest --watch",
"lint": "eslint app/",
"shopify": "shopify",
"deploy": "shopify app deploy"
}
}
```
### Step 6: GraphQL Explorer for Development
```bash
# Open the Shopify GraphiQL explorer for your store
# Navigate to: https://your-store.myshopify.com/admin/api/2024-10/graphql.json
# Use the Shopify Admin GraphiQL app (install from admin)
# Or use curl to test queries directly:
curl -X POST \
"https://your-store.myshopify.com/admin/api/2024-10/graphql.json" \
-H "Content-Type: application/json" \
-H "X-Shopify-Access-Token: shpat_xxx" \
-d '{"query": "{ shop { name } }"}'
```
## Output
- Shopify CLI dev server running with hot reload
- Ngrok tunnel forwarding to localhost
- Test suite with mocked Shopify API calls
- GraphQL explorer available for API exploration
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `Could not find a Shopify partner organization` | CLI not logged in | Run `shopify auth login` |
| `Port 3000 already in use` | Another process on port | Kill process or use `--port 3001` |
| `Tunnel connection failed` | ngrok issues | Check ngrok status or use `--tunnel-url` |
| `App not installed on store` | First time setup | Open the URL CLI provides, accept install |
| `SHOPIFY_API_KEY not set` | Missing .env | Copy from `.env.example` and fill in values |
## Examples
### Debug with Request Logging
```typescript
// Enable verbose request logging in development
import { LogSeverity } from "@shopify/shopify-api";
const shopify = shopifyApi({
// ... other config
logger: {
level: LogSeverity.Debug, // Logs all requests/responses
httpRequests: true,
timestamps: true,
},
});
```
### Seed Test Data
```typescript
// scripts/seed-dev-store.ts — create test products
async function seedStore(client: any) {
const products = [
{ title: "Test Widget", productType: "Widget", vendor: "Dev" },
{ title: "Test Gadget", productType: "Gadget", vendor: "Dev" },
];
for (const product of products) {
await client.request(`
mutation { productCreate(product: {
title: "${product.title}",
productType: "${product.productType}",
vendor: "${product.vendor}"
}) {
product { id title }
userErrors { field message }
}}
`);
}
}
```
## Resources
- [Shopify CLI Documentation](https://shopify.dev/docs/apps/build/cli-for-apps)
- [Shopify App Remix Template](https://github.com/Shopify/shopify-app-template-remix)
- [Vitest Documentation](https://vitest.dev/)
- [Shopify GraphiQL Explorer](https://shopify.dev/docs/apps/build/graphql)
## Next Steps
See `shopify-sdk-patterns` for production-ready code patterns.Related Skills
workhuman-local-dev-loop
Workhuman local dev loop for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman local dev loop".
wispr-local-dev-loop
Wispr Flow local dev loop for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr local dev loop".
windsurf-local-dev-loop
Configure Windsurf local development workflow with Cascade, Previews, and terminal integration. Use when setting up a development environment, configuring Turbo mode, or establishing a fast iteration cycle with Windsurf AI. Trigger with phrases like "windsurf dev setup", "windsurf local development", "windsurf dev environment", "windsurf workflow", "develop with windsurf".
webflow-local-dev-loop
Configure a Webflow local development workflow with TypeScript, hot reload, mocked API tests, and webhook tunneling via ngrok. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with the Webflow Data API. Trigger with phrases like "webflow dev setup", "webflow local development", "webflow dev environment", "develop with webflow".
vercel-local-dev-loop
Configure Vercel local development with vercel dev, environment variables, and hot reload. Use when setting up a development environment, testing serverless functions locally, or establishing a fast iteration cycle with Vercel. Trigger with phrases like "vercel dev setup", "vercel local development", "vercel dev environment", "develop with vercel locally".
veeva-local-dev-loop
Veeva Vault local dev loop for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva local dev loop".
vastai-local-dev-loop
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai".
twinmind-local-dev-loop
Set up local development workflow with TwinMind API integration. Use when building applications that integrate TwinMind transcription, testing API calls locally, or developing meeting automation tools. Trigger with phrases like "twinmind dev setup", "twinmind local development", "twinmind API testing", "build with twinmind".
together-local-dev-loop
Together AI local dev loop for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together local dev loop".
techsmith-local-dev-loop
TechSmith local dev loop for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith local dev loop".
supabase-local-dev-loop
Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".
stackblitz-local-dev-loop
Configure local development for WebContainer applications with hot reload and testing. Use when building browser-based IDEs, testing WebContainer file operations, or setting up development workflows for WebContainer projects. Trigger: "stackblitz dev setup", "webcontainer local", "test webcontainers locally".