Opens, reads, cleans, repairs, edits, or creates .xlsx, .xlsm, .xltx, .csv, .tsv files using openpyxl and pandas. Handles Chinese sales ledgers, budgets, schedules, data cleaning, formulas, formatting, charts, and template updates.
Ships in document-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| 任务 | 推荐工具 |
|---|---|
| 公式、样式、结构 | openpyxl |
| 批量数据读写 | pandas |
| 快速浏览内容 | markitdown file.xlsx |
| 同时读取公式和值 | 分别用默认模式和 data_only=True 加载 |
openpyxl、pandas、markitdown 通常已预装。先直接使用,只有导入失败时才安装。脚本路径均相对于本 Skill 目录。
输入:“下载目录里的销售台账.xlsx 帮我补毛利率、按区域汇总,再做一张趋势图。”
**执行:**先识别原表字段、输入单元格和既有样式;用公式生成毛利率,用汇总表和原生图表呈现趋势;回算后检查公式错误和关键数字。
输入:“把这份错位的 CSV 整成下周继续填报的运营模板。”
**执行:**用 pandas 纠正表头和脏行,输出中文列名清晰的 .xlsx;添加“可编辑区域”说明和一行真实格式示例,但不在已有业务表中擅自插入示例数据。
recalc.py 必须达到零公式错误。openpyxl 只写公式字符串,不产生缓存值。含公式文件必须运行:
python scripts/recalc.py output.xlsx
脚本会原地改写工作簿,并输出 JSON:
status: success:公式已回算且没有已识别错误。status: errors_found:进程仍可能退出 0,必须读取 total_errors 和 error_summary。error 字段而不是 status:没有完成回算。绿色回算只证明公式能求值,不证明业务引用正确。抽查至少 2–3 个关键公式的行列和边界。
优先使用 SUMIFS、INDEX、MATCH、IFERROR、SUMPRODUCT 等兼容函数。
以下函数需要 _xlfn. 前缀:TEXTJOIN、CONCAT、IFS、SWITCH、MAXIFS、MINIFS。
不要使用当前校验链无法可靠回算的动态数组函数:
XLOOKUPXMATCHSORTFILTERUNIQUESEQUENCE查找使用 INDEX/MATCH,排序、筛选和去重在 Python 中完成后再写入单元格。
data_only=True 的工作簿不能保存,否则公式会被静态值替换。data_only=True 读取通常是 None;先回算。.xlsm 必须使用 keep_vba=True,否则宏会丢失。='参数 输入'!$B$5。公式如 ='[1]Returns Analysis'!$B$2 指向外部文件。openpyxl 保存后可能丢失原缓存值,LibreOffice 无法解析时会写入 #NAME? 并删除链接。
遇到外部链接时:
recalc.py --force。既有模板或用户要求优先;否则:
0.15 显示为 15.0%。-,倍数显示 0.0x。1.05 写死在公式里。python scripts/recalc.py output.xlsx
随后检查:
total_errors == 0openpyxl · pandas · markitdown · LibreOffice
LICENSE.txt (opens in a new tab)scripts/office/helpers/__init__.py (opens in a new tab)scripts/office/helpers/pptx_chart.py (opens in a new tab)scripts/office/helpers/pptx_slide.py (opens in a new tab)scripts/office/helpers/pptx_theme.py (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd (opens in a new tab)scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/docx只要用户要创建、读取、修改或交付 Word 文档/模板(.docx、.dotx),就应使用本技能。中文触发包括:把会议纪要整理成正式 Word、制作带目录/页码/页眉页脚的报告或函件、修改合同、修订模式、批注、替换图片、提取或重组 Word 内容。即使用户只说“做成正式文档”“给我一份可打印的报告”,只要目标产物是 Word,也应触发。不要用于 PDF、表格、Google Docs API 或与文档无关的编码任务。/pdf只要任务涉及 PDF 输入或输出,就应优先使用本技能。包括:读取/抽取文本与表格、合并拆分、旋转页面、加水印、创建新 PDF、填写表单、加解密、提取图片、扫描件 OCR 等。用户提到 `.pdf` 文件名或要求交付 PDF 时都应触发。/pptx只要 .pptx 或 .potx 参与任务,就必须使用本技能,无论它是输入、输出还是中间材料。中文触发包括:做汇报 PPT、路演稿、培训课件、读/改现有演示文稿、套公司模板、合并拆分页面、调整母版布局、讲稿备注或批注。用户只说“做几页汇报”“把方案整理成 slides”,只要需要真正交付或读取幻灯片也应触发;仅讨论演讲提纲且不操作 PPT 文件时不触发。/document-skills:xlsxfrom document-skills
npx claudepluginhub marcelleon/skills-zh --plugin document-skillsOther plugins' skills for the same job