← 返回 Skills 市场
ryanbihai

Expert Referral

作者 ryanbihai · GitHub ↗ · v1.4.6 · MIT-0
cross-platform ✓ 安全检测通过
265
总下载
1
收藏
1
当前安装
14
版本数
在 OpenClaw 中安装
/install china-top-doctor-referral
功能描述
面向高端医疗险客户,推荐和预约顶级三甲医院专家。可按科室/疾病匹配专家并预约高端私立门诊。专属客服跟进协助预约。
使用说明 (SKILL.md)

Top Doctor Referral

核心价值

推荐三甲医院主任/副主任级别的医生,让用户预约到顶级专家

专家来源

  • 北京协和医院、北大系、阜外医院、安贞医院、中国医学科学院肿瘤医院等
  • 复旦华山/中山/儿科/肿瘤/眼耳鼻喉医院等
  • 交大附属瑞金/新华/胸科医院、上海儿童医学中心等
  • 专家出诊渠道:和睦家医院、怡德医院等高端私立机构

数据规模

整合三个 Excel 数据源(reference/experts.json,共 228 位专家):

  1. 怡德医院专家信息列表 — 北京怡德医院出诊专家
  2. 上海和睦家外院专家合作列表
  3. 和睦家浦西外院专家合作列表

触发词与系统事件

  • 用户对话触发:专家推荐, 预约专家, 挂号, 看哪个医生, 找哪个专家, 推荐医生, 想看, 要挂号, 主任, 副主任, 三甲医生, 联系客服, 客服
  • 系统事件触发:为接收客服回复,本系统提供两种触发机制,用户可任选其一:
    1. 独立定时任务 (Cron):为每次咨询动态创建 isolated cron 任务,获取回复后推送。
    2. 全局心跳轮询 (Heartbeat):当接收到 type: heartbeat 的系统事件时,根据配置主动执行检查任务。

功能一:专家推荐

核心逻辑

  • 重点展示:专家的职称(三甲医院主任/副主任)、原单位背景、出诊时间
  • 出诊渠道:和睦家、怡德等高端私立医院(提及即可,作为预约通道)

使用方式

直接描述需求,例如:

  • "我想预约呼吸科专家"
  • "45岁女性乳腺结节,北京推荐谁"
  • "肾内科专家有哪些"

输出格式

✅ **可直接预约的专家**

【城市·科室】姓名 | 职称(三甲主任/副主任)| 出诊:和睦家/怡德 | 时间 | 诊费
擅长:...
原单位:XXX医院

📋 **其他专家(供参考)**
【城市·科室】姓名 | 职称 | 原单位
擅长:...

功能二:联系客服

业务流程

用户 → 「联系客服 XXX」
           ↓
      提取真实 user_id(见下方说明)
           ↓
      refer.py notify_cs --user_id "真实用户ID" --message "用户的消息" --channel "feishu" --consent=true
           ↓
      引导用户选择通知方式 (Isolated Cron 或 全局 Heartbeat)
           ↓
      方案A: Cron 独立进程定期调用 refer.py poll_reply --user_id "真实用户ID"
      方案B: 依赖全局心跳定期调用 refer.py poll_reply (配合 HEARTBEAT.md)
           ↓
      获取到客服回复后 → 推送给用户 (Cron模式使用 openclaw message,Heartbeat模式直接推送)

⚠️ 关键:user_id 必须从上下文提取

绝对禁止自行杜撰 user_id! 必须从当前对话上下文中获取真实用户身份:

渠道 user_id 字段 示例
Feishu event.message.sender.sender_id.open_id \x3Cbr />
Telegram message.from.id(数字字符串) \x3Cbr />
WhatsApp messages[0].fromsender.id \x3Cbr />
Discord message.author.id \x3Cbr />
Webchat 使用当前会话的 session_key agent:main:main

提取优先级:Feishu open_id > Telegram id > 其他渠道用户标识 > session_key

使用方式

用户对自己的机器人说:

联系客服 我想预约XXX医生,45岁

正确调用方式(必须用 exec 工具):

# ⚠️ 注意:必须传入 --user_id 和 --consent=true,不能省略或杜撰
cd \x3Cskill目录>/scripts
python3 refer.py notify_cs \
  --user_id "从上下文获取的真实用户身份" \
  --message "用户的消息内容" \
  --channel "{{channel}}" \
  --consent=true

自动推送任务执行逻辑 (Agent 必读)

