/shopify-pack:shopify-security-basicsfrom shopify-pack
Secures Shopify apps with credential storage, webhook HMAC verification, OAuth request validation, and minimal access scope guidance.
Ships in shopify-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Security essentials for Shopify apps: credential management, webhook HMAC validation, request verification, and least-privilege access scopes.
# .env — NEVER commit
SHOPIFY_API_KEY=your_api_key
SHOPIFY_API_SECRET=your_api_secret_key
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .gitignore — add immediately
.env
.env.local
.env.*.local
*.pem
Token format reference:
| Token Type | Prefix | Length | Used For |
|---|---|---|---|
| Admin API access token | shpat_ | 38 chars | Server-side Admin API |
| Storefront API token | varies | varies | Client-safe storefront queries |
| API secret key | none | 32+ hex | Webhook HMAC, OAuth |
Shopify signs every webhook with your app's API secret using HMAC-SHA256. The signature is in the X-Shopify-Hmac-Sha256 header. Use crypto.timingSafeEqual for comparison to prevent timing attacks. The middleware must use raw body parser (not JSON parser).
See Webhook HMAC Verification for the complete implementation.
Verify that incoming OAuth requests from Shopify are authentic by checking the HMAC query parameter. The library handles this automatically, but the manual approach sorts params alphabetically, creates a query string, and compares HMAC hex digests.
See OAuth Request Verification for the complete implementation.
Only request the scopes your app actually needs:
| Use Case | Required Scopes |
|---|---|
| Read-only product catalog | read_products |
| Product management | read_products, write_products |
| Order dashboard | read_orders |
| Fulfillment automation | read_orders, write_fulfillments, read_fulfillments |
| Customer loyalty app | read_customers, write_customers |
| Full admin app | Request scopes incrementally, not all at once |
# shopify.app.toml — start minimal, add as needed
[access_scopes]
scopes = "read_products"
# Use optional scopes for features that not all merchants need
[access_scopes.optional]
scopes = "write_products,read_orders"
// Embedded apps must set proper CSP headers
app.use((req, res, next) => {
const shop = req.query.shop as string;
res.setHeader(
"Content-Security-Policy",
`frame-ancestors https://${shop} https://admin.shopify.com;`
);
next();
});
| Security Issue | Detection | Mitigation |
|---|---|---|
| Token in git history | git log -p | grep shpat_ | Rotate token immediately, use git-secrets |
| Invalid webhook HMAC | 401 responses in webhook handler | Verify API secret matches Partner Dashboard |
| Missing scope | 403 errors on API calls | Add scope to shopify.app.toml and re-auth |
| Token exposed in client JS | Browser devtools | Never send admin tokens to the browser |
.env files in .gitignoreframe-ancestors set for embedded appsgit-secrets or similar pre-commit hook installed# Install git-secrets
brew install git-secrets # macOS
# or: sudo apt install git-secrets # Linux
# Add Shopify patterns
git secrets --add 'shpat_[a-f0-9]{32}'
git secrets --add 'shpss_[a-f0-9]{32}'
# Install hook
git secrets --install
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
38 skills in this plugin
/shopify-advanced-troubleshootingDebug complex Shopify API issues using cost analysis, request tracing,
webhook delivery inspection, and GraphQL introspection.
Use when encountering intermittent failures, throttling mysteries, or webhook delivery gaps.
Trigger with phrases like "shopify hard bug", "shopify mystery error",
"shopify deep debug", "difficult shopify issue", "shopify intermittent failure".
/shopify-ai-toolkit-wrapperIntegrate Shopify's AI Toolkit MCP server with Claude Code for GraphQL validation,
Liquid linting, and documentation search.
Use when setting up Shopify MCP integration, validating GraphQL queries,
or linting Liquid templates.
Trigger with phrases like "shopify ai toolkit", "shopify mcp",
"shopify claude integration", "shopify graphql validation", "shopify liquid lint".
/shopify-architecture-variantsChoose between Shopify app architectures: embedded Remix app, headless storefront with
Hydrogen, standalone integration, or theme app extension.
Use when starting a new Shopify project and deciding which architecture pattern to follow.
Trigger with phrases like "shopify architecture decision", "shopify embedded vs headless",
"shopify Hydrogen", "shopify app types", "which shopify architecture".
/shopify-b2b-wholesaleBuild Shopify Plus B2B features with companies, catalogs, and wholesale pricing.
Use when setting up wholesale accounts, creating price lists,
or configuring B2B checkout with purchase orders.
Trigger with phrases like "shopify b2b", "shopify wholesale",
"shopify company api", "shopify price lists", "shopify catalog api".
/shopify-checkout-extensionsBuild Checkout UI Extensions to customize Shopify checkout with sandboxed React-like components.
Use when replacing checkout.liquid (deprecated Aug 2025), adding custom fields to checkout,
displaying banners, or reading checkout state with hooks.
Trigger with phrases like "shopify checkout extension", "shopify checkout ui",
"checkout customization shopify", "checkout.liquid migration", "shopify checkout components".
/shopify-ci-integrationConfigure CI/CD pipelines for Shopify apps with GitHub Actions, API version testing,
and Shopify CLI deployment.
Use when setting up automated testing, deployment pipelines, or API version monitoring for Shopify apps.
Trigger with phrases like "shopify CI", "shopify GitHub Actions",
"shopify automated tests", "CI shopify", "shopify deploy pipeline".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin shopify-packOther plugins' skills for the same job