Skip to content

duyunzhoudyz/dyz-gongwen-skills / skills/gongwen-data

gongwen-data

Verified

为公文整理数据、出图表,包括报表体检(空值、合并单元格、合计校验、单位和时段口径冲突),汇总下级报表,计算同比、环比、增速、百分点、占比、拉动、完成率、平均值并附算式,把数据写成能直接进公文的句子,在本机生成黑白灰 Excel 图表,数据不出本机,缺的数标【待补】。用户说合并科室月报、汇总下面报的表、查查合计对不对、算同比环比、百分点怎么写、这组数写成一段话、做个柱状图折线图时使用。整篇总结和分析报告交 gongwen-report,装有行业包时,本行业专用文书交对应行业包;成稿核数字交 gongwen-review,整改台账转 Excel 交 gongwen-rectify。

FileKindSize
README.mdmarkdown6.3 KB
SKILL.mdskill md18.9 KB
evals/evals.jsonconfig24.0 KB
evals/files/某区政务服务中心2026年1—9月办件量统计.csvother277 B
evals/files/某医院2026年8月五官片区科室月报.csvother314 B
evals/files/某医院2026年9月内科片区科室月报.csvother498 B
evals/files/某医院2026年9月各科室医疗质量指标.csvother1.8 KB
evals/files/某医院2026年9月外科片区科室月报.csvother406 B
evals/files/某医院2026年9月妇儿片区科室月报.csvother324 B
evals/files/某医院2026年9月科室月报应报名单.txtmarkdown251 B
evals/files/某医院2026年三季度不良事件上报明细.csvother1.2 KB
evals/files/某县2026年1—9月各镇(街道)规模以上工业产值.csvother337 B
evals/files/某小学2026年春季学期学生体质健康测试统计表.csvother372 B
evals/files/某社区2026年1—9月关爱独居老人走访台账汇总.csvother301 B
evals/files/某集团2026年1—9月子公司经营指标表.csvother367 B
evals/files/某集团丙公司2026年1—8月经营快报.csvother324 B
evals/files/某集团乙公司2026年1—9月经营快报.csvother301 B
evals/files/某集团甲公司2026年1—9月经营快报.csvother303 B
evals/trigger.jsonconfig2.3 KB
manifest.jsonconfig1.4 KB
references/_shared/README.mdmarkdown110 B
references/_shared/guardrails.mdmarkdown12.6 KB
references/_shared/profiles/roles.mdmarkdown16.1 KB
references/_shared/profiles/units/dangzheng.mdmarkdown7.9 KB
references/_shared/profiles/units/gaoxiao.mdmarkdown11.2 KB
references/_shared/profiles/units/guoqi.mdmarkdown12.7 KB
references/_shared/profiles/units/jiceng.mdmarkdown9.3 KB
references/_shared/profiles/units/shequ.mdmarkdown8.8 KB
references/_shared/profiles/units/yiyuan.mdmarkdown13.2 KB
references/_shared/profiles/units/zhongxiaoxue.mdmarkdown10.6 KB
references/_shared/rules/data-expression.mdmarkdown13.1 KB
references/_shared/rules/doc-types.mdmarkdown28.1 KB
references/_shared/rules/gbt15834.mdmarkdown13.3 KB
references/_shared/rules/gbt15835.mdmarkdown10.6 KB
references/_shared/rules/gbt9704.mdmarkdown17.2 KB
references/_shared/rules/jianfu.mdmarkdown12.5 KB
references/_shared/rules/tiaoli.mdmarkdown15.3 KB
references/_shared/style/ai-tone.mdmarkdown10.2 KB
references/_shared/style/defensive.mdmarkdown8.1 KB
references/_shared/style/output-format.mdmarkdown9.0 KB
references/calc-sheet.mdmarkdown5.2 KB
references/chart-guide.mdmarkdown3.3 KB
references/inspect-checklist.mdmarkdown5.7 KB
references/scripts.mdmarkdown8.9 KB
references/units.mdmarkdown4.3 KB
scripts/chart_tool.pyscript31.7 KB
scripts/data_tool.pyscript144.0 KB
scripts/fact_diff.pyscript57.4 KB
scripts/gongwen_lint.pyscript156.2 KB
scripts/lint_rules.jsonconfig108.7 KB
scripts/secret_check.pyscript8.9 KB
scripts/style_patterns.jsonconfig77.4 KB
# 数据整理与图表(gongwen-data)

> 版本 1.0.0 成熟度:Stable(稳定版)

写总结、汇报、分析报告之前,常要先把一堆报表理清楚。下面报上来的表合计对不上,有的填元有的填万元,同比环比要一个个算,“提高了3%”还是“提高了3个百分点”拿不准,最后还要配几张能黑白打印的图。这个 skill 专做这些事。每个结果都附算式,你能逐个复核;表里没有的数标【待补】,口径对不上的列出来请你确认,不替你凑数。

## 能做什么

| 功能 | 说明 |
|---|---|
| 报表体检 | 查空值和“—”“/”之类的占位符、存成文字的数字、合并单元格、单位不一致、时段不一致、重复行;把表里的合计、小计逐项相加对账 |
| 多表合并 | 汇总科室、下级单位、子公司报来的同类报表:自动对齐表头、换算单位并记录,时段不同的表单列出来不计入合计,比率不相加 |
| 指标计算 | 增减量、同比、环比、增速、百分点、占比、拉动、贡献率、完成率和时间进度、倍数、年均增速、平均值,以及台账明细按类别计数,每个结果附算式 |
| 数据转文字 | 把结果写成可以直接放进公文的句子,如“新登记经营主体4356户,同比增长8.3%;其中企业占比31.0%,同比提高2.4个百分点” |
| 公文图表 | 生成 Excel 原生图表:黑白灰配色、标数据、纵轴从0开始,图上有单位、图下有数据来源,能在 Excel、WPS 里直接改 |