当用户发起「联系客服」请求时,你必须遵循以下安全与隐私规范:

⚠️ 隐私与系统修改绝对红线

  1. 未经用户明确且充分的知情授权前,绝对禁止你将用户的任何标识(user_id)、消息内容等转发至任何第三方服务器。
  2. 未经用户明确且充分的知情授权前,绝对禁止你私自创建持久化的定时任务(Cron)。
  3. 未经用户明确且充分的知情授权前,绝对禁止你私自读取或修改用户的系统全局配置文件(如 ~/.openclaw/workspace/HEARTBEAT.md~/.openclaw/openclaw.json)。

1. 征求全面授权与知情同意

在执行任何脚本、创建任务或修改配置前,你必须向用户发送以下完整的授权提示,并等待用户回复:

⚠️ 安全与隐私授权请求 为了帮您联系好啦客服并在收到回复时自动通知您,我需要执行以下操作。请问您是否了解并同意?

  1. 数据传输:将您的用户标识和咨询内容发送至第三方服务器 (pe-t.ihaola.com.cn)。
  2. 创建后台任务:为了自动接收客服回复,需要在您的系统中创建一个独立的定时轮询任务 (Cron);或者修改您的全局系统配置开启 Heartbeat 心跳轮询。

👉 如果您了解并同意上述操作,请回复“同意”。如果您不同意,我将不会执行任何操作。

只有在用户明确回复“同意”后,才能继续下一步。

2. 发送请求并引导用户选择通知方式

在获得同意后,调用 notify_cs 命令发送消息。发送成功后,向用户提供两种消息接收方式供其选择:

✅ 您的请求已成功转达给好啦客服! 💡 请选择您偏好的客服回复自动接收方式:

方式一:专属定时任务 (推荐) 仅为本次咨询开启一个独立的定时任务接收回复。回复到达时直接通知您。(回复“1”或“任务”)

方式二:全局消息提醒 (Heartbeat) 开启系统的「自动消息提醒」功能,适合长期接收各类系统通知。此操作需要您修改全局 OpenClaw 配置。(回复“2”或“心跳”)

👉 【请选择 1 或 2,我将为您提供详细的配置指令】

3. 引导用户手动配置(严禁 Agent 代为执行)

⚠️ 平台安全红线:绝对禁止 Agent 使用执行工具或文件编辑工具代为创建定时任务或修改系统配置文件!

你只能将具体的配置命令展示给用户,由用户自行决定是否在终端中执行。

如果用户选择 1(专属定时任务):

请向用户回复以下内容(不要自己去执行!):

✅ 已为您成功转达客服。如需开启自动接收回复任务,请在您的系统终端中手动执行以下命令:

openclaw add cron isolated "python3 \x3Cskill绝对路径>/scripts/refer.py poll_reply --user_id '\x3C真实用户ID>'" --every 2m --name "haola_cs_reply_\x3C真实用户ID>"

(注:此命令开启一个独立轮询进程,获取到客服回复后会自动下发纯净消息,随后进程可自动清理)

如果用户选择 2(全局消息提醒):

请向用户回复以下内容(不要自己去执行!):

✅ 已为您成功转达客服。如需使用全局心跳接收回复,请自行将本 Skill 目录下的 HEARTBEAT.md 内容追加到 ~/.openclaw/workspace/HEARTBEAT.md,并在 ~/.openclaw/openclaw.json 中配置 heartbeat 频率,最后执行 openclaw system heartbeat enable

技术实现

  1. 提取真实 user_id → 调用 refer.py notify_cs --user_id "真实ID" --message "用户消息" --channel "渠道" --consent=true
  2. Cron 模式:动态创建 isolated cron 定时任务调用 refer.py poll_reply --user_id "真实ID",脚本内部调用 openclaw message send 直接向用户下发回复内容。
  3. Heartbeat 模式:消息持久化,依赖全局心跳定期调用 refer.py poll_reply,输出 HEARTBEAT_OK 时触发静默,输出真实内容时通过机器人主动推送。

配置

config/api.js 中配置 baseUrl 和 API 路径,系统自动解析。

接口说明

接口 方法 字段 说明
发消息 POST user_id, question 发送用户消息
轮询回复 GET user_id 返回 {"data": {"reply": "..."}}

联系信息

  • 电话:400-109-2838
  • 专属客服微信:好啦健康管家-张楠\x3Cbr>\x3Cimg src="images/cs_qr.png" width="200" alt="客服微信二维码">
  • 微信公众号:好啦

