Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
40rty-ai avatar

Shopify Admin Metafield Bulk Update

  • 7 installs
  • 173 repo stars
  • Updated June 26, 2026
  • 40rty-ai/shopify-admin-skills

shopify-admin-metafield-bulk-update is a Claude Code skill that bulk sets or deletes metafields on Shopify products, variants, or customers filtered by tag or collection.

About

This Claude Code skill queries Shopify products, variants, or customers matching a filter and bulk-sets or bulk-deletes metafield values on them. Developers use it for structured-data updates like material composition, care instructions, or custom attributes that power storefront features. It defaults to a dry_run preview because metafieldsSet overwrites without merging and metafieldsDelete is permanent.

  • Bulk sets or deletes metafields on products, variants, or customers filtered by tag or collection
  • Runs metafieldsSet or metafieldsDelete over a filtered resource list; defaults to dry_run: true
  • Supports typed values (text, boolean, number) for storefront-powering custom attributes

Shopify Admin Metafield Bulk Update by the numbers

  • 7 all-time installs (skills.sh)
  • Ranked #1,587 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
At a glance

shopify-admin-metafield-bulk-update capabilities & compatibility

Free; requires write_products scope on a Shopify CLI session.

Capabilities
metafield bulk update · structured data edit · bulk attribute update
Pricing
Free
From the docs

What shopify-admin-metafield-bulk-update says it does

Bulk set or delete metafields on products, variants, or customers filtered by tag or collection.
SKILL.md
`metafieldsSet` overwrites existing metafield values — there is no merge.
SKILL.md
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-metafield-bulk-update

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs7
repo stars173
Last updatedJune 26, 2026
Repository40rty-ai/shopify-admin-skills

What it does

Bulk set or delete Shopify metafields across a filtered set of products, variants, or customers.

Who is it for?

Bulk structured-data updates like material, care instructions, or custom attributes across many Shopify resources.

Skip if: Auditing metafield definitions or updating inventory; it edits metafield values only.

When should I use this skill?

You need to set or clear the same metafield across a filtered group of products, variants, or customers.

What you get

The target metafield is set or deleted across every resource matching the filter.

  • Bulk-set or bulk-deleted metafield values across the filtered resource set

By the numbers

  • 2 actions (set, delete)
  • 3 target resource types (product, variant, customer)

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Queries products (or variants, or customers) matching a filter and bulk-sets or bulk-deletes metafield values. Used for structured data updates like material composition, care instructions, product specifications, or custom attributes that power storefront features.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_products,write_products
  • API scopes: read_products, write_products
  • Metafield namespace and key must already exist or be created on first set

Parameters

ParameterTypeRequiredDefaultDescription
storestringyesStore domain (e.g., mystore.myshopify.com)
resource_typestringnoproductResource to update: product, variant, or customer
filterstringyesFilter query (e.g., tag:summer-2026, vendor:Nike)
namespacestringyesMetafield namespace (e.g., custom)
keystringyesMetafield key (e.g., material)
valuestringnoValue to set. If omitted and action: delete, metafield is deleted
value_typestringnosingle_line_text_fieldMetafield type (e.g., single_line_text_field, boolean, number_integer)
actionstringnosetset or delete
dry_runboolnotruePreview without executing mutations
formatstringnohumanOutput format: human or json

Safety

⚠️ metafieldsSet overwrites existing metafield values — there is no merge. metafieldsDelete permanently removes the metafield value from the resource. Run with dry_run: true to confirm the affected product list and verify namespace/key are correct before committing.

Workflow Steps

1. OPERATION: products — query Inputs: query: <filter>, first: 250, select metafield values for the target namespace/key, pagination cursor Expected output: Products with existing metafield values (for reference); paginate until hasNextPage: false

2. OPERATION: metafieldsSet — mutation (if action: set) Inputs: Array of { ownerId, namespace, key, value, type } objects Expected output: metafields { id, key, value }, userErrors

3. OPERATION: metafieldsDelete — mutation (if action: delete) Inputs: Array of { ownerId, namespace, key } objects Expected output: deletedMetafields { ownerId }, userErrors

GraphQL Operations

# products:query — validated against api_version 2025-01
query ProductsWithMetafield($query: String!, $namespace: String!, $key: String!, $after: String) {
  products(first: 250, after: $after, query: $query) {
    edges {
      node {
        id
        title
        metafield(namespace: $namespace, key: $key) {
          id
          value
          type
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
# metafieldsSet:mutation — validated against api_version 2025-01
mutation MetafieldsSet($metafields: [MetafieldsSetInput!]!) {
  metafieldsSet(metafields: $metafields) {
    metafields {
      id
      namespace
      key
      value
      type
      owner {
        ... on Product {
          id
          title
        }
      }
    }
    userErrors {
      field
      message
      code
    }
  }
}
# metafieldsDelete:mutation — validated against api_version 2025-01
mutation MetafieldsDelete($metafields: [MetafieldIdentifierInput!]!) {
  metafieldsDelete(metafields: $metafields) {
    deletedMetafields {
      ownerId
      namespace
      key
    }
    userErrors {
      field
      message
    }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: Metafield Bulk Update                ║
║  Store: <store domain>                       ║
║  Started: <YYYY-MM-DD HH:MM UTC>             ║
╚══════════════════════════════════════════════╝

After each step, emit:

[N/TOTAL] <QUERY|MUTATION>  <OperationName>
          → Params: <brief summary of key inputs>
          → Result: <count or outcome>

If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.

On completion, emit:

For format: human (default):

══════════════════════════════════════════════
OUTCOME SUMMARY
  Resources matched:      <n>
  Metafields set/deleted: <n>
  Errors:                 <n>
  Output:                 metafield_update_<date>.csv
══════════════════════════════════════════════

For format: json, emit:

{
  "skill": "metafield-bulk-update",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "completed_at": "<ISO8601>",
  "dry_run": true,
  "namespace": "<ns>",
  "key": "<key>",
  "action": "set",
  "outcome": {
    "matched": 0,
    "updated": 0,
    "errors": 0,
    "output_file": "metafield_update_<date>.csv"
  }
}

Output Format

CSV file metafield_update_<YYYY-MM-DD>.csv with columns: resource_type, resource_id, title, namespace, key, old_value, new_value, action

Error Handling

ErrorCauseRecovery
THROTTLEDAPI rate limit exceededWait 2 seconds, retry up to 3 times
userErrors — invalid typevalue doesn't match value_typeLog error, skip resource, continue
userErrors — namespace/key not found on deleteMetafield doesn't existLog as skipped (already absent)
No products match filterFilter too narrowExit with 0 matches

Best Practices

  • metafieldsSet is batched — the mutation accepts up to 25 metafields per call. The skill automatically batches large product sets.
  • Always verify the namespace and key match your store's metafield definitions — typos create orphaned metafields that don't connect to any theme feature.
  • For storefront-powered metafields (e.g., displayed in product templates), confirm the theme reads the correct namespace/key before running at scale.
  • Use dry_run: true to preview exactly which products and current values will be affected before overwriting.

Related skills

FAQ

Does set merge or overwrite?

metafieldsSet overwrites existing metafield values with no merge, so preview with dry_run: true first.

What resources can it target?

Products, variants, or customers, selected with the resource_type parameter (default product).

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.