> CRITICAL —— 跑命令前 MUST 先用 Read tool 读取 ../wangxiaobao-shared/SKILL.md(一份共享文档讲清安装 / 登录 / 选项目 / 错误码 / 输出协议等所有 xiaobao-cli 命令通用的前置约定)。
跑 xiaobao-cli customer list 查当前激活项目的客户画像列表。
零副作用,鼓励放心调用。
xiaobao-cli auth whoami;未登录就走 auth login --no-wait split-flow(见 wangxiaobao-shared)NO_ACTIVE_PROJECT 就跑 wangxiaobao-switch-project skill
团队长看团队 / 项目管理员看全项目)。当前用户无权访问的顾问名下客户看不到——
这不是 bug
yyyy-MM-dd HH:mm:ss(空格分隔),CLI 自动转 ISO| 用户意图 | 命令 | 关键参数 |
|---|---|---|
| ------------------------------ | -------------------------- | ---------------------------------- |
| 列全部客户(最近来访的在前) | xiaobao-cli customer list | --page / --size |
| 看某顾问名下客户 | xiaobao-cli consultant list → xiaobao-cli customer list | --user-id <反查的 id> |
| 按客户画像找 | xiaobao-cli customer list | --portrait 高意向 等 |
| 按客户姓名 / 手机号模糊 | xiaobao-cli customer list | --customer-name / --customer-phone |
| 按最后来访时间筛 | xiaobao-cli customer list | --from / --to |
| 估算总数 | xiaobao-cli customer list | --page 1 --size 1,只读 total |
用户说"张三的客户"——不要直接传 userName: "张三"(虽然支持但是 LIKE 模糊)。
正确做法:
xiaobao-cli consultant list 拿当前授权范围内的顾问列表userName === "张三" 的 --user-idxiaobao-cli customer list { userId: <张三的 userId> } 精确过滤如果 list-consultants 里找不到张三——说明当前用户没权限看张三名下数据,
告诉用户"当前账号无权访问销售『张三』",不要再硬试。
后端在 dynamic_tags JSON 文本上 LIKE '%xxx%'。所以:
--portrait 高意向 命中 {"高意向客户":"高意向客户"} / {"AI意向判定":"高意向"} 等--portrait 价格 命中 {"抗性点":"价格"} 等| 用户说法 | fromDate / toDate |
|---|---|
| ------------ | ------------------------------------------------ |
| "今天来访" | 今天 00:00:00 / 明天 00:00:00 |
| "本周" | 周一 00:00:00 / 今天 23:59:59 |
| "上周" | 上周一 / 本周一 |
| "5 月份" | 2026-05-01 00:00:00 / 2026-06-01 00:00:00 |
| "近一个月" | 30 天前 / now |
用户明确给时间则按字面用。
PageParam 默认 --page 1 --size 10。传 page: 0 报错。--size 上限 500。
xiaobao-cli customer list 返回:
{
"code": "0",
"msg": "success",
"data": {
"page": 1, "size": 10, "total": 47,
"content": [
{
"customerId": "1685535452481236993",
"customerName": "屈哥",
"customerPhone": "173****7325",
"intentLevel": "A",
"aiIntentLevel": "A",
"lastVisitTime": "2023-07-30 14:01:03",
"userId": 270078834689187840,
"userName": "兰鸿建",
"userInfo": { /* 顾问详情 */ },
"dynamicTags": { "高意向客户": "高意向客户", "抗性点": "配套", ... }
}
]
}
}
CLI 又包一层 { status, ok, data } —— 取数据用 resp.data.data.content。
xiaobao-cli customer list --portrait 高意向 --page 1 --size 20
渲染:
共 12 位高意向客户(最近来访在前):
1. 屈哥 · 173****7325 · 顾问兰鸿建 · 最后来访 2023-07-30
2. 曹女士 · 186****1938 · 顾问兰鸿建 · 最后来访 2023-07-30
...
# step 1: 反查陈平的 user-id
xiaobao-cli consultant list
# step 2: 假设找到陈平的 userId = 270078836362715136
# step 3: 用 --user-id 过滤
xiaobao-cli customer list --user-id 270078836362715136 --page 1 --size 20
xiaobao-cli customer list --portrait 价格 --from "2026-05-01 00:00:00" --to "2026-06-01 00:00:00"
xiaobao-cli customer list --page 1 --size 1
回复:「当前授权范围下共 1247 位客户」。
error: 'NO_ACTIVE_PROJECT' — 跑 wangxiaobao-switch-project skillauth login --no-wait --force split-flow 重登total: 0 — 时间窗口 / 过滤条件没匹配到,或当前用户授权范围为空(新人顾问刚入职 / 团队成员被移走等)
共 3 个版本