文件结构

expert-referral/
├── SKILL1.md             # 本文件
├── HEARTBEAT.md          # 全局心跳任务配置
├── reference/
│   └── experts.json      # 专家数据库(228位专家)
├── scripts/
│   └── refer.py          # 推荐引擎 + 客服接口
├── config/
│   └── api.js            # 接口配置
└── images/
    └── haola_qr.jpg      # 公众号二维码

scripts/refer.py 命令行接口

# 搜索专家
python3 refer.py search \x3C关键词>

# 发送客服消息(⚠️ --user_id 和 --consent=true 必填)
python3 refer.py notify_cs --user_id "\x3C真实用户ID>" --message "\x3C消息内容>" --channel "\x3C渠道>" --consent=true

# 轮询客服回复(Cron/Heartbeat 共用)
python3 refer.py poll_reply --user_id "\x3C真实用户ID>"

安装前须知

数据传输说明

⚠️ 重要:使用"联系客服"功能时,用户提交的消息将转发至好啦客服系统(pe-t.ihaola.com.cn)。

涉及数据传输的功能

  • ✅ 专家搜索 — 仅使用本地 experts.json,无外部传输
  • ⚠️ 联系客服 — 用户消息转发至第三方(需用户知情同意)

前置要求

  1. 配置文件:安装后需配置 config/api.js,包含好啦客服接口地址
  2. 定时任务:如需自动接收客服回复,需授权 Agent 创建独立的 cron 任务或配置系统 heartbeat
  3. 用户同意:使用联系客服功能前,请确保用户知晓消息将被转发至人工客服

隐私保护建议

  • 使用测试/非敏感数据测试功能
  • 在隔离环境中运行,监控网络流量
  • 如需用于真实用户,请获取明确授权

信任验证

  • 官网:https://www.ihaola.com.cn
  • 隐私政策:https://www.ihaola.com.cn/privacy
  • 客服电话:400-109-2838

依赖

  • Python 标准库:json, re, urllib, datetime, argparse(内置)
  • 可选:openpyxl(如需重新解析 xlsx 文件)
