[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70DDWT7JG2J1878R61ZF7PW":3,"skill-same:01M70DDWT7JG2J1878R61ZF7PW":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M70DDWT7JG2J1878R61ZF7PW","report-bundle-builder",null,"把多页 HTML 报告(主页 + N 子页 + PNG 资产)合并为单一独立 HTML \u002F PDF \u002F XLSX 三件交付物。 Use when finalizing a disease market sizing report and need shareable deliverables — single-file HTML for email\u002FIM(零依赖,双击浏览器开), optional PDF for print\u002Farchive, XLSX for data export. 领域无关、跨疾病通用。 下游 of disease-market-sizing-html-template;上游 of email\u002FIM\u002Fprint 分发。 Use proactively whenever the user says \"做交付物\" \u002F \"生成 PDF\" \u002F \"导 Excel\" \u002F \"合并单文件 HTML\"。","EthanYoQ\u002FSkill-hub","EthanYoQ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257484394?v=4","01M70C9QKWR1YS0S7V26DNB18H","Ethan","01M70C9QMER047R5ANZZA6KC2P",11,"MIT","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"report bundle builder","report","bundle","builder","文件","single","archive","for","email","single-file","png","html","data","export","template","data export","when","market-sizing","xlsx","PDF","2026-11-10 10:12:30",false,"---\nname: report-bundle-builder\ndescription: >\n  把多页 HTML 报告(主页 + N 子页 + PNG 资产)合并为单一独立 HTML \u002F PDF \u002F XLSX 三件交付物。\n  Use when finalizing a disease market sizing report and need shareable deliverables —\n  single-file HTML for email\u002FIM(零依赖,双击浏览器开), optional PDF for print\u002Farchive,\n  XLSX for data export. 领域无关、跨疾病通用。\n  下游 of disease-market-sizing-html-template;上游 of email\u002FIM\u002Fprint 分发。\n  Use proactively whenever the user says \"做交付物\" \u002F \"生成 PDF\" \u002F \"导 Excel\" \u002F \"合并单文件 HTML\"。\nlicense: MIT\n---\n\n# report-bundle-builder · 报告交付物 L2 skill\n\n## 一句话定义\n\n把市场调研项目的 `main.html + page_*.html + flowchart_*.png` 资产组装成\n\"双击即可阅读 \u002F 邮件可发 \u002F Excel 可分析\"交付物。所有图片 base64 内嵌、XLSX schema 驱动；PDF 仅在用户明确要求或调用方显式 `skip_pdf=False` 时生成。\n\nProduction delivery must reject report-shaped shells: sub-pages with only a few hundred bytes, source inventory masquerading as body content, deferred worker\u002Fmodel language, and shallow Mermaid blocks are bundle blockers even when `verification_report.json` is `ok`.\n\nPDF is optional and must stay disabled by default unless the caller\u002Fuser explicitly requests it. XLSX is part of the production evidence pack: the `Sources` sheet must cover every non-raw file under `.cache\u002F\u003Cslug>\u002Fsources\u002F**`, merged with `source_manifest.json` metadata when available. Listing only the primary guideline is an incomplete delivery.\n\nProduction report runs must write into their own `output\u002F\u003Cslug>\u002F` directory and keep previous run folders intact. Do not place new production deliverables directly in a shared root output folder.\n\nEmbedded or linked subpage material must not insert complete nested HTML documents into `report_standalone.html`; persist subpages as standalone files, but embed only sanitized body fragments when a main-report anchor section is needed.\n\nProduction XLSX must be an analysis workbook, not a placeholder export. Required sheets include `Summary`, `Sources`, `Verification`, `Staging`, `MarketModel`, `LPFramework`, `CohortMatrix`, `CitationAudit`, and `MermaidAssets` when the corresponding inputs exist.\n\n`delivery_manifest.json` must record `deliverables.html.validation.placeholder_checked=true`. HTML is checked against visible placeholder\u002Fdeferred-language terms before bundling, and production smoke blocks manifests that leave HTML placeholder validation unchecked.\n\n---\n\n## 何时调用\n\n- 用户说\"生成 standalone HTML \u002F PDF \u002F XLSX\"\n- 多页 HTML 报告完工,要做最后的交付物组装\n- 邮件\u002F即时通讯\u002F网盘分享前的\"合并 + 内嵌\"\n- 需要把数据导出 Excel 给同事做透视\n\n## 何时不调用\n\n- 还在生成 HTML 内容 → 用 `disease-market-sizing-html-template`\n- 还没召回数据 → 用 7 retrieval skill 走 `disease-market-sizing-orchestration` 流水线\n- 只要 Markdown 不要 HTML\u002FPDF → 用 `article-writing` 或 `docx`\n\n---\n\n## 与其他 skill 的协作\n\n```\n召回层 (7 retrieval skill: pubmed-eutils \u002F europepmc-search \u002F clinical-trials-v2 \u002F\n        aact-bulk-trials \u002F bioc-fulltext-fetch \u002F pubtator-entity-search \u002F\n        medical-evidence-grading)\n        ↓\n内容层 (disease-market-sizing-html-template + market-sizing-mece-foundation\n        + decision-tree-with-lp-embedding + evidence-appendix-sync)\n        ↓ 输出: main.html, page_*.html, flowchart_*.png\n交付层 (本 skill: report-bundle-builder)  ← YOU ARE HERE\n        ↓ 输出: report_standalone.html, .pdf, _data.xlsx, delivery_manifest.json\n分发层 (邮件 \u002F IM \u002F 网盘 \u002F 打印)\n```\n\n---\n\n## 4 个核心函数\n\n### 1. build_standalone_html\n\n```python\nfrom pathlib import Path\nfrom build_standalone_html import build_standalone_html\n\nresult = build_standalone_html(\n    main_html=Path(\"output\u002Freport.html\"),\n    sub_pages=[\n        (\"AML\", Path(\"output\u002Fpage_AML.html\")),\n        (\"MDS\", Path(\"output\u002Fpage_MDS.html\")),\n    ],\n    png_dir=Path(\"output\"),\n    out_path=Path(\"output\u002Freport_standalone.html\"),\n    intra_page_anchors=[\"decision\", \"calc\", \"lp\", \"evidence\"],  # 血液项目用,通用场景留 None\n)\n# {\"ok\": True, \"size_mb\": 9.3, \"png_count\": 8,\n#  \"missing_pngs\": [], \"validation\": {...}}\n```\n\n**关键参数:**\n\n- `sub_pages`: `[(slug, path), ...]` · slug 用作 anchor id(`#page-{slug}`)\n- `png_dir`: PNG 资产目录(`\u003Cimg src=\"X.png\">` 相对此目录解析)\n- `intra_page_anchors`: 子页内部 `href=\"#decision\"` 等改写为 `href=\"#page-{slug}-decision\"` 的 anchor 名列表;None\u002F空时不改写\n- `auto_validate`: 默认 True · size > MIN_BUNDLE_BYTES(1 MB)+ anchor_count == 子页数\n- 缺失 PNG 不抛错,记录在 result[\"missing_pngs\"](见 [bundle-manifest-spec.md](references\u002Fbundle-manifest-spec.md))\n\n### 2. build_pdf\n\n```python\nfrom build_pdf import build_pdf\n\n# 单遍模式(快)\nresult = build_pdf(\n    html_path=Path(\"output\u002Freport_standalone.html\"),\n    out_path=Path(\"output\u002Freport.pdf\"),\n)\n\n# 两遍模式(注入 TOC 页码)\nresult = build_pdf(\n    html_path=Path(\"output\u002Freport.html\"),\n    out_path=Path(\"output\u002Freport.pdf\"),\n    toc_anchors=[\n        (\"#ch1\", \"一、执行摘要\"),\n        (\"#ch2\", \"二、研究方法\"),\n    ],\n)\n# {\"ok\": True, \"size_mb\": 9.6, \"pages\": 32, \"mode\": \"two-pass\"}\n```\n\n**安全保证:**\n\n- 两遍模式自动备份 html_path,Pass 2 失败时从备份恢复\n- pass1 临时 PDF 用 `tempfile.mkstemp` 避免并发碰撞\n- pypdf 不可用时 `pages=None`,`pages_ok=True`(不算失败)\n\n详见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md)。\n\n### 3. build_xlsx\n\n```python\nfrom build_xlsx import build_xlsx\n\nresult = build_xlsx(\n    data={\n        \"overview\": [[\"总 PMID\", 200, \"PubMed\"], [\"NCT\", 30, \"CT.gov\"]],\n        \"lp_ranking\": [[\"LP1\", 8.5, \"GRADE A\"]],\n    },\n    schema_yaml=Path(\"data\u002Fxlsx_schema.yaml\"),\n    out_path=Path(\"output\u002Freport_data.xlsx\"),\n)\n# {\"ok\": True, \"sheets\": [\"T1_overview\", \"T2_lp_ranking\"]}\n```\n\n**Schema YAML 格式:**\n\n```yaml\nsheets:\n  - name: T1_overview\n    headers: [\"指标\", \"值\", \"来源\"]\n    column_widths: [22, 16, 28]\n    data_key: overview\n\n  - name: T2_lp_ranking\n    headers: [\"LP 名称\", \"得分\", \"证据等级\"]\n    column_widths: [30, 12, 18]\n    data_key: lp_ranking\n```\n\n- 调用方在 `data` dict 用 `data_key` 索引,值是 `[[row...], [row...]]`\n- 缺字段(name\u002Fheaders\u002Fdata_key)→ 带索引的 ValueError(`Sheet #2 missing 'headers'`)\n- out_path 父目录自动 mkdir\n\n### 4. build_all_deliverables(一键封装)\n\n```python\nfrom build_all import build_all_deliverables\n\nmanifest = build_all_deliverables(\n    report_dir=Path(\"output\"),\n    out_dir=Path(\"output\"),\n    sub_pages=None,           # None → 自动扫描 page_*.html\n    toc_anchors=[(\"#ch1\",\"一、执行摘要\")],  # 给 PDF\n    xlsx_schema=Path(\"data\u002Fxlsx_schema.yaml\"),\n    xlsx_data={...},\n    disease_slug=\"lung-tb-china\",\n)\n# 写入 output\u002Fdelivery_manifest.json\n# 任一失败不阻塞其余,manifest 记录详情\n```\n\n**自动检测顺序**(main.html):\n\n1. `report_dir\u002Fmain.html`\n2. `report_dir\u002Freport.html`\n3. `report_dir\u002Freport_v\u003CN>.html` 中版本号最大的(`report_v25.html` > `report_v9.html`)\n\n**部分失败处理:**\n\n- HTML 失败 → PDF 用 main.html fallback,manifest 标 `pdf.fallback_input=True`\n- PDF 失败 → XLSX 仍尝试\n- xlsx_schema 或 xlsx_data 缺一 → xlsx 跳过,标 `ok=False, error=skipped`\n\n详见 [bundle-manifest-spec.md](references\u002Fbundle-manifest-spec.md)。\n\n---\n\n## 自动验证规则\n\n| 函数 | 默认验证 | auto_validate=False 时 |\n|-----|---------|----------------------|\n| build_standalone_html | size > 1 MB,anchor_count == 子页数 | 跳过 |\n| build_pdf | size > 1 MB,pages ≥ 1(或 pypdf 不可用 → 不算失败) | 跳过 |\n| build_xlsx | size > 1 KB,sheet_count ≥ 1 | 跳过 |\n\n阈值常量集中在 `_validate.py`:`HTML_MIN_SIZE_BYTES` \u002F `PDF_MIN_SIZE_BYTES` \u002F `PDF_MIN_PAGES` \u002F `XLSX_MIN_SIZE_BYTES` \u002F `XLSX_MIN_SHEET_COUNT`。\n\n---\n\n## 失败模式速查\n\n| 症状 | 原因 | 修复 |\n|------|------|------|\n| `RuntimeError: No Chrome\u002FEdge\u002FChromium found` | PDF 渲染缺浏览器 | 装 Chrome 或显式 `chrome_path=` · 见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md) |\n| `ValueError: Main HTML missing \u003Cbody>` | 主页 HTML 不含 `\u003Cbody>` | 检查 main_html 是否真页面 |\n| `ValueError: Sheet #N missing 'X'` | xlsx schema 字段缺失 | 补全 schema 的 name\u002Fheaders\u002Fdata_key |\n| `KeyError: data['xxx'] missing` | xlsx schema 引用 data_key 在 data dict 中缺失 | 对齐 schema.sheets[].data_key 与 data 的 key |\n| HTML size \u003C 1 MB,validation.size_ok=False | 内容太少或 PNG 丢失 | 检查 png_dir 是否对、PNG 文件存在 |\n| PDF pages 远低于预期 | HTML 渲染异常或 Chrome 崩溃 | 用 Chrome 手动开 HTML 看是否正常,看 Chrome stderr |\n| anchor_count \u003C anchor_target | 子页 HTML 不含 main 标签或 slug 命名冲突 | 子页必须有 `\u003Cmain>` 包裹主体内容 |\n| build_all 报 xlsx skipped | xlsx_schema 或 xlsx_data 任一为 None | 同时传两个,或接受 xlsx ok=False |\n| Output HTML 在浏览器打不开 | 主页编码非 UTF-8 | 重新生成主页保证 UTF-8 BOM 无 |\n| `result[\"missing_pngs\"]` 非空 | 主页\u002F子页引用了 png_dir 不存在的 PNG | 检查 PNG 文件名拼写或是否生成 |\n| 两遍模式 Pass 2 失败但 HTML 未损坏 | 备份恢复机制工作正常 | 排查 Chrome 错误,原 HTML 已自动从备份恢复 |\n\n---\n\n## 跨平台兼容\n\n- Windows \u002F Linux \u002F macOS 全部支持(Chrome 检测分平台,见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md))\n- Python 3.10+(PEP 604 `X | None` 语法)\n- 依赖:`httpx` + `lxml` + `pyyaml` + `openpyxl` + 可选 `pypdf`(无则 PDF 不能测量页数,但仍能渲染)\n\n---\n\n## 版本\n\n- v1.0(2026-04-25):从血液科 IFI v2.5.3 项目下沉而来,首个领域无关版本\n  - build_standalone_html(parametric API,intra_page_anchors 可配)\n  - build_pdf(单\u002F两遍模式,跨平台 Chrome,备份恢复)\n  - build_xlsx(schema YAML 驱动)\n  - build_all_deliverables(一键封装 + delivery_manifest.json)\n","# report-bundle-builder · 报告交付物 L2 skill\n\n## 一句话定义\n\n把市场调研项目的 `main.html + page_*.html + flowchart_*.png` 资产组装成\n\"双击即可阅读 \u002F 邮件可发 \u002F Excel 可分析\"交付物。所有图片 base64 内嵌、XLSX schema 驱动；PDF 仅在用户明确要求或调用方显式 `skip_pdf=False` 时生成。\n\nProduction delivery must reject report-shaped shells: sub-pages with only a few hundred bytes, source inventory masquerading as body content, deferred worker\u002Fmodel language, and shallow Mermaid blocks are bundle blockers even when `verification_report.json` is `ok`.\n\nPDF is optional and must stay disabled by default unless the caller\u002Fuser explicitly requests it. XLSX is part of the production evidence pack: the `Sources` sheet must cover every non-raw file under `.cache\u002F\u003Cslug>\u002Fsources\u002F**`, merged with `source_manifest.json` metadata when available. Listing only the primary guideline is an incomplete delivery.\n\nProduction report runs must write into their own `output\u002F\u003Cslug>\u002F` directory and keep previous run folders intact. Do not place new production deliverables directly in a shared root output folder.\n\nEmbedded or linked subpage material must not insert complete nested HTML documents into `report_standalone.html`; persist subpages as standalone files, but embed only sanitized body fragments when a main-report anchor section is needed.\n\nProduction XLSX must be an analysis workbook, not a placeholder export. Required sheets include `Summary`, `Sources`, `Verification`, `Staging`, `MarketModel`, `LPFramework`, `CohortMatrix`, `CitationAudit`, and `MermaidAssets` when the corresponding inputs exist.\n\n`delivery_manifest.json` must record `deliverables.html.validation.placeholder_checked=true`. HTML is checked against visible placeholder\u002Fdeferred-language terms before bundling, and production smoke blocks manifests that leave HTML placeholder validation unchecked.\n\n---\n\n## 何时调用\n\n- 用户说\"生成 standalone HTML \u002F PDF \u002F XLSX\"\n- 多页 HTML 报告完工,要做最后的交付物组装\n- 邮件\u002F即时通讯\u002F网盘分享前的\"合并 + 内嵌\"\n- 需要把数据导出 Excel 给同事做透视\n\n## 何时不调用\n\n- 还在生成 HTML 内容 → 用 `disease-market-sizing-html-template`\n- 还没召回数据 → 用 7 retrieval skill 走 `disease-market-sizing-orchestration` 流水线\n- 只要 Markdown 不要 HTML\u002FPDF → 用 `article-writing` 或 `docx`\n\n---\n\n## 与其他 skill 的协作\n\n```\n召回层 (7 retrieval skill: pubmed-eutils \u002F europepmc-search \u002F clinical-trials-v2 \u002F\n        aact-bulk-trials \u002F bioc-fulltext-fetch \u002F pubtator-entity-search \u002F\n        medical-evidence-grading)\n        ↓\n内容层 (disease-market-sizing-html-template + market-sizing-mece-foundation\n        + decision-tree-with-lp-embedding + evidence-appendix-sync)\n        ↓ 输出: main.html, page_*.html, flowchart_*.png\n交付层 (本 skill: report-bundle-builder)  ← YOU ARE HERE\n        ↓ 输出: report_standalone.html, .pdf, _data.xlsx, delivery_manifest.json\n分发层 (邮件 \u002F IM \u002F 网盘 \u002F 打印)\n```\n\n---\n\n## 4 个核心函数\n\n### 1. build_standalone_html\n\n```python\nfrom pathlib import Path\nfrom build_standalone_html import build_standalone_html\n\nresult = build_standalone_html(\n    main_html=Path(\"output\u002Freport.html\"),\n    sub_pages=[\n        (\"AML\", Path(\"output\u002Fpage_AML.html\")),\n        (\"MDS\", Path(\"output\u002Fpage_MDS.html\")),\n    ],\n    png_dir=Path(\"output\"),\n    out_path=Path(\"output\u002Freport_standalone.html\"),\n    intra_page_anchors=[\"decision\", \"calc\", \"lp\", \"evidence\"],  # 血液项目用,通用场景留 None\n)\n# {\"ok\": True, \"size_mb\": 9.3, \"png_count\": 8,\n#  \"missing_pngs\": [], \"validation\": {...}}\n```\n\n**关键参数:**\n\n- `sub_pages`: `[(slug, path), ...]` · slug 用作 anchor id(`#page-{slug}`)\n- `png_dir`: PNG 资产目录(`\u003Cimg src=\"X.png\">` 相对此目录解析)\n- `intra_page_anchors`: 子页内部 `href=\"#decision\"` 等改写为 `href=\"#page-{slug}-decision\"` 的 anchor 名列表;None\u002F空时不改写\n- `auto_validate`: 默认 True · size > MIN_BUNDLE_BYTES(1 MB)+ anchor_count == 子页数\n- 缺失 PNG 不抛错,记录在 result[\"missing_pngs\"](见 [bundle-manifest-spec.md](references\u002Fbundle-manifest-spec.md))\n\n### 2. build_pdf\n\n```python\nfrom build_pdf import build_pdf\n\n# 单遍模式(快)\nresult = build_pdf(\n    html_path=Path(\"output\u002Freport_standalone.html\"),\n    out_path=Path(\"output\u002Freport.pdf\"),\n)\n\n# 两遍模式(注入 TOC 页码)\nresult = build_pdf(\n    html_path=Path(\"output\u002Freport.html\"),\n    out_path=Path(\"output\u002Freport.pdf\"),\n    toc_anchors=[\n        (\"#ch1\", \"一、执行摘要\"),\n        (\"#ch2\", \"二、研究方法\"),\n    ],\n)\n# {\"ok\": True, \"size_mb\": 9.6, \"pages\": 32, \"mode\": \"two-pass\"}\n```\n\n**安全保证:**\n\n- 两遍模式自动备份 html_path,Pass 2 失败时从备份恢复\n- pass1 临时 PDF 用 `tempfile.mkstemp` 避免并发碰撞\n- pypdf 不可用时 `pages=None`,`pages_ok=True`(不算失败)\n\n详见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md)。\n\n### 3. build_xlsx\n\n```python\nfrom build_xlsx import build_xlsx\n\nresult = build_xlsx(\n    data={\n        \"overview\": [[\"总 PMID\", 200, \"PubMed\"], [\"NCT\", 30, \"CT.gov\"]],\n        \"lp_ranking\": [[\"LP1\", 8.5, \"GRADE A\"]],\n    },\n    schema_yaml=Path(\"data\u002Fxlsx_schema.yaml\"),\n    out_path=Path(\"output\u002Freport_data.xlsx\"),\n)\n# {\"ok\": True, \"sheets\": [\"T1_overview\", \"T2_lp_ranking\"]}\n```\n\n**Schema YAML 格式:**\n\n```yaml\nsheets:\n  - name: T1_overview\n    headers: [\"指标\", \"值\", \"来源\"]\n    column_widths: [22, 16, 28]\n    data_key: overview\n\n  - name: T2_lp_ranking\n    headers: [\"LP 名称\", \"得分\", \"证据等级\"]\n    column_widths: [30, 12, 18]\n    data_key: lp_ranking\n```\n\n- 调用方在 `data` dict 用 `data_key` 索引,值是 `[[row...], [row...]]`\n- 缺字段(name\u002Fheaders\u002Fdata_key)→ 带索引的 ValueError(`Sheet #2 missing 'headers'`)\n- out_path 父目录自动 mkdir\n\n### 4. build_all_deliverables(一键封装)\n\n```python\nfrom build_all import build_all_deliverables\n\nmanifest = build_all_deliverables(\n    report_dir=Path(\"output\"),\n    out_dir=Path(\"output\"),\n    sub_pages=None,           # None → 自动扫描 page_*.html\n    toc_anchors=[(\"#ch1\",\"一、执行摘要\")],  # 给 PDF\n    xlsx_schema=Path(\"data\u002Fxlsx_schema.yaml\"),\n    xlsx_data={...},\n    disease_slug=\"lung-tb-china\",\n)\n# 写入 output\u002Fdelivery_manifest.json\n# 任一失败不阻塞其余,manifest 记录详情\n```\n\n**自动检测顺序**(main.html):\n\n1. `report_dir\u002Fmain.html`\n2. `report_dir\u002Freport.html`\n3. `report_dir\u002Freport_v\u003CN>.html` 中版本号最大的(`report_v25.html` > `report_v9.html`)\n\n**部分失败处理:**\n\n- HTML 失败 → PDF 用 main.html fallback,manifest 标 `pdf.fallback_input=True`\n- PDF 失败 → XLSX 仍尝试\n- xlsx_schema 或 xlsx_data 缺一 → xlsx 跳过,标 `ok=False, error=skipped`\n\n详见 [bundle-manifest-spec.md](references\u002Fbundle-manifest-spec.md)。\n\n---\n\n## 自动验证规则\n\n| 函数 | 默认验证 | auto_validate=False 时 |\n|-----|---------|----------------------|\n| build_standalone_html | size > 1 MB,anchor_count == 子页数 | 跳过 |\n| build_pdf | size > 1 MB,pages ≥ 1(或 pypdf 不可用 → 不算失败) | 跳过 |\n| build_xlsx | size > 1 KB,sheet_count ≥ 1 | 跳过 |\n\n阈值常量集中在 `_validate.py`:`HTML_MIN_SIZE_BYTES` \u002F `PDF_MIN_SIZE_BYTES` \u002F `PDF_MIN_PAGES` \u002F `XLSX_MIN_SIZE_BYTES` \u002F `XLSX_MIN_SHEET_COUNT`。\n\n---\n\n## 失败模式速查\n\n| 症状 | 原因 | 修复 |\n|------|------|------|\n| `RuntimeError: No Chrome\u002FEdge\u002FChromium found` | PDF 渲染缺浏览器 | 装 Chrome 或显式 `chrome_path=` · 见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md) |\n| `ValueError: Main HTML missing \u003Cbody>` | 主页 HTML 不含 `\u003Cbody>` | 检查 main_html 是否真页面 |\n| `ValueError: Sheet #N missing 'X'` | xlsx schema 字段缺失 | 补全 schema 的 name\u002Fheaders\u002Fdata_key |\n| `KeyError: data['xxx'] missing` | xlsx schema 引用 data_key 在 data dict 中缺失 | 对齐 schema.sheets[].data_key 与 data 的 key |\n| HTML size \u003C 1 MB,validation.size_ok=False | 内容太少或 PNG 丢失 | 检查 png_dir 是否对、PNG 文件存在 |\n| PDF pages 远低于预期 | HTML 渲染异常或 Chrome 崩溃 | 用 Chrome 手动开 HTML 看是否正常,看 Chrome stderr |\n| anchor_count \u003C anchor_target | 子页 HTML 不含 main 标签或 slug 命名冲突 | 子页必须有 `\u003Cmain>` 包裹主体内容 |\n| build_all 报 xlsx skipped | xlsx_schema 或 xlsx_data 任一为 None | 同时传两个,或接受 xlsx ok=False |\n| Output HTML 在浏览器打不开 | 主页编码非 UTF-8 | 重新生成主页保证 UTF-8 BOM 无 |\n| `result[\"missing_pngs\"]` 非空 | 主页\u002F子页引用了 png_dir 不存在的 PNG | 检查 PNG 文件名拼写或是否生成 |\n| 两遍模式 Pass 2 失败但 HTML 未损坏 | 备份恢复机制工作正常 | 排查 Chrome 错误,原 HTML 已自动从备份恢复 |\n\n---\n\n## 跨平台兼容\n\n- Windows \u002F Linux \u002F macOS 全部支持(Chrome 检测分平台,见 [chrome-headless-setup.md](references\u002Fchrome-headless-setup.md))\n- Python 3.10+(PEP 604 `X | None` 语法)\n- 依赖:`httpx` + `lxml` + `pyyaml` + `openpyxl` + 可选 `pypdf`(无则 PDF 不能测量页数,但仍能渲染)\n\n---\n\n## 版本\n\n- v1.0(2026-04-25):从血液科 IFI v2.5.3 项目下沉而来,首个领域无关版本\n  - build_standalone_html(parametric API,intra_page_anchors 可配)\n  - build_pdf(单\u002F两遍模式,跨平台 Chrome,备份恢复)\n  - build_xlsx(schema YAML 驱动)\n  - build_all_deliverables(一键封装 + delivery_manifest.json)\n",{"name":5,"license":15,"description":44},"把多页 HTML 报告(主页 + N 子页 + PNG 资产)合并为单一独立 HTML \u002F PDF \u002F XLSX 三件交付物。 Use when finalizing a disease market sizing report and need shareable deliverables — single-file HTML for email\u002FIM(零依赖,双击浏览器开), optional PDF for print\u002Farchive, XLSX for data export. 领域无关、跨疾病通用。 下游 of disease-market-sizing-html-template;上游 of email\u002FIM\u002Fprint 分发。 Use proactively whenever the user says \"做交付物\" \u002F \"生成 PDF\" \u002F \"导 Excel\" \u002F \"合并单文件 HTML\"。\n","mine","1e7390741dffd3d5041fca4ebc056071ee3ba137","archives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder",5,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub","https:\u002F\u002Fgithub.com\u002FEthanYoQ","www.orz.md","Part Marketer, Part AI Explorer.","2026-11-07 14:52:29",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add EthanYoQ\u002FSkill-hub --skill report-bundle-builder",{"tool":60,"command":61},"bunx","bunx skills add EthanYoQ\u002FSkill-hub --skill report-bundle-builder",{"tool":63,"command":64},"pnpm","pnpm dlx skills add EthanYoQ\u002FSkill-hub --skill report-bundle-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002FSKILL.md",true,[68,74,78,84,88,92,96,100,104,108],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fbundle-manifest-spec.md","REFERENCE","参考文档",3899,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Freferences\u002Fbundle-manifest-spec.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fchrome-headless-setup.md",2433,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Freferences\u002Fchrome-headless-setup.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002F__init__.py","SCRIPT","脚本",63,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002F__init__.py",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002F_persist_sub_pages.py",2324,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002F_persist_sub_pages.py",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002F_validate.py",534,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002F_validate.py",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fbuild_all.py",5781,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002Fbuild_all.py",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fbuild_pdf.py",8287,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002Fbuild_pdf.py",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fbuild_standalone_html.py",9056,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002Fbuild_standalone_html.py",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fbuild_xlsx.py",4644,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002Fbuild_xlsx.py",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Fbuilder.py",31204,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Freport-bundle-builder\u002F6635774a64eeed6e\u002Freport-bundle-builder\u002Fscripts\u002Fbuilder.py",[113,138,162,185,202,216],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":39},"01M713CBDSYARG4PXFXK2R2NNN","xhs-pharma-social-listening","Run evidence-disciplined Xiaohongshu social listening for foreign pharma employee pain points. Use when the user asks to collect and analyze notes\u002Fcomments about pharma companies, aliases, roles, compliance, medical affairs, or AI topics, then produce a cited and scored sampled-insight report. Includes independent-evidence counting, MediaCrawler batch collection, and CAPTCHA\u002F461 fallback to Agent Reach\u002FOpenCLI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fxhs-pharma-social-listening\u002FSKILL.md",[],[120,121,122,123,124,125,35,126,127,128,129,130,131,132,133,134,135,26,136,137],"social","xhs pharma social listening","social listening","xhs","medical","counting","collection","batch","analyze","notes","run","opencli","fallback","captcha","agent reach","evidence","collect","produce",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":39},"01M713C8Q76ZP0WXXBRAFKS6EE","healthcare-phi-compliance","Protected Health Information (PHI) and Personally Identifiable Information (PII) compliance patterns for healthcare applications. Covers data classification, access control, audit trails, encryption, and common leak vectors. Use when code touches PHI or PII in a healthcare system, or when auditing access control, audit trails, or leak vectors.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-phi-compliance\u002FSKILL.md",[],[145,146,147,148,149,150,151,152,35,153,154,155,156,31,157,158,26,159,160,161],"healthcare","phi","compliance","healthcare phi compliance","pii","compliance patterns","information","access","encryption","code","common","audit","patterns","Access Control","system","applications","Auditing Access Control",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":39},"01M713C5R2GE43X45T2K75TB76","healthcare-eval-harness","Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures. Use when a healthcare deployment must be gated on patient-safety tests for CDSS accuracy, PHI exposure, and workflow integrity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-eval-harness\u002FSKILL.md",[],[145,169,170,171,172,173,174,35,175,176,177,178,146,26,179,180,181,182,183,184],"eval","harness","healthcare eval harness","eval harness","clinical","patient","workflow","Evaluation","Safety","integrity","deployment","accuracy","tests","deployments","use","super",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":39},"01M713C2J17S91VYR7A8M696VR","healthcare-emr-patterns","EMR\u002FEHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry. Use when building EMR or EHR features such as encounter workflows, prescription generation, or clinical data entry UI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-emr-patterns\u002FSKILL.md",[],[145,192,157,193,194,124,173,195,35,196,197,198,177,31,199,200,201,26,160,183],"EMR","healthcare emr patterns","decision","workflows","support","clinical decision support","features","ui","as","development",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":208,"publishedAt":39},"01M713BZERTXV0N8X6SW9DDVWZ","healthcare-cdss-patterns","Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows. Use when building clinical decision support — drug interaction checks, dose validation, clinical scoring, or alert severity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-cdss-patterns\u002FSKILL.md",[],[145,157,209,194,173,192,195,35,210,211,196,197,212,201,159,213,183,214,184,215],"healthcare cdss patterns","scoring","interaction","severity","classification","alert","decision support",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":222,"publishedAt":39},"01M713BVK3PQR7V4ZKYGMWMXJD","dxy-task-clarify","用户的请求含糊、缺背景、缺资料说明、缺读者或用途时使用。先用少量带选项的追问把任务问清楚，写成任务卡，用户确认后再执行。尤其适用于医生、科研人员和药企各岗位的工作，例如「帮我分析一下这些数据」「帮我准备明天的拜访」「写个总结」「做个 PPT」「回一下这封邮件」「整理一下会议纪要」「整理一下这些文献」「帮我准备下周的讲课」「写个病例汇报」「帮我写个提示词」。用户说「先问我」「帮我理清需求」「我不知道怎么描述」「我不会问 AI」时也使用。用途、资料、读者都已说清的请求，纯翻译，以及写代码、改代码，不使用。","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fdxy-task-clarify\u002FSKILL.md",[],[223,224,225,226,227,228,229,230],"clarify","dxy task clarify","task","pptx","整理","翻译","数据","总结"]