npx skills add imbilawork/2nth-skills@shopify-ai
OVERVIEW
Shopify powers over 4 million stores globally. It exposes two APIs: the Admin API (REST + GraphQL) for store management, and the Storefront API (GraphQL) for customer-facing experiences. Both are powerful foundations for AI augmentation.
This skill gives AI agents the knowledge to query, operate, and automate Shopify — across every role in the organisation — without hallucinating endpoints or field names.
What your agent can do
- Query products, orders, customers, inventory, collections, and analytics
- Generate AI-powered product descriptions, SEO copy, and alt text
- Surface revenue dashboards, trend analysis, and stock alerts for owners
- Audit SEO issues, auto-tag products, and reorder collections for merchandisers
- Instantly look up orders and draft customer service responses
- Segment customers and generate campaign copy for marketing
- Monitor unfulfilled orders, flag fraud, and route fulfillments for operations
THE 2NTH MODEL
The 2nth model is simple: every person who works with a Shopify store gets their own AI partner. The AI never makes decisions — it surfaces data, drafts content, and catches things humans miss. The human always has the final say.
One person + one AI = extraordinary. The AI handles data retrieval and first drafts. The human applies judgment, brand instinct, and relationship intelligence.
| Role | The Human Decides | The AI Enables |
|---|---|---|
| Store Owner | Strategy, pricing, brand direction | Revenue dashboards, trends, competitive monitoring |
| Merchandiser | Collection curation, product selection | Auto-tagging, SEO audits, inventory-aware recommendations |
| Content Creator | Brand voice, creative direction | Draft descriptions, alt text, meta tags, blog posts |
| Customer Service | Escalations, refunds, relationship calls | Order lookup, response drafts, sentiment analysis |
| Marketing Manager | Campaign strategy, budget allocation | Segmentation, A/B copy, performance reporting |
| Operations | Exception handling, carrier selection | Order routing, stock alerts, fraud flags |
ARCHITECTURE
The recommended integration uses a Cloudflare Worker as an MCP server — it proxies the Shopify Admin API, generates content via Workers AI, and exposes role-specific tools to the AI client.
Claude
Cloudflare Worker
Admin API
Authentication
# Admin API (Private/Custom App)
X-Shopify-Access-Token: shpat_xxxxx
# Storefront API
X-Shopify-Storefront-Access-Token: xxxxx
# Base URLs
https://{store}.myshopify.com/admin/api/2024-10/{resource}.json # REST
https://{store}.myshopify.com/admin/api/2024-10/graphql.json # GraphQL
MCP Tool Registration (per role)
const ROLE_TOOLS = {
owner: ['get_revenue_dashboard', 'get_top_products', 'get_customer_growth', 'get_inventory_value'],
merchandiser: ['list_products', 'update_product', 'manage_collection', 'get_seo_audit', 'auto_tag_products'],
content: ['get_product', 'update_product_description', 'generate_alt_text', 'update_seo_metadata'],
support: ['search_orders', 'get_order_status', 'search_customers', 'draft_response', 'create_return'],
marketing: ['get_sales_report', 'get_customer_segments', 'generate_campaign_copy', 'get_channel_performance'],
operations: ['list_unfulfilled_orders', 'get_inventory_levels', 'create_fulfillment', 'flag_fraud_risk'],
};
Never expose SHOPIFY_ACCESS_TOKEN in client-side code. Store as a Cloudflare Worker secret: npx wrangler secret put SHOPIFY_ACCESS_TOKEN
SHOPIFY APIS
GraphQL is preferred for complex queries, metafields, and bulk operations. REST is simpler for straightforward CRUD. Both are available on all plans.
Admin REST — Key Resources
GET /admin/api/2024-10/products.json?limit=50&status=active
GET /admin/api/2024-10/products/{id}.json
POST /admin/api/2024-10/products.json
PUT /admin/api/2024-10/products/{id}.json
GET /admin/api/2024-10/orders.json?status=open&limit=50
GET /admin/api/2024-10/orders/{id}.json
GET /admin/api/2024-10/customers/search.json?query=email:user@example.com
GET /admin/api/2024-10/inventory_levels.json?location_ids=1234
Admin GraphQL — Products
{
products(first: 20, query: "status:active") {
edges {
node {
id title handle description tags status
variants(first: 10) {
edges { node { id price sku inventoryQuantity } }
}
images(first: 5) {
edges { node { url altText } }
}
seo { title description }
}
}
pageInfo { hasNextPage endCursor }
}
}
Admin GraphQL — Orders
{
orders(first: 30, query: "fulfillment_status:unfulfilled") {
edges {
node {
id name createdAt
totalPriceSet { shopMoney { amount currencyCode } }
customer { firstName lastName email }
lineItems(first: 10) {
edges { node { title quantity variant { sku inventoryQuantity } } }
}
shippingAddress { address1 city province zip country }
fulfillments { trackingInfo { number url company } status }
}
}
}
}
Rate Limits
| Plan | REST | GraphQL |
|---|---|---|
| Standard | 2 req/sec | 50 points/sec |
| Advanced / Plus | 4 req/sec | 100 points/sec |
| Shopify Plus | 20 req/sec | 1000 points/sec |
Webhooks
| Webhook | Use Case |
|---|---|
orders/create | Alert operations, update dashboards |
orders/fulfilled | Notify customer service, update tracking |
products/update | Trigger SEO re-audit |
inventory_levels/update | Check reorder points |
customers/create | Welcome sequence, segment assignment |
refunds/create | Alert customer service, flag patterns |
OWNER AI
The store owner sets strategy, makes pricing decisions, and chooses brand direction. Their AI partner handles daily data retrieval so they can focus on what only they can do.
Human + AI Split
- Pricing strategy
- Brand direction
- New product lines
- Supplier relationships
- Capital allocation
- Morning revenue dashboard
- Top product trends
- Cash flow visibility
- Refund rate alerts
- YoY comparison
MCP Tools
Example Conversation
MERCHANDISER AI
The merchandiser curates collections, decides what to feature, and approves product positioning. Their AI partner handles the analytical legwork — surfacing what needs attention before it becomes a problem.
Human + AI Split
- Collection curation
- Featured products
- Seasonal campaigns
- Pricing position
- Range expansion
- SEO audits (missing meta, alt text)
- Auto-generated product tags
- Collection reordering by conversion
- Slow mover identification
- Inventory-aware recommendations
MCP Tools
SEO Audit Query
{
products(first: 250) {
edges {
node {
id title
seo { title description }
images(first: 1) { edges { node { altText } } }
}
}
}
}
Example Conversation
CONTENT AI
The content creator owns the brand voice, makes creative decisions, and approves all copy. Their AI partner handles first drafts — so they spend time on craft, not data entry.
Human + AI Split
- Brand voice
- Creative direction
- Final copy approval
- Campaign messaging
- Tone per channel
- Product description drafts
- Alt text for all images
- Meta titles and descriptions
- Blog post outlines
- Channel rewrites (email, social)
MCP Tools
Content System Prompt Pattern
You are a copywriter for NoHa, a luxury South African furniture brand.
Brand voice: sophisticated, understated, nature-inspired. Never salesy.
Lead with the emotional benefit. Include materials and dimensions.
Use sensory language. Keep under 150 words for product descriptions.
Workers AI — Content Generation
const result = await env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
messages: [
{ role: 'system', content: 'You are a luxury e-commerce copywriter. Be concise and compelling.' },
{ role: 'user', content: `Write a product description for "${product.title}".
Brand: luxury South African furniture. Voice: sophisticated, nature-inspired.
Include: ${product.tags.join(', ')}.
Keep under 150 words. Lead with emotion, end with specs.` }
]
});
Example Conversation
SUPPORT AI
Customer service handles escalations, approves refunds, and makes relationship calls. Their AI partner handles the lookup and drafting work — so they respond faster without losing the human touch.
Human + AI Split
- Escalation handling
- Refund approvals
- Policy exceptions
- VIP relationship calls
- Sending any message
- Instant order lookup
- Tracking status and ETA
- Draft email responses
- Repeat issue flagging
- VIP customer identification
MCP Tools
Order Lookup Query
{
orders(first: 1, query: "name:#1042") {
edges {
node {
id name financialStatus fulfillmentStatus
totalPriceSet { shopMoney { amount } }
customer { firstName lastName email }
lineItems(first: 10) { edges { node { title quantity } } }
fulfillments { trackingInfo { number url company } status }
}
}
}
}
Example Conversation
MARKETING AI
The marketing manager decides campaign strategy, approves messaging, and allocates budget. Their AI partner segments the audience, generates copy variants, and surfaces the data that makes campaigns perform.
Human + AI Split
- Campaign strategy
- Budget allocation
- Message approval
- Discount depth
- Audience targeting
- Customer segmentation
- A/B copy variants
- Channel performance data
- Best send-time analysis
- Slow mover discount strategy
MCP Tools
Customer Segmentation Query
{
customers(first: 50, query: "orders_count:>3", sortKey: TOTAL_SPENT, reverse: true) {
edges {
node {
id firstName lastName email
ordersCount totalSpent tags
lastOrder { id name createdAt }
}
}
}
}
Example Conversation
OPERATIONS AI
Operations handles exceptions, selects carriers, and manages the warehouse team. Their AI partner monitors the queue, flags issues before they escalate, and pre-builds fulfillment requests for human approval.
Human + AI Split
- Exception handling
- Carrier selection
- Warehouse priorities
- Fraud call (approve/reject)
- Inter-warehouse transfers
- Overdue order flagging
- Inventory vs order crosscheck
- Fulfillment request pre-build
- Fraud signal scoring
- Stockout forecasting
MCP Tools
Unfulfilled Orders Query
{
orders(first: 30, query: "fulfillment_status:unfulfilled") {
edges {
node {
id name createdAt
totalPriceSet { shopMoney { amount currencyCode } }
customer { firstName lastName email }
lineItems(first: 10) {
edges { node { title quantity sku variant { inventoryQuantity } } }
}
shippingAddress { address1 city province country }
}
}
}
}
Example Conversation
INSTALL
Install this skill into your AI agent with a single command. The skill gives your agent complete Shopify API knowledge, all role patterns, query references, and content generation prompts.
npx skills add imbilawork/2nth-skills@shopify-ai
What's Included
- SKILL.md — Full Admin API reference, role patterns, rate limits, webhooks, gotchas
- references/queries.md — Complete query library: products, orders, customers, inventory, analytics, bulk ops
- references/roles.md — Detailed role patterns for all 6 roles with MCP tools and example conversations
- references/ai-integration.md — Cloudflare Worker proxy, Workers AI content generation, webhook handlers, wrangler config
Wrangler Config
name = "shopify-ai"
compatibility_date = "2026-03-01"
compatibility_flags = ["nodejs_compat"]
[ai]
binding = "AI"
[vars]
SHOPIFY_STORE = "your-store-name"
# Secrets (run in your terminal):
# npx wrangler secret put SHOPIFY_ACCESS_TOKEN
API versioning: Always specify version e.g. 2024-10. Pagination: REST uses Link headers, GraphQL uses cursor-based edges/node. Metafields: Use GraphQL — REST support is limited. Bulk ops: For >250 items use GraphQL bulk operations. Currency: Amounts are strings in REST, use MoneyV2 in GraphQL.