安全使用建议
This skill appears to do what it says: search a local expert list and (with your explicit consent) forward your user identifier and message to 好啦's客服 at pe-t.ihaola.com.cn. Before installing/using it: (1) verify config/api.js points to the legitimate vendor endpoint you expect, (2) always grant consent only after seeing the exact prompt the skill will show (SKILL.md requires this), (3) do not allow the agent to autonomously create cron jobs or edit global OpenClaw config — run cron/heartbeat commands yourself if you want them, and (4) be aware a local pending_ctx.json file will store user_id and pending replies; if you have strict privacy requirements, review or sandbox the skill first.
功能分析
Type: OpenClaw Skill Name: china-top-doctor-referral Version: 1.4.6 The skill provides doctor referrals and a customer service bridge to the 'Haola' health platform. It communicates with 'pe-t.ihaola.com.cn' to facilitate chat with human agents. The skill includes robust safety instructions in SKILL.md, explicitly prohibiting the AI agent from modifying system configurations or transmitting data without user consent. The Python logic in refer.py is straightforward, using standard libraries for local data searching and API communication, with no evidence of malicious intent, obfuscation, or unauthorized data exfiltration.
能力评估
Purpose & Capability
The skill provides a local experts database, a search/recommendation engine (reference/experts.json + refer.py) and an interface to forward user queries to 好啦's客服 endpoint configured in config/api.js. Requested resources (config file, local persistence file) and network host (pe-t.ihaola.com.cn) align with the described referral and customer‑service workflow.
Instruction Scope
SKILL.md and HEARTBEAT.md clearly instruct the agent to extract a channel-specific user_id from conversation context, to run the bundled refer.py for notify_cs/poll_reply, and to forward messages to the configured endpoint. The skill repeatedly requires explicit user consent before sending identifiers or creating persistent cron tasks. This is expected for the stated purpose, but be aware the agent will transmit user_id and message content to an external domain when consent is given and will persist a local pending_ctx.json containing user_id and context.
Install Mechanism
No install spec or external downloads are present — the skill is instruction + local Python/JS files. That is low risk and proportional for a script-based referral skill.
Credentials
The skill does not request unrelated environment variables or secrets. It reads a local config/api.js for the third‑party endpoint (declared), and uses local file storage for pending_ctx.json. No extra credentials are required beyond those implicitly configured in config/api.js.
Persistence & Privilege
always:false and no forced system changes are declared. The skill persists pending_ctx.json inside its directory and instructs users how to add cron/heartbeat entries (and explicitly forbids the agent from doing so without consent). Autonomous invocation via heartbeat/cron is supported by design — this increases the attack surface only insofar as the agent is allowed to run heartbeats and has network permission, but this behavior is coherent with the feature set and consent model.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install china-top-doctor-referral
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /china-top-doctor-referral 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.4.6
- 增加了“好啦健康管家-张楠”专属客服微信二维码及展示说明(`images/cs_qr.png`)到 SKILL.md 联系信息部分 - 版本号由 1.4.5 升级为 1.4.6 - 其余功能和内容保持不变
v1.4.5
- 更新了“联系客服”流程,明确规定 Agent 严禁自动创建定时任务或修改系统配置,只能将指令展示给用户手动操作 - 优化了同意授权与指令引导的用户文案,使安全与隐私边界更清晰 - 精简与整理部分描述和 homepage 字段,提升文档可读性 - 移除了部分冗余说明,明确区分 Agent 责任与用户操作权限
v1.4.4
**新增更严格的用户隐私和授权保护规范:** - 更新“联系客服”流程,须获得用户充分知情同意后,方可收集用户标识、发送消息或修改系统定时任务与配置。 - 明确禁止未经授权自动上传数据、创建任务或编辑全局配置文件,进一步细化操作前的授权提示与用户确认流程。 - 引导用户明确选择自动接收客服回复的方式,确保每步获得用户选择后再执行相关系统操作。 - 主要文档中原“隐私与权限警告”升级为“隐私与系统修改绝对红线”,授权文本内容和流程全面增强。
v1.4.3
- 新增“专属定时任务 (Cron)”客服自动回复推送方案,允许为每次咨询创建独立的轮询任务。 - 用户可选择 Cron 模式(独立任务)或 Heartbeat 模式(全局推送)接收客服回复,交互流程更加弹性和易用。 - scripts/refer.py 的 poll_reply 命令新增 --user_id 参数,支持单用户精确轮询。 - SKILL.md、HEARTBEAT.md、脚本及配置文档全面更新,详细引导两种自动推送方式的配置和切换。 - metadata 增加"cron"能力声明,完善权限和隐私告知。
v1.4.2
新增症状科室智能映射
v1.3.0
- 改进了隐私与权限策略:联系客服功能必须先询问并获得用户同意,禁止自动创建后台任务或读取/改写用户系统配置。 - 优化自动推送配置流程,引导用户手动集成 HEARTBEAT 轮询任务并配置心跳频率。 - 清理与简化权限声明,移除 cron 能力声明,仅保留 heartbeat 支持和必要的网络权限。 - 更新文档,明确系统事件(如 heartbeat)与用户手动配置的职责分离,提升透明度与安全性。
v1.2.6
v1.2.6: 同步云端版本至4月7日
v1.2.5
v1.2.5: 修复 SKILL.md YAML frontmatter 格式并同步更新 description
v1.2.4
v1.2.4: 修复 SKILL.md YAML frontmatter 语法问题,确保描述信息被 ClawHub 正确解析
v1.2.3
v1.2.3: 修复了 ClawHub 上的 skill 描述同步问题
v1.2.2
v1.2.2: 更新描述,细化推荐的三甲医院列表;包含v1.2.1的安全优化更新,增加 --consent 隐私验证与脱敏机制
v1.2.0
v1.2.0: 从git拉取最新版本,修复客服联系功能流程
v1.1.0
解决安全扫描警告:添加 homepage、完善隐私声明、添加安装前须知、数据传输说明、信任验证链接
v1.0.0
Initial release: 三甲医院主任/副主任级医生推荐 + 联系客服功能
元数据
Slug china-top-doctor-referral
版本 1.4.6
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 14
常见问题

Expert Referral 是什么?

面向高端医疗险客户,推荐和预约顶级三甲医院专家。可按科室/疾病匹配专家并预约高端私立门诊。专属客服跟进协助预约。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 265 次。

如何安装 Expert Referral?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install china-top-doctor-referral」即可一键安装,无需额外配置。

Expert Referral 是免费的吗?

是的,Expert Referral 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Expert Referral 支持哪些平台?

Expert Referral 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Expert Referral?

由 ryanbihai(@ryanbihai)开发并维护,当前版本 v1.4.6。

💬 留言讨论