chronic-care

Chronic Care Assistant: A personal chronic disease management tool to record and track core indicators for hypertension, diabetes, hyperlipidemia, cardiovascular/cerebrovascular disease, COPD, chronic kidney disease (CKD), and obesity/metabolic syndrome. Tracks BP, blood glucose, lipid labs, weight/BMI/waist, SpO2, peak flow (PEF), kidney function (eGFR/creatinine), medication adherence, symptoms, exercise, and diet; automatically produces statistics and comprehensive reports and supports multiple export channels (WeChat long image/text summary, Tencent Docs Markdown, Word .docx, printable PDF). Purely local with no mandatory dependencies (only Python standard library; .docx optional via python-docx), suited for health privacy data.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "chronic-care" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-3b7e1680b685002ca7552271ac5895e401269416ed771452aba73de494da2d76. Verify the upstream source and version against https://skillhub.cn/skills/user_a16b2e76/manxingbing before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Chronic Care Assistant: A personal chronic disease management tool to record and track core indicators for hypertension, diabetes, hyperlipidemia, cardiovascular/cerebrovascular disease, COPD, chronic kidney disease (CKD), and obesity/metabolic syndrome. Tracks BP, blood glucose, lipid labs, weight/BMI/waist, SpO2, peak flow (PEF), kidney function (eGFR/creatinine), medication adherence, symptoms, exercise, and diet; automatically produces statistics and comprehensive reports and supports multiple export channels (WeChat long image/text summary, Tencent Docs Markdown, Word .docx, printable PDF). Purely local with no mandatory dependencies (only Python standard library; .docx optional via python-docx), suited for health privacy data.

0 Downloads

Introduction source: third_party · user_a16b2e76 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: chronic-care
description: 个人慢病(慢性病)综合管理助手。统一记录与追踪高血压、糖尿病、高血脂、心脑血管病、慢阻肺(COPD)、慢性肾病(CKD)、肥胖/代谢综合征的核心指标——血压、血糖、血脂化验单、体重/BMI/腰围、血氧SpO2、峰流速PEF、肾功能eGFR/肌酐、用药依从性、症状、运动、饮食,并自动产出统计与综合报告,支持多渠道导出(微信长图/微信纯文本摘要、腾讯文档 Markdown、Word .docx、可打印 PDF)。纯本地、零强制依赖(仅 Python 标准库;.docx 需可选 python-docx),适合健康隐私数据。当用户想记录血压/血糖/血脂/体重/血氧/峰流速/肾功能、查看慢病控制趋势、生成慢病周报/月报、导出分享给医生/家属/微信、或做慢病自我管理时使用。
agent_created: true
version: 1.0.0
category: 健康医疗
platforms: [WorkBuddy]
author: wind
license: MIT

个人慢病综合管理助手(Chronic Care)

Overview

为同时患有一种或多种慢性病的人群 / 其家属,提供一套零依赖(仅 Python 标准库)的慢病自我管理工具:把分散的血压、血糖、血脂、体重、血氧、峰流速、肾功能、用药、症状、运动、饮食记录集中到一份 JSON 数据中,自动产出统计指标与可视化综合报告。既可在对话里随时记录与查询,也可定期生成可发给医生 / 家属 / 自己的管理报告。

核心理念:记录 → 统计 → 报告 → 行动,让多病共管效果可量化、可追踪。

覆盖病种:高血压、糖尿病、高血脂、心脑血管病(冠心病/卒中后)、慢阻肺(COPD)/哮喘、慢性肾病(CKD)、肥胖/代谢综合征。

When to use

  • 记录一次血压(晨起/服药前/睡前/随机),或连续家庭自测血压
  • 记录血糖(空腹/餐后2h/睡前/随机)
  • 记录一次血脂化验单(总胆固醇/LDL-C/HDL-C/TG)
  • 记录体重 / 腰围(算 BMI)
  • 记录血氧 SpO2、峰流速 PEF(慢阻肺/哮喘)
  • 记录肾功能 eGFR / 肌酐(CKD)
  • 记录用药(含是否服用,用于依从性)、症状、运动、饮食
  • 查看一段时间内的慢病控制趋势(血压达标率、血糖 TIR、血脂是否达标、用药依从率、症状频率)
  • 生成慢病综合管理周报 / 月报(Markdown 或 HTML)
  • 了解各慢病的控制目标、红旗症状(何时必须就医)、生活处方

