CRITICAL — Before starting, you MUST first use the Read tool to read ../ziniao-shared/SKILL.md
Use cases
- "Help me check the status of all stores"
- "Batch screenshot the homepages of all stores"
- "Inspect the stores"
- "See which stores have issues"
Prerequisites
- The ZiNiao browser client is started
- apiKey is configured (
ziniao-cli config init)
Workflow
store list ──► 获取所有店铺
│
├──► 对每个店铺:
│ store open --id <id> --url <target>
│ page wait-nav --store-id <id>
│ page screenshot --store-id <id> --full-page
│ store close --id <id>
│
└──► 汇总报告
Step 1: Get the store list
ziniao-cli store list --format table
Step 2: Inspect one by one
For each store, execute:
# 打开店铺并导航到目标页面
ziniao-cli store open --id <storeId> --url "https://www.amazon.com"
# 等待页面加载
ziniao-cli page wait-nav --store-id <storeId>
# 全页截图
ziniao-cli page screenshot --store-id <storeId> --full-page
# 可选:提取页面数据
ziniao-cli page extract --store-id <storeId>
# 关闭店铺
ziniao-cli store close --id <storeId>
Step 3: Summarize
Organize the results into a report:
## 店铺巡检报告
| 店铺 | 状态 | 截图 | 备注 |
|------|------|------|------|
| Rosehut | 正常 | 已截图 | — |
| US Store | 异常 | 已截图 | 页面加载超时 |
Advanced usage
Headless mode inspection (lighter weight)
ziniao-cli store open --id <storeId> --url "https://www.amazon.com" --headless
Wait for the SPA page to fully load
ziniao-cli page visit --store-id <storeId> --url "https://sellercentral.amazon.com" --wait-until networkidle
Health check: detect abnormal pages
# 提取页面文本,判断是否出现错误提示(403、验证码、封号)
ziniao-cli page content --store-id <storeId> --content-format text
# 查询特定异常元素是否存在
ziniao-cli page query --store-id <storeId> --selector ".captcha-container, .error-page, #auth-warning"
Partial inspection (limit by keyword or quantity)
# 只巡检名称含 "US" 的店铺
ziniao-cli store list --keyword "US"
# 只巡检前 5 个店铺(调试用)
ziniao-cli store list --limit 5
Save screenshots to a specified path
ziniao-cli page screenshot --store-id <storeId> --full-page --path "./patrol/store-<storeId>.png"
Multi-page inspection (visit multiple URLs for a single store)
ziniao-cli store open --id <storeId>
ziniao-cli page visit --store-id <storeId> --url "https://sellercentral.amazon.com" --wait-until networkidle
ziniao-cli page screenshot --store-id <storeId> --path "./patrol/<storeId>-seller-central.png"
ziniao-cli page visit --store-id <storeId> --url "https://www.amazon.com/dp/ASIN" --wait-until networkidle
ziniao-cli page screenshot --store-id <storeId> --path "./patrol/<storeId>-listing.png"
ziniao-cli store close --id <storeId>
Use automation run to simplify single-store operations
ziniao-cli automation run --steps '[
{"type": "visit", "url": "https://www.amazon.com", "waitUntil": "networkidle"},
{"type": "screenshot", "fullPage": true, "path": "./patrol/<storeId>.png"}
]'
Timeout control
# 页面加载慢时增加超时(默认 30s)
ziniao-cli page wait-nav --store-id <storeId> --timeout 60000
ziniao-cli page screenshot --store-id <storeId> --timeout 15000
Notes
- Operate stores one by one; do not open multiple concurrently
- After completing operations for each store, close it before opening the next one
- If an operation fails for a store, log the error and continue to the next one
- Page loading may be slow;
wait-navdefault timeout 30 seconds - Headless mode inspection is faster, but some pages may behave differently; choose as needed
Reference
- ziniao-store — Store management
- ziniao-page — Page operations
- ziniao-shared — Authentication and global parameters