# onco-pathology-interpreter **Repository Path**: peakb_admin/onco-pathology-interpreter ## Basic Information - **Project Name**: onco-pathology-interpreter - **Description**: https://github.com/wangnianfei/onco-pathology-interpreter - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-19 - **Last Updated**: 2026-06-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # onco-pathology-interpreter · 安装与使用 把"读病理报告 → 判读分期/分子分型 → 检索最新指南 → 按证据级别给方案 → 出精美 docx"固化为一个 Agent Skill。 核心设计:**内容与样式分离**——Claude 每个病例只产出一个 `report_spec.json`,固定的 `render_report.js` 负责渲染,保证排版/配色完全可复现。 ## 1. 安装位置 ### Claude Code - 用户级(全局可用):`~/.claude/skills/onco-pathology-interpreter/` - 项目级(仅当前项目):`<项目>/.claude/skills/onco-pathology-interpreter/` ```bash # 解压后放到用户级 skills 目录 mkdir -p ~/.claude/skills cp -r onco-pathology-interpreter ~/.claude/skills/ cd ~/.claude/skills/onco-pathology-interpreter/scripts && npm install # 装 docx 依赖 ``` ### OpenClaw 放到你的 skills 加载目录(与现有 skills 同级,如 `~/.openclaw/skills/`),同样在 `scripts/` 下 `npm install`。 若 SOUL.md / 配置里维护 skill 清单,把本 skill 名 `onco-pathology-interpreter` 登记进去即可。 ## 2. 系统依赖 | 用途 | 依赖 | 安装 | |------|------|------| | 渲染 docx | Node ≥ 18 + `docx`(随 package.json) | `cd scripts && npm install` | | docx→PDF→图 QA | LibreOffice(`soffice`) + Poppler(`pdftoppm`) | mac: `brew install --cask libreoffice && brew install poppler`;Win: 装 LibreOffice + poppler | | 中文 OCR(可选) | `tesseract` + 中文包 | mac: `brew install tesseract tesseract-lang`;Win: UB-Mannheim 版 | | docx 校验(可选) | docx 技能的 `validate.py` | Claude Code 自带 docx 技能时可直接调用 | > 中文字体:报告用 `Microsoft YaHei`(标题)/`DengXian`(正文)。Win 自带;macOS 若缺,Word 会回退,可改 `render_report.js` 顶部 `THEME.F_HEAD/F_BODY` 为 `PingFang SC`/`Songti SC`。 ## 3. 触发方式 直接对 Claude 说,例如: - "解读这份术后病理报告,按最新指南给出分期、分子分型和证据级别的治疗建议,出 docx" + 上传图片/PDF - "这份病理什么分期?该怎么辅助治疗?" Skill 会自动按六阶段执行(见 SKILL.md / references/workflow.md)。 ## 4. 立即验证(复现示例报告) ```bash cd onco-pathology-interpreter/scripts && npm install node render_report.js ../assets/example_report_spec.json /tmp/示例报告.docx bash qa_render.sh /tmp/示例报告.docx # 逐页转图视觉检查 ``` 得到的 docx 与本次会话生成的"子宫内膜癌"报告一致(11 页、373 段)。 ## 5. 处理新病例(手动调脚本时) 1. Claude 完成抽取+检索+综合后,产出 `report_spec.json`(结构见 `references/report_spec_schema.md`, 照 `assets/example_report_spec.json` 改内容即可)。 2. `node scripts/render_report.js report_spec.json 输出.docx` 3. `bash scripts/qa_render.sh 输出.docx` 视觉校验。 ## 6. 改样式 所有配色/字体/页面尺寸集中在 `scripts/render_report.js` 顶部 `THEME` 对象,改一处即可全局生效; JSON 内容文件无需改动。 --- ⚠ 输出为**临床参考**,非诊断处方;最终方案须由 MDT 决定。报告末尾已内置免责声明。