内置示例数据(开箱即用)

本 skill 自带一套可运行的示例数据,无需自备即可体验完整流程:

  • 路径:sample_data/demo_log.json(75 条记录,覆盖 2026-07-01~07-14 两周,含高血压+糖尿病+高血脂+肥胖+慢阻肺+CKD 信号)
  • 配套报告:sample_data/demo_report.html、sample_data/demo_report.md

直接运行即可看到效果:

# 统计示例数据
python scripts/chronic_care.py --store sample_data/demo_log.json stats --start 2026-07-01 --end 2026-07-14

# 生成 HTML 报告
python scripts/chronic_report.py --store sample_data/demo_log.json --from 2026-07-01 --to 2026-07-14 --name 示例用户 --out sample_data/demo_report.html

Core workflow

  1. 建立个人数据库(首次使用):默认数据文件为 ~/.workbuddy/chronic_care.json。 也可指定任意路径:--store /path/to/my_log.json,便于按人 / 按家人分别管理。
  2. 日常记录(随时):用 add-* 子命令追加血压、血糖、血脂、体重、血氧、峰流速、肾功能、用药、症状、运动、饮食、备注。
  3. 查询 / 复盘:用 list 查看最近记录,stats 看周期指标(达标率、TIR、依从率、异常事件)。
  4. 生成报告:用 chronic_report.py 产出 Markdown(贴文档 / 微信)或 HTML(带趋势图、可打印成 PDF 发给医生)。
  5. 导出分享:用 chronic_export.py 把报告导出为微信长图(截图分享)、微信纯文本摘要(粘贴到聊天)、腾讯文档 Markdown(粘贴成文)、Word .docx(存档/打印)。
  6. 解读与行动:结合 references/conditions.md(各病控制目标 / 红旗症状 / 生活处方)与 references/diet_guide.md(低盐低糖低脂饮食速查),以及报告里的"个性化提示",调整生活方式 / 用药,必要时就医。

Quick start(脚本)

记录

# 血压(场景:晨起/服药前/睡前/随机)
python scripts/chronic_care.py --store MY.json add-bp --sys 138 --dia 86 --pulse 72 --context 晨起

# 血糖(场景:空腹/餐前/餐后2h/睡前/随机)
python scripts/chronic_care.py --store MY.json add-glucose --value 6.2 --context 空腹

# 血脂化验单(一次一组)
python scripts/chronic_care.py --store MY.json add-lipid --total 4.8 --ldl 2.6 --hdl 1.1 --trig 1.5

# 体重 / 腰围(带身高自动算 BMI)
python scripts/chronic_care.py --store MY.json add-weight --kg 70 --height 170 --waist 88

# 血氧 / 峰流速 / 肾功能
python scripts/chronic_care.py --store MY.json add-spo2 --value 96
python scripts/chronic_care.py --store MY.json add-peakflow --value 380
python scripts/chronic_care.py --store MY.json add-egfr --value 75 --creatinine 95

# 用药(--taken yes/no 计依从性;--scheduled 标记为应服药)
python scripts/chronic_care.py --store MY.json add-med --name 氨氯地平 --dose "5mg 每日" --taken yes --scheduled

# 症状 / 运动 / 饮食 / 备注
python scripts/chronic_care.py --store MY.json add-symptom --name 头晕 --severity 1
python scripts/chronic_care.py --store MY.json add-exercise --kind 快走 --minutes 30
python scripts/chronic_care.py --store MY.json add-diet --tags 低盐,低脂 --note "自带午餐"
python scripts/chronic_care.py --store MY.json add-note --text "本周血压偏稳"

查询与统计

# 最近 20 条(可加 --type bp/glucose/lipid/...)
python scripts/chronic_care.py --store MY.json list --limit 20

# 指定时间段统计
python scripts/chronic_care.py --store MY.json stats --start 2026-07-01 --end 2026-07-14

生成报告

