下载技能包
License
MIT
运行时依赖
无特殊依赖
版本
latestv1.0.1
- bulk_operations
安装命令
点击复制官方npx clawhub@latest install shopify-manager
镜像加速npx clawhub@latest install shopify-manager --registry https://cn.longxiaskill.com 镜像可用
技能文档
Shopify 商店管理器 通过自然语言提示实现 AI 驱动的 Shopify 商店管理。
概述 此技能允许您通过自然语言控制您的 Shopify 商店。您可以要求我添加产品、更新内容、管理订单、运行促销或分析性能 —— 我将安全地处理 API 调用,使用 dry-run 预览和确认门槛进行关键操作。
安装 将此技能目录复制到您的 OpenClaw 技能文件夹:
cp -r shopify-manager ~/.openclaw/workspace/skills/
安装 Python 依赖项:
cd ~/.openclaw/workspace/skills/shopify-manager
pip install -r requirements.txt
配置
在您的工作空间中创建 shopify-config.yaml 文件:
store:
domain: "your-store.myshopify.com"
access_token: "shpat_xxxxxxxxxxxxxxxx" # Admin API 访问令牌
api_version: "2024-01"
defaults:
location_id: 12345678 # 默认库存位置
currency: "USD"
permissions:
allow_product_changes: true
allow_order_fulfillment: true
allow_content_updates: true
allow_theme_edits: false # 需要 --force 标志
allow_refunds: false # 需要显式确认
safety:
dry_run_by_default: true
require_confirmation_for:
- refunds
- inventory_reductions
- theme_changes
- bulk_operations
max_products_per_bulk: 50
获取访问令牌
前往您的 Shopify Admin → 设置 → 应用和销售渠道
点击 "开发应用" → "创建应用"
命名为 "AI 商店管理器" → "配置 Admin API 范围"
启用以下范围:
read_products, write_products
read_orders, write_orders
read_content, write_content
read_inventory, write_inventory
read_customers
read_analytics
read_themes, write_themes # 需要主题编辑
保存 → "安装应用" → 显示令牌安全性和审计日志 所有商店操作都记录在 memory/shopify-changes.jsonl 中以进行审计。敏感字段(access_token、密码、信用卡、令牌、api_key、secret)将自动从日志中删除。请保持此日志文件安全,因为它包含操作历史。
命令
/shopify ask
处理自然语言请求以进行商店管理。
用法:
/shopify ask "添加一件新的红色和蓝色 T 恤,$29.99 每件"
/shopify ask "将冬季系列产品降价 20%"
/shopify ask "履行订单 #1234,跟踪号 1Z999AA10123456784"
/shopify ask "更新关于页面的内容"
/shopify ask "显示过去 7 天的销售情况"
选项:
--execute:应用更改(没有此选项,将运行在 dry-run 模式)
--config:自定义配置文件路径
示例:
# 预览更改(dry-run)
/shopify ask "将所有蓝色牛仔裤的数量增加 50"
# 应用更改
/shopify ask "将所有蓝色牛仔裤的数量增加 50" --execute
# 使用不同的配置
/shopify ask "创建情人节促销" --config ./other-store.yaml
/shopify products
直接产品管理命令。
操作:
list:列出产品(可选过滤器)
get :获取产品详细信息
create:交互式产品创建
update :更新现有产品
delete :删除产品(需要确认)
用法:
# 列出产品
/shopify products list --limit 20
/shopify products list --collection winter
# 获取产品详细信息
/shopify products get blue-jeans
/shopify products get 1234567890
# 创建产品(交互式)
/shopify products create
# 更新产品
/shopify products update blue-jeans --price 34.99
# 删除产品
/shopify products delete old-product --confirm
/shopify orders
订单管理。
操作:
list:列出订单(可选过滤器)
get :获取订单详细信息
fulfill :履行订单
refund :处理退款(需要确认)
用法:
# 列出未履行订单
/shopify orders list --status unfulfilled
# 履行订单
/shopify orders fulfill 1234567890 --tracking 1Z999AA10123456784
# 处理退款
/shopify orders refund 1234567890 --amount 29.99 --reason "客户请求"
/shopify content
内容管理(页面、博客、产品描述)。
操作:
pages:管理商店页面
blogs:管理博客文章
products:更新产品描述
用法:
# 列出页面
/shopify content pages list
# 更新页面
/shopify content pages update about-us --generate "可持续性承诺"
# 创建博客文章
/shopify content blogs create "新春系列" --generate
# 更新产品描述
/shopify content products update blue-jeans --generate "详细描述"
/shopify themes
安全主题编辑,具有预览工作流。
主题更改是高风险的 —— 一次坏编辑可能会破坏您的商店。此技能使用复制和预览工作流:
复制实时主题(创建未发布的副本)
编辑副本(永远不要编辑实时主题)
预览 —— Shopify 生成可共享的预览 URL
审查 —— 您检查预览,批准或请求更改
发布 —— 仅当您满意时,副本才会上线
命令:
# 列出所有主题
/shopify themes list
# 创建实时主题的工作副本(安全!)
/shopify themes copy --name "假日促销版本"