skills/shopify-dev-mcp/SKILL.md
Routes Shopify Dev MCP calls for surfaces NOT covered by the bundled Shopify skills: `storefront-graphql`, `customer`, `partner`, `payments-apps`, `functions`, `hydrogen`, `liquid`, `custom-data`. SKIP for Admin GraphQL or App Home markup — the bundled `shopify-admin` and `shopify-polaris-app-home` skills cover those. SKIP entirely for `@shopify/post-purchase-ui-extensions-react` — the MCP doesn't index that legacy SDK; use `post-purchase-ui-extension` instead.
npx skillsauth add preetamnath/agent-skills shopify-dev-mcpInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Routes MCP tool calls for Shopify surfaces. Standard lookups, not deep reasoning.
The 7 official Shopify skills ship local validators (scripts/search_docs.mjs, scripts/validate.mjs) that are faster than the MCP and don't require a server round-trip:
| Surface | Use this skill instead |
|---|---|
| Admin GraphQL | shopify-admin |
| App Home <s-*> markup | shopify-polaris-app-home |
| Admin Action/Block extensions | shopify-polaris-admin-extensions |
| Modern checkout <s-*> markup | shopify-polaris-checkout-extensions |
| Customer Account UI | shopify-polaris-customer-account-extensions |
| App Store pre-submission review | shopify-app-store-review |
| shopify.app.toml / CLI workflows | shopify-use-shopify-cli |
Use shopify-dev-mcp ONLY when:
storefront-graphql, customer, partner, payments-apps, functions, hydrogen, liquid, custom-data).The MCP does NOT index @shopify/post-purchase-ui-extensions-react. validate_component_codeblocks rejects every legacy post-purchase component by design — the validator's polaris-checkout-extensions enum value covers MODERN @shopify/ui-extensions <s-*> web components only.
For the legacy SDK: use the post-purchase-ui-extension skill and validate with tsc --noEmit.
Call learn_shopify_api with the target api surface. Consult the API Surfaces appendix below to confirm the correct api value. Extract the returned conversationId — pass it to every subsequent call.
Determine which tool answers the question: doc search, schema introspection, extension targets, or full page fetch. Consult the Tools Reference below for parameters and gotchas.
Call the appropriate tool(s). If switching API surfaces mid-conversation, call learn_shopify_api again with the existing conversationId and the new api.
Before committing any generated code:
<s-*> component markup → validate_component_codeblocks (mandatory)validate_graphql_codeblocks (mandatory)validate_theme (mandatory)If validation fails, fix errors and re-validate. Increment revision on the same artifactId to track iterations. If validation fails twice on the same artifact, stop and surface the error to the user.
All 15 valid values for the api param on learn_shopify_api:
| api value | Description |
|---|---|
| admin | Admin GraphQL API (orders, products, metafields) |
| admin-execution | Admin API execution surface (Shopify-internal — present in the learn_shopify_api enum but NOT in the GraphQL validator enum) |
| storefront-graphql | Storefront API (custom storefronts, cart ops) |
| partner | Partner API (dashboard data, apps, referrals) |
| customer | Customer Account API (orders, payment methods, addresses) |
| payments-apps | Payments Apps API (payment provider integrations) |
| functions | Shopify Functions (discounts, delivery, cart transforms) |
| polaris-app-home | App Home UI (<s-*> web components in admin iframe) |
| polaris-admin-extensions | Admin action/block extensions |
| polaris-checkout-extensions | Modern checkout web-component extensions (@shopify/ui-extensions, <s-*>). Does NOT cover @shopify/post-purchase-ui-extensions-react. |
| polaris-customer-account-extensions | Customer account page extensions |
| pos-ui | Point of sale UI extensions |
| hydrogen | Hydrogen framework |
| liquid | Liquid templates |
| custom-data | Metafields and metaobjects |
Note:
validate_component_codeblocksaccepts one additional value —storefront-web-components— that is NOT valid forlearn_shopify_api. See the validator's section below.
Tool availability varies by MCP server build. Some installations register only a subset (typically:
learn_shopify_api,search_docs_chunks,validate_component_codeblocks,validate_graphql_codeblocks,validate_theme). If a tool below is not callable in your environment, fall back tosearch_docs_chunks.
learn_shopify_apiPurpose: Load API overview and get a conversationId. Must be called before all other tools.
| Param | Type | Required | Notes |
|---|---|---|---|
| api | enum (15 values above) | Yes | Target surface |
| model | string | No (always provide) | Telemetry. Schema marks not-required, but the description says "ALWAYS provide". Pass the current model name; pass 'none' if unknown. |
| conversationId | string (UUID) | No | Pass existing ID when switching surfaces mid-conversation. Omit on first call — a new ID is generated and returned. |
Returns: conversationId (UUID) — required by every subsequent tool call.
Gotchas:
conversationId) when switching API surfaces. This loads new context without losing conversation state.search_docs_chunks queries.search_docs_chunksPurpose: Semantic search over shopify.dev documentation. Returns relevant doc chunks with URLs.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| prompt | string | Yes | Natural language search query |
| api_name | string | No | Filter results to a specific API surface (use the same value as api in learn_shopify_api) |
| max_num_results | number | No | Limit result count. Omit on first call; use when trimming for context-window constraints. |
Gotchas:
fetch_full_docs for targeted lookups.storefront-graphql, this is the only reliable doc tool — introspect_graphql_schema and fetch_full_docs are restricted.fetch_full_docsPurpose: Fetch complete documentation pages by path. Use when you need full property/slot/event details from a page found via search_docs_chunks.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| paths | string[] | Yes | Doc paths relative to site root, e.g. ["/docs/api/app-home"] |
Gotchas:
learn_shopify_api response labels fetch_full_docs as DEPRECATED for some surfaces, but where present the tool still works. Prefer search_docs_chunks; fall back to fetch_full_docs for complete property/slot/event docs.storefront-graphql, this tool is restricted — use search_docs_chunks instead.validate_component_codeblocksPurpose: Validate <s-*> web component markup against Shopify's schema. Catches hallucinated components, props, and prop values.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| api | enum | Yes | One of: polaris-app-home, polaris-admin-extensions, polaris-checkout-extensions, polaris-customer-account-extensions, pos-ui, hydrogen, storefront-web-components (7 values) |
| code | array of { content: string, artifactId?: string, revision?: number } | Yes | Code blocks. content is required per item. Param key is code (not codeblocks). |
| extensionTarget | string | No* | Required for extension surfaces: polaris-admin-extensions, polaris-checkout-extensions, polaris-customer-account-extensions, pos-ui. Determines which components/APIs are available. Where learn_extension_target_types is registered, use it to discover valid targets. |
Input format: Wrap code in a function — JS logic outside return, components inside return:
const Example = () => {
const [value, setValue] = useState('');
return (
<s-page heading="Example">
<s-section>
<s-text-field label="Name" value={value} />
</s-section>
</s-page>
);
};
Raw HTML also works, but the function wrapper is recommended.
Gotchas:
code (array), not codeblocks — opposite naming from validate_graphql_codeblocks.<s-*> markup — never skip, even for small snippets.polaris-checkout-extensions, pass the specific extensionTarget (e.g. purchase.checkout.block.render) to get accurate validation.<s-app-window>, <s-app-nav>) as JSX intrinsic elements — they will fail validation in TSX even though they're real components. Use raw HTML, the App Bridge React wrappers (<TitleBar>, <NavMenu>), or a JSX type augmentation.IMPORTANT — this enum differs from learn_shopify_api.
validate_graphql_codeblocks and introspect_graphql_schema share an expanded 18-value enum where functions splits into 13 specific subtypes. admin-execution is NOT in this enum — even though it's valid for learn_shopify_api.
| Value | Description |
|---|---|
| admin | Admin GraphQL API |
| storefront-graphql | Storefront API |
| partner | Partner API |
| customer | Customer Account API |
| payments-apps | Payments Apps API |
| functions_cart_checkout_validation | Cart and Checkout Validation Function inputs |
| functions_cart_transform | Cart Transform Function inputs |
| functions_delivery_customization | Delivery Customization Function inputs |
| functions_discount | Discount Function inputs |
| functions_discounts_allocator | Discounts Allocator Function inputs |
| functions_fulfillment_constraints | Fulfillment Constraints Function inputs |
| functions_local_pickup_delivery_option_generator | Local Pickup Delivery Option Generator inputs |
| functions_order_discounts | Order Discounts Function inputs |
| functions_order_routing_location_rule | Order Routing Location Rule inputs |
| functions_payment_customization | Payment Customization Function inputs |
| functions_pickup_point_delivery_option_generator | Pickup Point Delivery Option Generator inputs |
| functions_product_discounts | Product Discounts Function inputs |
| functions_shipping_discounts | Shipping Discounts Function inputs |
validate_graphql_codeblocksPurpose: Validate GraphQL queries/mutations against the Shopify schema. Catches hallucinated fields and operations.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| codeblocks | array of { content: string, artifactId?: string, revision?: number } | Yes | Each content is raw GraphQL (no markdown backticks). Param key is codeblocks (not code). |
| api | enum | No | Defaults to admin. See GraphQL API enum. |
Gotchas:
codeblocks (array), not code — opposite naming from validate_component_codeblocks.functions_* subtype from the GraphQL API enum, not functions.introspect_graphql_schemaPurpose: Explore GraphQL schema — find fields, types, queries, mutations, and required scopes.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| query | string | Yes | Simple search term (e.g. product, discountProduct, capture). One concept at a time. |
| api | enum | No | Defaults to admin. Same expanded enum as validate_graphql_codeblocks — see GraphQL API enum. |
| filter | string[] | No | Filter results: all (default), types, queries, mutations. Pass as array, e.g. ["queries", "mutations"]. |
Fallback strategy (confirmed accurate):
captureSession → try capture).all, list, or the plural object name.create, update, delete.Gotchas:
api enum as validate_graphql_codeblocks — functions splits into 13 subtypes.storefront-graphql, this tool is restricted — use search_docs_chunks instead.learn_extension_target_typesPurpose: Get type declarations for components and APIs available within a specific extension target.
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| api | enum | Yes | The surface |
| extension_target | string | Yes | The specific extension target (e.g. purchase.checkout.block.render) |
Supported surfaces:
polaris-admin-extensionspolaris-checkout-extensionspolaris-customer-account-extensionspos-uiNot supported:
polaris-app-home — not an extension surface.May not be registered in all MCP server builds. When unavailable, look up valid extension targets via search_docs_chunks instead.
validate_themePurpose: Validate Liquid and theme files (JSON locales, config, templates, JS, CSS, SVG).
| Param | Type | Required | Notes |
|---|---|---|---|
| conversationId | string | Yes | From learn_shopify_api |
| absoluteThemePath | string | Yes | Absolute path to theme directory |
| filesCreatedOrUpdated | array of { path: string, artifactId?: string, revision?: number } | Yes | path is relative to the theme root |
validate_component_codeblocks| Surface | api | extensionTarget required? |
|---|---|---|
| polaris-app-home | polaris-app-home | No |
| polaris-admin-extensions | polaris-admin-extensions | Yes |
| polaris-checkout-extensions | polaris-checkout-extensions | Yes |
| polaris-customer-account-extensions | polaris-customer-account-extensions | Yes |
| pos-ui | pos-ui | Yes |
| hydrogen | hydrogen | No |
| storefront-web-components | storefront-web-components | No |
Both validate_component_codeblocks and validate_graphql_codeblocks support iterative tracking:
artifactId — Stable ID for the code artifact. Omit on first validation (the tool generates one). Reuse the returned ID on subsequent validations of the same artifact.revision — Starts at 1. Increment on each re-validation of the same artifactId. Tracks validation retries vs. new validations.development
Judge whether a candidate fact earns a durable-doc line: keep only what a future agent would get the wrong answer without; cut anything derivable from code, setup, breadcrumb, or a restated default. TRIGGER when: user asks 'does this belong in CLAUDE.md / a rule / the docs', 'is this worth keeping/writing down', 'should this be a comment'; vetting or pruning a fact before it's filed or shaped.
testing
Audit one instruction file by composing the durable-instruction lenses over it — vet-fact (WORTH: does each fact earn a line?), place-fact (PLACE: is it in the right home?), tighten-instruction (SHAPE: tighten the line). Pick the subset the file needs: shape-only, worth+shape, or worth+place+shape. A misplaced fact can be relocated to its right home on your approval, or deferred for a durable-docs-update batch. TRIGGER when: user wants a skill file or durable doc (CLAUDE.md, a rule, ARCHITECTURE.md) audited for what to keep, where it belongs, and how it reads; user says 'refine/audit this file', 'prune and tighten this doc', 'what here is worth keeping'. For shape-only tightening, tighten-file is the leaner sibling.
development
Route a kept fact to its durable home by delivery trigger and most-local-wins — across in-file comment, nested CLAUDE.md, path-scoped rule, root CLAUDE.md, ARCHITECTURE.md, or a skill. TRIGGER when: user asks 'where should this go', 'which file/rule/home does this belong in', 'is this in the right place', 'should this be a pointer'; placing or re-homing a fact already judged worth keeping.
development
Sequence a locked spec into dependency-ordered, wave-grouped tasks. TRIGGER when: user says 'build the plan' or 'sequence this'; a spec needs slicing into parallel-safe waves.