From agi-super-team
Runs TCM meridian inference from 6-meridian temperature measurements (liver, spleen, kidney, stomach, gallbladder, bladder). Outputs health scores, meridian status, combination diagnoses, storefront scripts, and wellness advice via HTTP API.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agi-super-team:tcm-meridian-inferenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
中医经络推理引擎 — 输入6经络(肝/脾/肾/胃/胆/膀胱)左右测量值,输出:健康评分、经络状态、组合判症、门店讲解文案、调理建议。
中医经络推理引擎 — 输入6经络(肝/脾/肾/胃/胆/膀胱)左右测量值,输出:健康评分、经络状态、组合判症、门店讲解文案、调理建议。
经络推理、TCM推理、经络分析、meridian diagnosis、tcm inference
healthScore — 综合健康评分(0-100)meridians — 每条经络的状态(stable / left_low / right_low / cross)、评分、症状标签combinations — 跨经络组合判症(如「转氨酶偏高」「颈椎风险提示」)summary — 总体概述storefront — 门店讲解文案(焦点标题、客户解释、话术引导、复测提示)advice — 调理建议列表riskTags — 风险标签tcm-meridian-inference/
├── SKILL.md # 本文件
├── scripts/
│ ├── infer.py # 推理引擎核心
│ ├── tcm_api.py # HTTP API 服务
│ └── start_api.sh # 一键启动脚本
└── rules/
├── thresholds.json # 温度阈值与评分参数
├── meridian_rules.json # 单经络规则(18条)
└── combination_rules.json # 组合判症规则(6条)
TCM 推理引擎以独立 HTTP 服务运行(默认端口 18790),所有功能通过 HTTP 调用。
cd ~/clawd/skills/tcm-meridian-inference
bash scripts/start_api.sh # 默认 18790
bash scripts/start_api.sh 8080 # 指定端口
TCM_API_PORT=9090 bash scripts/start_api.sh # 环境变量
| 方法 | 路径 | 说明 |
|---|---|---|
| POST | /api/inference/meridian-diagnosis | 完整推理(评分+状态+组合判症+门店文案+建议) |
| POST | /test | 用内置示例数据测试 |
| GET | /healthz | 健康检查 |
| GET | / | 服务信息 |
{
"subject": {"id": "test-001", "name": "测试用户"},
"measurements": {
"liver": {"left": 35.0, "right": 36.1},
"spleen": {"left": 35.1, "right": 35.9},
"kidney": {"left": 35.0, "right": 35.8},
"stomach": {"left": 35.1, "right": 36.0},
"gallbladder": {"left": 35.0, "right": 35.9},
"bladder": {"left": 35.2, "right": 35.9}
}
}
字段说明:
subject:可选,被测者标识measurements:必填,6条经络的左右值
left 和 right(浮点数,单位:°C)trendDelta 字段(默认 = right - left){
"engine": {"mode": "rule-based-mvp", "version": "0.2.0"},
"subject": {"id": "test-001", "name": "测试用户"},
"healthScore": 84.0,
"scores": {"liver": 84.0, "spleen": 100.0, "kidney": 100.0, "stomach": 100.0, "gallbladder": 100.0, "bladder": 100.0},
"meridians": {
"liver": {
"status": "left_low",
"score": 84.0,
"symptoms": ["代谢差", "气虚", ...],
"tags": ["left_low"]
},
...
},
"sixDimensionScores": [...],
"riskTags": ["left_low"],
"combinations": [],
"summary": "肝左低:代谢侧偏弱",
"reportSummary": "...",
"advice": ["关注代谢与睡眠节律", ...],
"storefront": {
"focusHeadline": "左侧偏低",
"clientExplanation": "...",
"talkTrack": ["...", "...", "..."],
"retestPrompt": "建议间隔 20-30 分钟复测一次,连续 2-3 次趋势更可靠。"
},
"trace": {...}
}
| 字段 | 类型 | 说明 |
|---|---|---|
healthScore | float | 综合评分(0-100),6经络均值 |
scores | object | 各经络评分 |
meridians | object | 各经络状态详情(status / score / symptoms / tags) |
combinations | array | 命中的组合判症规则 |
summary | string | 机器可读的简短摘要 |
storefront | object | 门店讲解用文案 |
advice | array[string] | 调理建议 |
riskTags | array[string] | 去重后的风险标签 |
trace | object | 完整推理轨迹(调试用) |
| 状态 | 含义 |
|---|---|
stable | 正常范围 |
left_low | 左侧偏低 |
right_low | 右侧偏低 |
cross | 左右差异明显 |
| 组合名 | 触发条件 | 标签 |
|---|---|---|
| 转氨酶偏高 | 肝左低 + 胆左低 | transaminase, liver_combo |
| 颈椎风险提示 | 肾与膀胱相反侧低 | cervical |
| 腰椎风险提示 | 肾与膀胱同侧低 | lumbar |
| 心脏供血注意 | ≥4条经络右低 | heart_supply |
| 头部供血注意 | ≥4条经络左低 | head_supply |
| 颈椎加重提示 | 肾+膀胱相反低且脾左低 | cervical_plus |
无需启动 HTTP 服务,直接用推理引擎:
cd ~/clawd/skills/tcm-meridian-inference
python3 scripts/infer.py path/to/case.json --pretty
python3 scripts/infer.py path/to/case.json --out result.json
OpenClaw agent 可以直接通过 exec 执行 curl 调用 TCM API:
# 确保 API 正在运行
curl -s http://localhost:18790/healthz
# 完整推理
curl -s -X POST http://localhost:18790/api/inference/meridian-diagnosis \
-H "Content-Type: application/json" \
-d '{
"subject": {"id": "user-001", "name": "张三"},
"measurements": {
"liver": {"left": 34.5, "right": 34.3},
"spleen": {"left": 34.8, "right": 34.6},
"kidney": {"left": 33.5, "right": 34.2},
"stomach": {"left": 34.0, "right": 34.5},
"gallbladder": {"left": 34.2, "right": 34.0},
"bladder": {"left": 33.8, "right": 34.8}
}
}'
从任何脚本中向 OpenClaw agent 发送消息请求推理:
openclaw agent --agent main --deliver --message "请帮我推理经络数据: liver左35右36, spleen左35.1右35.9, kidney左35右35.8, stomach左35.1右36, gallbladder左35右35.9, bladder左35.2右35.9"
通过 OpenClaw cron 配置定时推理任务,将结果推送到外部 webhook:
{
"schedule": "0 9 * * *",
"task": "调用 TCM API 推理经络数据并将结果 POST 到外部 URL",
"delivery": {
"mode": "webhook",
"to": "https://your-app.com/api/tcm-callback"
}
}
外部系统直接调用 TCM API:
curl -X POST http://<HOST_IP>:18790/api/inference/meridian-diagnosis \
-H "Content-Type: application/json" \
-d @request.json
适用于:门店系统、小程序后端、IoT 设备网关等。
# 1. 启动 API
cd ~/clawd/skills/tcm-meridian-inference
bash scripts/start_api.sh
# 2. 健康检查
curl http://localhost:18790/healthz
# 3. 用示例数据测试
curl -X POST http://localhost:18790/test
# 4. 完整推理
curl -s -X POST http://localhost:18790/api/inference/meridian-diagnosis \
-H "Content-Type: application/json" \
-d '{"measurements":{"liver":{"left":34.5,"right":34.3},"spleen":{"left":34.8,"right":34.6},"kidney":{"left":33.5,"right":34.2},"stomach":{"left":34.0,"right":34.5},"gallbladder":{"left":34.2,"right":34.0},"bladder":{"left":33.8,"right":34.8}}}' | python3 -m json.tool
# 5. CLI 单次推理(无需 API)
python3 scripts/infer.py /path/to/case.json --pretty
当需要把 TCM 规则推理结果交给 AI 做进一步分析时:
示例流程:
用户提交经络数据 → TCM API 规则推理 → 结构化 JSON → Agent AI 解读 → 用户友好报告
规则引擎擅长精确的阈值判断和组合逻辑;AI 擅长自然语言理解和个性化表达。两者结合效果最佳。
rules/ 下的 JSON 文件后重启 API 即生效TCM_API_PORT 或启动参数修改)~/clawd/projects/tcm-meridian-inference-mvp/(勿直接修改)规则文件位于 rules/ 目录:
thresholds.json — 温度阈值(lowMin=35.3, normalMin=35.6 等)和评分参数(每项扣分分值)meridian_rules.json — 单经络规则(每条经络 3 个状态 × 6 条经络 = 18 条规则)combination_rules.json — 跨经络组合判症规则(6 条)修改规则后重启 API 即可生效,无需修改代码。
npx claudepluginhub aaaaqwq/agi-super-team --plugin agi-super-teamComputes validated bedside clinical risk scores (CHA2DS2-VASc, HAS-BLED, CURB-65, qSOFA, Child-Pugh, MELD-Na, Wells DVT/PE, ASCVD, eGFR CKD-EPI) for individual patient decision support.
Provides clinical nursing expertise: systematic assessment methodology, NANDA-I taxonomy for nursing diagnoses, NIC intervention classification, NOC outcome measurement, and vital signs interpretation.
Analyzes TCM constitution data to identify constitution types, evaluate characteristics, and provide personalized health advice. Supports correlation with nutrition, exercise, and sleep data.