Seller Runtime Toolkit
Use this skill when you need direct, scriptable access to one Shopify store from OpenClaw.
This skill complements seller-api-workflow. Keep the existing workflow skill for higher-level business asks. Use this skill when the task is explicitly about Shopify setup status, documentation search, script execution, or troubleshooting those surfaces.
This skill is self-contained. You can copy the entire shopify-runtime/ folder into an OpenClaw workspace/skills/ directory and run it there without the seller-assistant plugin repository beside it.
Quick Start
- - Configure the skill in OpenClaw instead of maintaining per-store profiles.
- Set this skill's
apiKey in OpenClaw. Because the skill declares primaryEnv: "SHOPIFY_CLIENT_SECRET", OpenClaw injects that value into SHOPIFY_CLIENT_SECRET for each agent run. - Set
skills.entries."shopify-runtime".env.SHOPIFY_STORE_DOMAIN to your *.myshopify.com domain. - Set
skills.entries."shopify-runtime".env.SHOPIFY_CLIENT_ID to your Shopify app client id. - Optionally set
skills.entries."shopify-runtime".env.SHOPIFY_API_VERSION to override the default API version. - Run the bundled script with
node. - Read references/shopify-provider.md when the request touches auth, scopes, orders, or write access.
- Read references/runtime-contract.md when you need the output shape or command examples.
Example OpenClaw config:
CODEBLOCK0
Auth And Scope Notes
- - This skill currently authenticates with Shopify by exchanging
SHOPIFY_CLIENT_ID + SHOPIFY_CLIENT_SECRET for an Admin API access token. It does not use a pre-issued SHOPIFY_ACCESS_TOKEN. - This flow is intended for a Shopify app owned by the same organization as the target store and installed on that same store.
- Read operations usually need matching Shopify Admin API scopes such as
read_products, read_inventory, read_orders, or read_customers. - Write operations usually need the matching write scopes such as
write_products, write_inventory, or write_orders. - Order access can still fail even with basic scopes. Older orders may require
read_all_orders, and protected customer data access may still be required.
Capability Boundaries
- - Prefer Admin GraphQL for normal reads and writes. Use REST only when GraphQL is not the best fit.
- INLINECODE22 blocks local REST writes and GraphQL mutations before the request is sent.
- INLINECODE23 only removes the local read-only guard. Shopify still enforces the app's granted scopes.
- INLINECODE24 confirms local skill readiness, not that Shopify token exchange will succeed.
Commands
Inspect current setup
Use this when the user asks whether the skill is ready, which store it is pointed at, or which API version it will use.
CODEBLOCK1
Search provider and official docs
Use this before writing an API script from memory. Prefer provider notes and the narrowest matching official documentation entry.
CODEBLOCK2
Add --limit or --refresh when needed.
Execute JavaScript
Use this after you know the request shape. Default to --mode read. Only use --mode write when the user clearly asked for a write operation and the Shopify token should allow it.
CODEBLOCK3
The script body should use provider.graphql(...) or provider.request(...). In this runtime, provider.graphql(...) returns the validated GraphQL data object directly. Prefer piping the script on stdin so you do not need temporary files. --script-file is still supported when a real file is more convenient.
Working Rules
- - This skill targets one configured Shopify store per agent run.
- Search docs before inventing request shapes or filters from memory.
- Keep execution scripts narrow and return concise structured objects instead of raw payloads when possible.
- Treat
requestSummary, rawResponses, and logs as execution evidence when you explain the outcome. - Read mode blocks REST write methods and GraphQL mutations locally. Write mode still depends on the Shopify token having matching Admin API access.
- The runtime reads
SHOPIFY_STORE_DOMAIN, SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET, and optional SHOPIFY_API_VERSION from the environment that OpenClaw injects for the skill run.
Seller Runtime Toolkit
当你需要从OpenClaw直接以脚本方式访问一个Shopify店铺时,请使用此技能。
此技能是对seller-api-workflow的补充。保留现有的工作流技能用于处理更高级的业务需求。当任务明确涉及Shopify设置状态、文档搜索、脚本执行或相关问题的故障排除时,请使用此技能。
此技能是自包含的。你可以将整个shopify-runtime/文件夹复制到OpenClaw的workspace/skills/目录中,并在没有seller-assistant插件仓库的情况下直接运行。
快速开始
- - 在OpenClaw中配置此技能,而不是维护每个店铺的配置文件。
- 在OpenClaw中设置此技能的apiKey。由于技能声明了primaryEnv: SHOPIFYCLIENTSECRET,OpenClaw会在每次代理运行时将该值注入到SHOPIFYCLIENTSECRET中。
- 将skills.entries.shopify-runtime.env.SHOPIFYSTOREDOMAIN设置为你的*.myshopify.com域名。
- 将skills.entries.shopify-runtime.env.SHOPIFYCLIENTID设置为你的Shopify应用客户端ID。
- 可选地设置skills.entries.shopify-runtime.env.SHOPIFYAPIVERSION以覆盖默认的API版本。
- 使用node运行捆绑脚本。
- 当请求涉及认证、作用域、订单或写入权限时,请阅读references/shopify-provider.md。
- 当需要输出格式或命令示例时,请阅读references/runtime-contract.md。
OpenClaw配置示例:
json5
{
skills: {
entries: {
shopify-runtime: {
apiKey: { source: env, provider: default, id: SHOPIFYCLIENTSECRET },
env: {
SHOPIFYSTOREDOMAIN: your-store.myshopify.com,
SHOPIFYCLIENTID: yourshopifyclient_id,
SHOPIFYAPIVERSION: 2026-01,
},
},
},
},
}
认证与作用域说明
- - 此技能目前通过交换SHOPIFYCLIENTID + SHOPIFYCLIENTSECRET来获取Admin API访问令牌,从而对Shopify进行认证。它不使用预先颁发的SHOPIFYACCESSTOKEN。
- 此流程适用于与目标店铺属于同一组织且已安装在该店铺上的Shopify应用。
- 读取操作通常需要匹配的Shopify Admin API作用域,例如readproducts、readinventory、readorders或readcustomers。
- 写入操作通常需要匹配的写入作用域,例如writeproducts、writeinventory或writeorders。
- 即使拥有基本作用域,订单访问仍可能失败。较旧的订单可能需要readall_orders作用域,并且可能仍需要受保护的客户数据访问权限。
能力边界
- - 对于常规的读写操作,优先使用Admin GraphQL。仅在GraphQL不是最佳选择时使用REST。
- --mode read会在请求发送前本地阻止REST写入和GraphQL变更操作。
- --mode write仅移除本地的只读保护。Shopify仍会强制执行应用已授予的作用域。
- status确认的是本地技能的就绪状态,而非Shopify令牌交换是否成功。
命令
检查当前设置
当用户询问技能是否就绪、指向哪个店铺或使用哪个API版本时使用。
bash
node skills/shopify-runtime/scripts/seller-runtime.mjs status
搜索提供商和官方文档
在凭记忆编写API脚本之前使用。优先使用提供商说明和范围最匹配的官方文档条目。
bash
node skills/shopify-runtime/scripts/seller-runtime.mjs search --query orders graphql pagination
需要时可添加--limit或--refresh参数。
执行JavaScript
在了解请求格式后使用。默认使用--mode read。仅当用户明确要求写入操作且Shopify令牌允许时才使用--mode write。
bash
cat <
return await provider.graphql(
query {
shop {
name
}
}
)
EOF
脚本主体应使用provider.graphql(...)或provider.request(...)。在此运行时中,provider.graphql(...)直接返回经过验证的GraphQL data对象。建议通过stdin管道传递脚本,这样无需临时文件。当实际文件更方便时,仍支持--script-file参数。
工作规则
- - 此技能每次代理运行针对一个已配置的Shopify店铺。
- 在凭记忆发明请求格式或过滤器之前,先搜索文档。
- 保持执行脚本简洁,尽可能返回结构化的对象而非原始负载。
- 在解释结果时,将requestSummary、rawResponses和logs视为执行证据。
- 读取模式会在本地阻止REST写入方法和GraphQL变更操作。写入模式仍取决于Shopify令牌是否具有匹配的Admin API访问权限。
- 运行时从OpenClaw为技能运行注入的环境中读取SHOPIFYSTOREDOMAIN、SHOPIFYCLIENTID、SHOPIFYCLIENTSECRET以及可选的SHOPIFYAPIVERSION。