# HTML 报告(含趋势图、异常事件、个性化提示,可打印 PDF)
python scripts/chronic_report.py --store MY.json --from 2026-07-01 --to 2026-07-14 --name 张三 --out report.html

# Markdown 报告(适合贴文档 / 聊天)
python scripts/chronic_report.py --store MY.json --name 张三 --out report.md

导出到微信 / 文档

# 微信「长图」HTML(手机/浏览器打开后截图保存,分享到微信聊天/朋友圈)
python scripts/chronic_export.py --store MY.json --from 2026-07-01 --to 2026-07-14 --name 张三 --format wechat --out wx.html

# 微信纯文本摘要(直接粘贴到微信聊天,发给医生/家属)
python scripts/chronic_export.py --store MY.json --from 2026-07-01 --to 2026-07-14 --name 张三 --format wechat-text
python scripts/chronic_export.py --store MY.json --from 2026-07-01 --to 2026-07-14 --name 张三 --format wechat-text --out wx.txt

# 腾讯文档 / 飞书 / Notion 友好的 Markdown(粘贴即成文)
python scripts/chronic_export.py --store MY.json --name 张三 --format tencent-docs --out 腾讯文档_慢病月报.md

# Word .docx(该托管 Python 已带 python-docx;未安装时自动回退为 Markdown 并提示)
python scripts/chronic_export.py --store MY.json --name 张三 --format docx --out 慢病报告.docx

说明:本环境微信 / 腾讯文档连接器未连接,脚本无法直接"推送"到微信或腾讯文档,因此采用 生成内容 + 手动分享的最佳实践(长图截图、文本粘贴、Markdown 导入)。若后续连接对应连接器, 可在此基础上扩展为自动创建/发送。

数据模型(JSON)

单文件 JSON,结构:

{
  "version": 1,
  "entries": [
    {"id": 1, "type": "bp", "ts": "2026-07-01 07:10", "sys": 138, "dia": 86, "pulse": 72, "context": "晨起", "note": ""},
    {"id": 2, "type": "glucose", "ts": "...", "value": 6.2, "context": "空腹", "note": ""},
    {"id": 3, "type": "lipid", "ts": "...", "total": 4.8, "ldl": 2.6, "hdl": 1.1, "trig": 1.5, "note": ""},
    {"id": 4, "type": "weight", "ts": "...", "kg": 70, "height": 170, "waist": 88},
    {"id": 5, "type": "spo2", "ts": "...", "value": 96, "note": ""},
    {"id": 6, "type": "peakflow", "ts": "...", "value": 380, "note": ""},
    {"id": 7, "type": "egfr", "ts": "...", "value": 75, "creatinine": 95},
    {"id": 8, "type": "med", "ts": "...", "name": "氨氯地平", "dose": "5mg 每日", "taken": true, "scheduled": true, "note": ""},
    {"id": 9, "type": "symptom", "ts": "...", "name": "头晕", "severity": 1, "note": ""},
    {"id": 10, "type": "exercise", "ts": "...", "kind": "快走", "minutes": 30, "note": ""},
    {"id": 11, "type": "diet", "ts": "...", "tags": "低盐,低脂", "note": ""},
    {"id": 12, "type": "note", "ts": "...", "text": "..."}
  ]
}
  • --store 决定文件位置;不传则默认 ~/.workbuddy/chronic_care.json。
  • 文件损坏时会自动备份为 .corrupt.<时间戳> 再新建空库,避免数据全丢。

指标说明(详见 references)

  • 血压达标率:<140/90 mmHg 的占比(合并糖尿病/CKD/冠心病通常目标 <130/80)。
  • 血糖 TIR:血糖处于 3.9–10.0 mmol/L 的时间占比,目标 ≥70%;估算 HbA1c 由平均血糖经 Nathan 公式推算,仅供趋势参考。
  • 血脂:LDL-C 按危险分层目标(极高危<1.8 / 高危<2.6 / 中低危<3.4 mmol/L);TG<1.7;HDL 男>1.0/女>1.3。
  • BMI(中国):18.5–23.9 正常,24–27.9 超重,≥28 肥胖;腰围 男<90/女<85。
  • 血氧 SpO2:静息 ≥95% 正常,<92% 警惕低氧。
  • 峰流速 PEF:占个人最佳 80% 绿区 / 50–80% 黄区 / <50% 红区。
  • eGFR/CKD 分期:≥90 G1 … <15 G5。
  • 用药依从率:已服 / 应服 比例。

Bundled resources

scripts/

  • chronic_care.py — 数据记录与统计(add-* / list / stats),零依赖,覆盖全部指标类型。
  • chronic_report.py — 报告生成(Markdown / HTML),复用 chronic_care.py 的统计逻辑。
  • chronic_export.py — 多渠道导出(微信长图 / 微信纯文本 / 腾讯文档 Markdown / Word .docx)。

references/

  • conditions.md — 各慢病监测要点、控制目标、红旗症状(何时就医)、生活处方。
  • diet_guide.md — 中式低盐 / 低糖 / 低脂 / 高钾饮食速查,用于饮食记录与估算。

sample_data/

  • demo_log.json — 两周多病种示例记录(开箱即用)。
  • demo_report.html / demo_report.md — 桌面版报告(含趋势图、异常事件、个性化提示,可打印 PDF)。
  • demo_report.wechat.html / demo_report.wechat.txt / demo_report.wechat.png — 微信长图 HTML / 纯文本摘要 / 真实渲染截图。
  • demo_report.desktop.png — 桌面报告真实渲染截图。
  • demo_report_tencent.md / demo_report.docx — 腾讯文档 Markdown / Word 文档样例。

设计要点 / 边界

  • 纯本地、零依赖:仅用 Python 标准库,不联网、不上传,适合健康隐私数据。
  • 口径一致性:统计与报告共用同一套区间与目标(定义在 chronic_care.py,chronic_report.py 复用),避免口径漂移。
  • 非医疗建议:所有输出仅用于自我管理参考,明确标注"不替代医生诊断与处方"。涉及用药调整、胰岛素剂量、急症(严重高血压/低血糖/酮症/卒中/心梗/低氧)必须就医。报告中已内置"异常事件"与"红旗"提示,但用户仍须以专业医疗判断为准。

在对话中如何使用本 skill

当用户说"帮我记一下今早血压 138/86""这周血压控制得怎么样""生成一份慢病月报""晚餐吃了外卖大概多少盐""慢阻肺最近血氧怎么样"时:

  1. 判断意图属于记录 / 查询 / 报告 / 咨询哪一类,以及涉及哪个病种与指标。
  2. 记录类:调用 chronic_care.py 的对应 add-* 子命令(用 --store 指定该用户的数据文件,默认 ~/.workbuddy/chronic_care.json)。
  3. 查询 / 统计类:调用 stats / list;需要解释指标含义或红旗症状时加载 references/conditions.md。
  4. 报告类:调用 chronic_report.py 生成 HTML 或 Markdown;若要分享,调用 chronic_export.py 导出为微信长图 / 微信文本 / 腾讯文档 Markdown / Word .docx,必要时用 present_files 展示给用户。
  5. 饮食咨询类:加载 references/diet_guide.md 估算盐/油/糖/碳水,并给低盐低糖低脂等可执行建议。
  6. 始终在结论中保留"仅供参考、不替代医生诊断"的边界提示;出现红旗症状(如血压 ≥180/120、血糖<3.9 或>16.7 伴酮症、SpO2<88%、PEF 红区、突发胸痛/卒中)优先建议立即就医或拨打 120。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 覆盖多种常见慢性病(高血压、糖尿病、高血脂、心脑血管病、慢阻肺、慢性肾病、肥胖/代谢综合征)
  • 提供从记录到报告的全流程闭环,显著提升用户自我管理效率
  • 支持多渠道导出(微信长图/微信纯文本摘要、腾讯文档 Markdown、Word .docx、可打印 PDF)
Trigger Precision90/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
  • 详细列出了使用场景和触发条件
  • 支持多种慢病指标的记录和查询
Structure and Standards90/100

Highlights

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行
  • 文档结构清晰,包含完整的工作流程和示例
Execution Reliability90/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制
  • 脚本功能明确,数据处理逻辑清晰,有错误处理机制
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.