shopify-custom-data

Define Shopify Metafields and Metaobjects with TOML schemas and GraphQL operations.

491|60|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Shopify/Shopify-AI-Toolkit --skill shopify-custom-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shopify-custom-data
Source: https://github.com/Shopify/Shopify-AI-Toolkit/tree/main/skills/shopify-custom-data
Command: npx skills add https://github.com/Shopify/Shopify-AI-Toolkit --skill shopify-custom-data

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Shopify apps need a reliable way to store and retrieve custom data that extends built‑in objects. Without clear definitions and guidelines, developers struggle to use Metafields and Metaobjects correctly, leading to wasted time and inconsistent implementations.

Core Features & Use Cases

  • TOML definitions: Provide version‑controlled metafield and metaobject schemas in shopify.app.toml.
  • GraphQL operations: Generate metafieldsSet, metaobjectUpsert, and query mutations for creating and reading custom data.
  • Best‑practice guidance: Enforce app‑owned namespaces, minimal examples, and CLI scaffolding recommendations.
  • Use case: Adding a “Care Guide” metafield to every product and retrieving it programmatically.

Quick Start

Ask the shopify-custom-data skill to create a product metafield definition for a care guide and retrieve its value for product ID 1234.

Frequently Asked Questions about shopify-custom-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define Shopify metafields and metaobjects in my app?

You can define Shopify metafields and metaobjects using TOML schemas in the `shopify.app.toml` file, allowing you to version-control your custom data structures alongside your app configuration.

How do I create and query custom data via Metafields using Shopify GraphQL?

To create and query custom data via Metafields, use Shopify GraphQL operations like `metafieldsSet` for writing data and `metaobjectUpsert` for metaobjects, then execute query mutations to retrieve the stored values programmatically.

What is the best way to add a custom care guide metafield to Shopify products?

The best way to add a custom care guide metafield to Shopify products is to create a product metafield definition, apply an app-owned namespace, and retrieve its value programmatically using GraphQL queries for specific product IDs.

When should I use Shopify Metaobjects instead of Metafields for custom app data?

Use Shopify Metaobjects when your custom app data requires a standalone, structured data model that extends beyond attaching simple key-value pairs to built-in objects, whereas Metafields are ideal for adding custom properties directly to existing resources like products.

Does the shopify-custom-data approach require CLI scaffolding for TOML definitions?

Yes, the approach recommends CLI scaffolding to manage TOML definitions, ensuring that your metafield and metaobject schemas are properly version-controlled and validated using provided scripts during app development.

What are the limitations of using app-owned namespaces for Shopify custom data?

Using app-owned namespaces for Shopify custom data enforces best-practice data isolation and prevents conflicts, but requires strict validation steps and proper GraphQL mutation handling to ensure data consistency across your app.