## 可以这样说

1. “30个科室的9月指标都交上来了,帮我合并一下,算算全院的同比环比。”
2. “这张表的合计好像不对,帮我查查哪儿有问题。”
3. “抽检合格率从93%到96%,这个是提高了3%还是3个百分点?帮我写成一句话。”
4. “三家子公司的经营快报,有的按元填有的按万元填,帮我统一一下再汇总。”
5. “把今年1到9月的办件量做个折线图,要能黑白打印的,跟去年同期放一起比。”

## 输入

- 必需:数据。Excel(.xlsx)、CSV 文件,或直接粘贴的表格、口头说的数字都可以。旧版 .xls 请先另存为 .xlsx。
- 最好说明:统计时段、和什么时候比(同比还是环比)、计量单位、数据从哪个系统导出。没说的会从表头和表注里找,找不到的按默认处理并写明。
- 可选:应报单位名单(用来查谁没交)、单位画像 `.gongwen/单位画像.md`。

## 输出

在 Claude Code、Codex、Cursor 等能写文件的工具里,输出到 `公文/<日期>-<标题>/`:

| 文件 | 内容 |
|---|---|
| `正文.txt` | 数据段落(只含正文),纯文本,可直接粘进总结、汇报 |
| `计算底稿.md` | 每个数的算式、结果、正文写法和来源,便于复核 |
| `体检报告.md` | 表格问题清单,按 P0、P1、P2 分级 |
| `汇总表.xlsx` | 多表合并结果,含明细、问题清单、单位换算记录 |
| `图表-*.xlsx` | Excel 原生图表;装了 matplotlib 时可另出 PNG |

起草说明(假设、待补、待核实、用了哪些公式,不超过 5 行)只在对话中给出,不另存文件。在网页大模型里使用提示词版时,依次输出数据段落和起草说明,计算底稿、体检问题清单附在起草说明后面。网页环境不能生成文件,图表会给出“图表规格卡”和 Excel、WPS 的操作步骤。

## 注意事项

1. **保密**:涉密材料请勿输入联网 AI。表格带“秘密★”“内部资料”“不得外传”等标注的,脚本会停止处理,等你说明情况后再继续。明细表中有患者、学生、居民的姓名和证件号的,请先脱敏,汇总分析只需要统计数。
2. **数据不出本机**:脚本只在你的电脑上运行,不联网,不调用在线图表或远程渲染服务。请不要把内部数据粘贴到在线图表网站。
3. **不编造**:表里没有的数标【待补】,约数(“30多”)照写并请你核实,不拿约数做精确计算;变化的原因只写你提供的。
4. **口径冲突不合并**:时段不同、人和人次混用、元和件这种不能换算的,会列出来请你确认,不会悄悄加在一起。比率和平均数用分子分母重新算,不做简单平均。
5. **计算请复核**:有 Python 时用脚本精确计算;网页版是模型手算,会写出算式和验算过程,数据多时会给你 Excel 公式在本机算。
6. **依赖**:脚本需要 Python 3.9 及以上和 openpyxl(`pip install openpyxl`);出 PNG 另需 matplotlib(可选)。

## 与其他 skill 的分工

| 需求 | 用哪个 |
|---|---|
| 写整篇总结、汇报材料、调研报告 | gongwen-report |
| 医疗质量分析报告、经营分析报告等行业专用文书全文 | 装有行业包时用对应行业包(gongwen-hospital、gongwen-soe 等);没装的用 gongwen-report |
| 政务信息、简报 | gongwen-brief |
| 稿子写好了,核一下数字和百分点 | gongwen-review |
| 整改台账、任务分解表、督办清单转 Excel | gongwen-rectify、gongwen-implement、gongwen-minutes |
| 排成国标格式的 Word | gongwen-format |

常见用法:gongwen-data 体检、合并、算数、出图 → gongwen-report 写成总结或汇报 → gongwen-review 核稿 → gongwen-format 出 docx。

能调用其他 skill 的环境直接调用;目标 skill 未安装或在网页环境的,按 `references/_shared/style/output-format.md` 第四部分转交:给交接卡、“新开对话粘贴 `dist/prompts/<skill 名>.md` 继续”的说明和安装命令。

## 成熟度

Stable。v1.0 真实模型评测(Sonnet 5.5,16 条用例)中,A 组(装 skill)期望通过率 99.1%(107/108),编造 0 次,触发评测正例 10/10、反例 10/10,详见 `evals/results/v1.0-benchmark.md`。体检、合并、计算、转文字、出图五项功能和脚本单元测试已完成,评测用例见 `evals/`。已知局限:
- 表头识别靠规则,特别复杂的报表(三级以上表头、一张工作表里并排几张表)可能识别不准,需要用 `--header-row` 指定表头行,或先把表整理规整;
- 网页版没有脚本,计算靠模型手算,数据量大时请按给出的 Excel 公式在本机计算;
- PNG 图表依赖本机中文字体,没有中文字体时请用 Excel 图表。
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall