shopify-admin-metafield-bulk-update
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "shopify-admin-metafield-bulk-update" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d139c058032f7a9dec4628e5281dd6e134ece8d15d3c95a7318c42971d71c7d9. Verify the upstream source and version against https://github.com/40RTY-ai/shopify-admin-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Bulk set or delete metafields for products, product variants, or customers filtered by tags or collections.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Bulk set or delete metafields on products, variants, or customers filtered by tag or collection.
- Inputs and outputs
- CSV file `metafield_update_<YYYY-MM-DD>.csv` with columns: `resource_type`, `resource_id`, `title`, `namespace`, `key`, `old_value`, `new_value`, `action`
- Software, accounts and paid services
- 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
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-metafield-bulk-update
role: merchandising
description: "Bulk set or delete metafields on products, variants, or customers filtered by tag or collection."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- products:query
- metafieldsSet:mutation
- metafieldsDelete:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| resource_type | string | no | product | Resource to update: product, variant, or customer |
| filter | string | yes | — | Filter query (e.g., tag:summer-2026, vendor:Nike) |
| namespace | string | yes | — | Metafield namespace (e.g., custom) |
| key | string | yes | — | Metafield key (e.g., material) |
| value | string | no | — | Value to set. If omitted and action: delete, metafield is deleted |
| value_type | string | no | single_line_text_field | Metafield type (e.g., single_line_text_field, boolean, number_integer) |
| action | string | no | set | set or delete |
| dry_run | bool | no | true | Preview without executing mutations |
| format | string | no | human | Output format: human or json |
Safety
⚠️
metafieldsSetoverwrites existing metafield values — there is no merge.metafieldsDeletepermanently removes the metafield value from the resource. Run withdry_run: trueto confirm the affected product list and verify namespace/key are correct before committing.
Workflow Steps
-
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 untilhasNextPage: false -
OPERATION:
metafieldsSet— mutation (ifaction: set) Inputs: Array of{ ownerId, namespace, key, value, type }objects Expected output:metafields { id, key, value },userErrors -
OPERATION:
metafieldsDelete— mutation (ifaction: 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
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
userErrors — invalid type |
value doesn't match value_type |
Log error, skip resource, continue |
userErrors — namespace/key not found on delete |
Metafield doesn't exist | Log as skipped (already absent) |
| No products match filter | Filter too narrow | Exit with 0 matches |
Best Practices
metafieldsSetis batched — the mutation accepts up to 25 metafields per call. The skill automatically batches large product sets.- Always verify the
namespaceandkeymatch 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: trueto preview exactly which products and current values will be affected before overwriting.
Version history
-
v1.1.0
GitHub ↗
Original release notes
## 🤖 New category: Agentic Commerce Readiness The fix-it side of the [**agentiq.report**](https://agentiq.report) audit. The audit tells operators *where* AI shopping agents (ChatGPT, Gemini, Perplexity, agentic checkout) can't find, read, or recommend their store. This release adds **10 skills that remediate those findings** via the native Shopify Admin GraphQL toolkit — closing the loop: **audit finds the gap → run the matching skill → re-audit confirms.** Every skill declares the audit **signals** it fixes (`audit_signals` frontmatter), so a finding in the report maps directly to the skill that resolves it. ### Skills - **`agentic-readiness-audit`** — flagship, read-only store-side scorecard that routes each gap to its fix skill - **`agentic-product-jsonld-backfill`** — barcode/GTIN, vendor, product type for complete Product JSON-LD - **`agentic-image-alt-text`** — descriptive alt text on product media - **`agentic-description-enrichment`** — fact-rich descriptions for AI quoting - **`agentic-metafields-setup`** — define + populate agentic metafields for filtering - **`agentic-product-taxonomy`** — Shopify Standard Product Taxonomy categories - **`agentic-crawler-access`** — allow GPTBot/ClaudeBot/PerplexityBot… in `robots.txt.liquid` - **`agentic-llms-txt`** — publish a curated `/llms.txt` for AI assistants - **`agentic-organization-schema`** — Organization JSON-LD (sameAs, contactPoint) into the theme - **`agentic-policy-readability`** — machine-readable shipping/returns policies Plus a weekly **`agentic-readiness-monitor`** routine that re-audits and alerts on regressions. ### Stats **116 skills across 11 categories** (was 106/10), **21 routines** (was 20). All GraphQL validated against the live Admin 2025-01 schema; `pnpm validate:index` passes (116 skills, 64 operations). ### Notes Theme-editing and policy skills default to `dry_run`/`audit` mode, write inside managed `# BEGIN/END` blocks, and recommend duplicating the theme first.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 Shopify 商家元字段批量管理的明确痛点
- 支持 products/variants/customers 多种资源类型
- 适用于材料成分、护理说明等结构化数据更新
Highlights
- 触发词清晰完整,边界明确
- description 位置正确且内容充分
- 支持 set/delete 两种操作的精确描述
Highlights
- Workflow Steps 三步式结构清晰
- GraphQL 操作示例完整且已验证
- frontmatter 信息完整规范
Highlights
- dry_run 默认开启提供安全确认机制
- 完善的错误处理和重试机制
- 自动批处理避免 API 限制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
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
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.