shopify-admin-compare-at-price-cleanup
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "shopify-admin-compare-at-price-cleanup":https://skillpi.com/zh/skills/deepskill-7aa26002992f05f0153e26de5d891b1d115a78cc0e5cc45a1d29691574bac131。安装前核对上游来源和版本:https://github.com/40RTY-ai/shopify-admin-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
移除过期的 compareAtPrice 值:删除满足任一条件的 compareAtPrice——当前价格大于等于 compareAtPrice(无实际折扣),或 compareAtPrice 的设定时间已超过可配置的时间阈值。
介绍来源: third_party · 40RTY-ai · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: shopify-admin-compare-at-price-cleanup
role: merchandising
description: "Removes stale compareAtPrice values where current price >= compareAtPrice (no real discount) or compareAtPrice has been set for over a configurable age threshold."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- productVariants:query
- productVariantsBulkUpdate:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
Identifies variants with a compareAtPrice that no longer represents a genuine discount and clears it, so storefront strikethrough pricing reflects real savings rather than legacy noise. Two conditions are flagged: (a) compareAtPrice <= price (no discount, often left over from a price increase), and (b) compareAtPrice set for longer than max_age_days (stale "always on sale" optics that hurt long-term price perception and can violate advertising standards in some regions). Defaults to dry-run.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_products,write_products - API scopes:
read_products,write_products
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| dry_run | bool | no | true | Preview the cleanup without executing mutations |
| clean_no_discount | bool | no | true | Clear compareAtPrice when price >= compareAtPrice |
| clean_stale | bool | no | true | Clear compareAtPrice set longer than max_age_days |
| max_age_days | integer | no | 90 | Age threshold in days for the stale rule (uses variant updatedAt as proxy) |
| collection_id | string | no | — | Optional collection GID to scope the cleanup |
| tag_filter | string | no | — | Optional product tag to scope the cleanup |
| format | string | no | human | Output format: human or json |
Safety
⚠️ Step 2 executes
productVariantsBulkUpdatemutations that overwritecompareAtPriceto null. The original strikethrough value is not preserved server-side — record the dry-run CSV before committing if you want a restore path. Always start withdry_run: trueand review the CSV before running withdry_run: false.
Workflow Steps
-
OPERATION:
productVariants— query Inputs:first: 250,query: <built from collection_id or tag_filter>, selectprice,compareAtPrice,updatedAt,product { id, title, vendor },sku, pagination cursor Expected output: All variants in scope with current pricing; paginate untilhasNextPage: false -
Filter to variants meeting either rule:
clean_no_discountANDcompareAtPrice != nullANDparseFloat(compareAtPrice) <= parseFloat(price), ORclean_staleANDcompareAtPrice != nullAND(now - updatedAt) > max_age_days. Group byproduct.idfor batched mutation. -
OPERATION:
productVariantsBulkUpdate— mutation (skipped whendry_run: true) Inputs: Per product,productIdplus[{ id: variantId, compareAtPrice: null }]Expected output: Updated variants withcompareAtPriceset to null; collectuserErrorsper batch -
Write the CSV (always, even on dry run) for audit trail and revert capability.
GraphQL Operations
# productVariants:query — validated against api_version 2025-01
query VariantsForCompareAtCleanup($query: String, $after: String) {
productVariants(first: 250, after: $after, query: $query) {
edges {
node {
id
sku
price
compareAtPrice
updatedAt
product {
id
title
vendor
tags
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
# productVariantsBulkUpdate:mutation — validated against api_version 2025-01
mutation ClearCompareAtPrice($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkUpdate(productId: $productId, variants: $variants) {
productVariants {
id
price
compareAtPrice
}
userErrors {
field
message
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Compare-At Price Cleanup ║
║ 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):
══════════════════════════════════════════════
COMPARE-AT PRICE CLEANUP (<dry-run|live>)
Variants inspected: <n>
No-discount cleared: <n>
Stale (>= <days>d): <n>
Total cleared: <n>
Errors: <n>
Output: compare_at_cleanup_<date>.csv
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "compare-at-price-cleanup",
"store": "<domain>",
"dry_run": true,
"variants_inspected": 0,
"cleared_no_discount": 0,
"cleared_stale": 0,
"total_cleared": 0,
"errors": 0,
"output_file": "compare_at_cleanup_<date>.csv"
}
Output Format
CSV file compare_at_cleanup_<YYYY-MM-DD>.csv with columns:
variant_id, product_id, product_title, vendor, sku, price, original_compare_at_price, rule_matched, variant_updated_at, mutation_status
Error Handling
| Error | Cause | Recovery |
|---|---|---|
userErrors in mutation response |
Variant locked or in active subscription contract | Log per-variant error, continue with remaining variants |
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
compareAtPrice already null mid-run |
Another process cleared it concurrently | Skip, count as no-op success |
updatedAt newer than expected |
Concurrent edit during the audit | Re-query single variant before mutation; skip if rule no longer matches |
Best Practices
- Always run with
dry_run: truefirst and review the CSV. There is no bulk undo for compareAtPrice clearing. - Disable
clean_stale(setclean_stale: false) during long planned promotions — your "stale" sale is actually intentional. - Use
collection_idto scope the cleanup to evergreen products and exclude an active sale collection. - After running live, spot-check 5–10 variants in the storefront to confirm strikethrough pricing is gone.
- Schedule a quarterly run as part of catalog hygiene; combine with
seo-metadata-auditandproduct-data-completeness-scorefor an end-of-quarter merchandising sweep.
版本历史
-
v1.1.0
GitHub ↗
原版更新说明
## 🤖 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.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决 Shopify 商家清理过期 compareAtPrice 的实际业务需求
- 提升价格展示准确性和合规性,具有明确实用价值
亮点
- description 完整描述了触发条件和功能边界
- 参数定义清晰,包含多种过滤选项
亮点
- 结构完整:Purpose、Prerequisites、Parameters、Workflow Steps、GraphQL Operations、Session Tracking、Output Format、Error Handling、Best Practices
- 包含端到端示例和详细步骤
- frontmatter 完整
亮点
- 工具来源明确(Shopify Admin API)
- 参数正确,API 版本指定
- 覆盖主要异常(userErrors、THROTTLED、并发修改等)
- 不可逆操作有确认机制(dry-run 模式)
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。