shopify
Skill này làm gì
Skill này kết nối AI của bạn với một cửa hàng Shopify để nó quản lý sản phẩm, tồn kho, đơn hàng và thông tin khách hàng. Phù hợp với chủ cửa hàng và lập trình viên muốn tự động hóa các tác vụ cửa hàng.
Khi nào nên dùng
- ✓Khi bạn muốn AI liệt kê sản phẩm, kiểm tra tồn kho hoặc cập nhật hàng tồn trong cửa hàng Shopify.
- ✓Khi bạn muốn lấy đơn hàng hoặc cập nhật thông tin khách hàng từ cửa hàng.
- ✓Khi bạn muốn đọc dữ liệu sản phẩm cho một storefront bằng Storefront GraphQL.
Liên kết skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/productivity/shopify/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra sản phẩm nào trong cửa hàng Shopify của tôi còn ít hơn năm món trong kho.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill gửi yêu cầu GraphQL đến Shopify bằng curl, dùng access token của cửa hàng bạn. Skill giải thích nơi tạo token và quyền nào mỗi tác vụ cần.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Shopify — Admin & Storefront GraphQL APIs
Work with Shopify stores directly through curl: list products, manage inventory, pull orders, update customers, read metafields. No SDK, no app framework — just the GraphQL endpoint and a custom-app access token.
The REST Admin API is legacy since 2024-04 and only receives security fixes. Use GraphQL Admin for all admin work. Use Storefront GraphQL for read-only customer-facing queries (products, collections, cart).
Prerequisites
- In Shopify admin: Settings → Apps and sales channels → Develop apps → Create an app.
- Click Configure Admin API scopes, select what you need (examples below), save.
- Install app → the Admin API access token appears ONCE. Copy it immediately — Shopify will never show it again. Tokens start with
shpat_. - Save to
${HERMES_HOME:-~/.hermes}/.env:SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxx SHOPIFY_STORE_DOMAIN=my-store.myshopify.com SHOPIFY_API_VERSION=2026-01
Heads up: As of January 1, 2026, new "legacy custom apps" created in the Shopify admin are gone. New setups should use the Dev Dashboard (
shopify.dev/docs/apps/build/dev-dashboard). Existing admin-created apps keep working. If the user's shop has no existing custom app and it's after 2026-01-01, direct them to Dev Dashboard instead of the admin flow.
Common scopes by task:
- Products / collections:
read_products,write_products - Inventory:
read_inventory,write_inventory,read_locations - Orders:
read_orders,write_orders(30 most recent withoutread_all_orders) - Customers:
read_customers,write_customers - Draft orders:
read_draft_orders,write_draft_orders - Fulfillments:
read_fulfillments,write_fulfillments - Metafields / metaobjects: covered by the matching resource scopes
API Basics
- Endpoint:
https://$SHOPIFY_STORE_DOMAIN/admin/api/$SHOPIFY_API_VERSION/graphql.json - Auth header:
X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN(NOTAuthorization: Bearer) - Method: always
POST, alwaysContent-Type: application/json, body is{"query": "...", "variables": {...}} - HTTP 200 does not mean success. GraphQL returns errors in a top-level
errorsarray and per-fielduserErrors. Always check both. - IDs are GID strings:
gid://shopify/Product/10079467700516,gid://shopify/Variant/...,gid://shopify/Order/.... Pass these verbatim — don't strip the prefix. - Rate limit: calculated via query cost (leaky bucket). Each response has
extensions.costwithrequestedQueryCost,actualQueryCost,throttleStatus.{currentlyAvailable, maximumAvailable, restoreRate}. Back off whencurrentlyAvailabledrops below your next query's cost. Standard shops = 100 points bucket, 50/s restore; Plus = 1000/100.
Base curl pattern (reusable):
shop_gql() {
local query="$1"
local variables="${2:-{}}"
curl -sS -X POST \
"https://${SHOPIFY_STORE_DOMAIN}/admin/api/${SHOPIFY_API_VERSION:-2026-01}/graphql.json" \
-H "Content-Type: application/json" \
-H "X-Shopify-Access-Token: ${SHOPIFY_ACCESS_TOKEN}" \
--data "$(jq -nc --arg q "$query" --argjson v "$variables" '{query: $q, variables: $v}')"
}
Pipe through jq for readable output. -sS keeps errors visible but hides the progress bar.
Discovery
Shop info + current API version
shop_gql '{ shop { name myshopifyDomain primaryDomain { url } currencyCode plan { displayName } } }' | jq
List all supported API versions
shop_gql '{ publicApiVersions { handle supported } }' | jq '.data.publicApiVersions[] | select(.supported)'
Products
Search products (first 20 matching query)
shop_gql '
query($q: String!) {
products(first: 20, query: $q) {
edges { node { id title handle status totalInventory variants(first: 5) { edges { node { id sku price inventoryQuantity } } } } }
pageInfo { hasNextPage endCursor }
}
}' '{"q":"hoodie status:active"}' | jq
Query syntax supports title:, sku:, vendor:, product_type:, status:active, tag:, created_at:>2025-01-01. Full grammar: https://shopify.dev/docs/api/usage/search-syntax
Paginate products (cursor)
shop_gql '
query($cursor: String) {
products(first: 100, after: $cursor) {
edges { cursor node { id handle } }
pageInfo { hasNextPage endCursor }
}
}' '{"cursor":null}'
# subsequent calls: pass the previous endCursor
Get a product with variant
Câu hỏi thường gặp
Lấy access token ở đâu?
Skill nói hãy tạo một ứng dụng trong cài đặt Shopify, chọn các phạm vi quyền (scope) cần thiết và cài đặt nó. Token chỉ hiển thị một lần, nên hãy sao chép ngay.
REST API có được dùng không?
Không. Skill nói REST Admin API là phiên bản cũ, nên dùng GraphQL cho các việc quản trị.
Có gì thay đổi năm 2026 với ứng dụng tùy chỉnh?
Skill nói từ ngày 1 tháng 1 năm 2026 không thể tạo ứng dụng tùy chỉnh kiểu cũ mới trong admin, nên các thiết lập mới nên dùng Dev Dashboard.
Chi tiết
Mô tả gốc của tác giả
Query Shopify Admin/Storefront GraphQL APIs via curl.
Độ phổ biến
- Sao GitHub
- 260k
- Vị trí xếp hạng
- #544
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-merge-conflict-arbiter
260kGiải quyết xung đột merge git giữa nhánh của hai agent với vai trò bên trung lập, tạo ra một kết quả merge duy nhất cho repo.
antigravity-cli
260kHướng dẫn bạn cài đặt, cập nhật và khắc phục sự cố công cụ dòng lệnh Antigravity, gồm plugin, đăng nhập và sandbox.
blackbox
260kCho phép agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Blackbox AI, công cụ chạy nhiều mô hình và chọn kết quả tốt nhất.
dynamic-workflow
260kDạy agent của bạn chạy các đợt công việc tương tự lớn như một script đã lưu, để chỉ kết quả đã kiểm chứng mới quay về cuộc trò chuyện chính.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.