Home/Automation & Workflow/ziniao-workflow-batch-account
Z

ziniao-workflow-batch-account

by @ziniao-openv
4.4(120)

This skill automates batch authorization of store accounts to employees by orchestrating staff list, account list, and API calls. It is ideal for new employee onboarding or other scenarios requiring bulk permission assignment, greatly improving efficiency and reducing manual errors.

automationbatchaccountauthorizationworkflowGitHub
Installation
npx skills add https://github.com/ziniao-open/skills --skill ziniao-workflow-batch-account
compare_arrows

Before / After Comparison

1 组
Before

Users manually search for staff, stores, and call APIs one by one, averaging 30 minutes, with risk of missing or mistyping IDs.

After

This skill automatically orchestrates the workflow, completing batch authorization in 3 minutes with reliable results.

SKILL.md

批量账号授权工作流

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../ziniao-shared/SKILL.md

适用场景

  • "给新员工分配店铺权限"
  • "批量授权店铺给某个员工"
  • "新人入职,需要授权所有店铺"

前置条件

  • 已配置 apiKey(ziniao-cli config init)

工作流

staff list ──► 找到目标员工 ID
account list ──► 找到目标店铺 ID 列表
    │
    ├──► 对每个店铺:
    │       api /superbrowser/rest/v1/erp/store/auth/add { storeIdList, staffId }
    │
    └──► 汇总授权结果

Step 1: 查找员工

# 按姓名查找
ziniao-cli staff list --name "张三" --format table
# 记录 userId

Step 2: 查找要授权的店铺

# 列出所有店铺
ziniao-cli account list --format table --page-all
# 或按名称搜索
ziniao-cli account list --name "US" --format table

Step 3: 逐个授权

对每个店铺执行:

ziniao-cli api /superbrowser/rest/v1/erp/store/auth/add \
  --data '{"storeIdList":["<storeId>"],"staffId":"<staffId>"}'

Step 4: 验证

# 查看该员工已授权的店铺
ziniao-cli api /superbrowser/rest/v1/erp/user/stores \
  --data '{"userId":"<userId>","page":1,"limit":10}'

注意事项

  • 授权是写入操作,执行前确认用户意图
  • 如果需要授权大量店铺,建议先列出计划并确认
  • 授权失败时记录错误并继续下一个

参考

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs5.0K
Rating4.4 / 5.0
Version
Updated2026年10月14日
Comparisons1

User Rating

4.4(120)
5
37%
4
43%
3
13%
2
5%
1
2%

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年7月19日
Last Updated2026年10月14日
🎁 Agent Knowledge Cards
Survey