跳到正文
cccskills
免费在 GitHub 公开中文介绍

microsoft-office

使用命令行工具创建、读取和编辑 Word、PowerPoint、Excel 文件,可填写模板并转换 CSV 数据。无需启动 Microsoft Office,支持离线处理。

原文查看原文说明

Create, read, and edit Word, PowerPoint, and Excel files.

NousResearch/hermes-agent星标 258,442(GitHub 258,442 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 创建或修改 Word 报告和信件
  • 制作或更新 PowerPoint 演示文稿
  • 编辑 Excel 表格、公式或图表
  • 填写现有模板
  • 将 CSV 转换为 Excel 工作簿

中文介绍

功能

使用命令行辅助工具创建、读取和编辑 Word(.docx)、PowerPoint(.pptx)以及 Excel(.xlsx、.csv)文件。可以向文档模板填入内容,查看修订记录和评论,读取幻灯片备注与结构,编辑表格公式和图表,也可以转换 CSV 文件。处理文件时无需启动 Microsoft Office。

适用场景

可用于整理报告或信件、重新制作演示文稿或表格,也可检查现有文件并更新其中部分内容。适合文件格式明确的任务,因为操作前需要查阅相应格式的参考说明。

使用示例

  • “读取这个 Word 文件的正文和结构,并修正错字。”
  • “根据这些数据创建一个包含多个工作表的 Excel 工作簿。”
  • “将内容填入这个 PowerPoint 模板,并检查幻灯片。”

注意事项

需要 Python 3.10 或更高版本,以及 python-docx、python-pptx 和 openpyxl。导出 PDF、渲染幻灯片图片或重新计算 Excel 公式,需要 LibreOffice 等额外工具。不支持旧版 .doc、.ppt、.xls 文件,也不支持 .odt、.odp、.ods 格式或在屏幕上进行可视化排版调整。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好资料建议指定输出路径并重新读取结果;未描述对外发送操作。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足资料说明需要 Python 和三个库,PDF 或渲染任务还需额外工具。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月30日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(30)

  • SKILL.md7.7 KB
  • LICENSE1.0 KB
  • references/excel.md8.6 KB
  • references/powerpoint.md9.3 KB
  • references/restructuring.md3.7 KB
  • references/revisions-and-comments.md3.9 KB
  • references/word.md9.2 KB
  • scripts/csv_to_xlsx.py3.3 KB
  • scripts/docx_comments.py10.4 KB
  • scripts/docx_common.py3.2 KB
  • scripts/docx_create.py6.2 KB
  • scripts/docx_edit.py8.4 KB
  • scripts/docx_read.py6.1 KB
  • scripts/docx_revisions.py4.4 KB
  • scripts/docx_template.py2.4 KB
  • scripts/docx_validate.py6.0 KB
  • scripts/pptx_create.py8.8 KB
  • scripts/pptx_edit.py16.8 KB
  • scripts/pptx_from_template.py3.4 KB
  • scripts/pptx_read.py4.6 KB
  • scripts/pptx_render.py3.5 KB
  • scripts/xlsx_create.py9.6 KB
  • scripts/xlsx_edit.py10.6 KB
  • scripts/xlsx_read.py5.7 KB
  • scripts/xlsx_recalc.py4.1 KB
  • scripts/xlsx_restructure.py15.6 KB
  • scripts/xlsx_to_csv.py2.3 KB
  • tests/test_docx_skill.py21.7 KB
  • tests/test_powerpoint_skill.py20.0 KB
  • tests/test_xlsx_skill.py23.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Microsoft Office Skill

Create, read, edit, and template Word (.docx), PowerPoint (.pptx), and Excel (.xlsx, .csv) files offline with small Python CLIs built on python-docx, python-pptx, and openpyxl. Office itself is never needed. It does not open legacy binary formats (.doc, .ppt, .xls) and does not render pages without LibreOffice.

When to Use

Pick the format, then read its reference with skill_view before working:

FileReferenceTypical asks
.docxreferences/word.mdreports, letters, contracts, {{token}} templates, tracked changes, comments
.pptxreferences/powerpoint.mdpitch decks, brand-template decks, chart refreshes, speaker notes, slide PNGs
.xlsx, .csvreferences/excel.mdstyled multi-sheet workbooks, formulas, charts, CSV conversion, row/column restructures

Deeper notes: references/revisions-and-comments.md (Word review markup) and references/restructuring.md (Excel reference shifting).

  • Not for .doc/.ppt/.xls: convert first with soffice --headless --convert-to docx|pptx|xlsx old-file when LibreOffice is installed.
  • Not for .odt/.odp/.ods, or WYSIWYG layout work.

Prerequisites

  • Python 3.10+ with python-docx, python-pptx, and openpyxl (import names docx, pptx, openpyxl).

  • Pick the interpreter with terminal. Use python when it already imports the libraries (the Hermes Docker image ships them). Otherwise, when hermes is on PATH, let Hermes build its shared, pinned documents environment under the Hermes home: it survives container restarts, never touches the Hermes install itself, and is safe to run from several agents at once. When it is not (the terminal runs in a Docker sandbox, which has no Hermes), the block builds a venv in the sandbox home with the same pinned versions. Use this exact block in every document skill so they all share one environment:

    python -c "import docx, pptx, openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then
      PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"
    else
      PY="$HOME/.cache/hermes-docs-venv/bin/python"
      "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null || (
        # Safe to run from several agents at once: each caller builds a private venv,
        # a symlink publishes the first finished one atomically, the others delete theirs.
        mkdir -p "$HOME/.cache" && cd "$HOME/.cache" && stage="$(mktemp -d hermes-docs-venv.XXXXXX)" || exit 1
        old="$(readlink hermes-docs-venv)"  # an earlier build that no longer imports, if any
        python3 -m venv "$stage" &&
          "$stage/bin/python" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0 &&
          "$stage/bin/python" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" &&
          if [ -z "$old" ]; then python3 -c 'import os, sys; os.symlink(*sys.argv[1:])' "$stage" hermes-docs-venv
          elif [ "$(readlink hermes-docs-venv)" = "$old" ]; then
            ln -s "$stage" "$stage.lnk" && python3 -c 'import os, sys; os.replace(*sys.argv[1:])' "$stage.lnk" hermes-docs-venv &&
              case "$old" in hermes-docs-venv.??????) rm -rf "$old" ;; esac
          fi 2>/dev/null
        [ "$(readlink hermes-docs-venv)" = "$stage" ] || rm -rf "$stage" "$stage.lnk"
      )
    fi
    export PY
    "$PY" scripts/docx_create.py --help
    

    Run every helper with "$PY". In PowerShell (Hermes runs on that host, so it is on PATH): $env:PY = hermes pm environment documents --extra documents --extra documents-pdf. Never pip install into the interpreter that runs Hermes or into the hermes pm environment one; Hermes owns both.

  • Optional: LibreOffice (soffice) for PDF export, Excel recalculation, and slide rendering, plus poppler (pdftoppm or pdftocairo) for slide PNGs. The helpers that need them report what is missing and exit 0.

How to Run

Every helper lives in scripts/, is an argparse CLI with --help, prints JSON to stdout, and exits non-zero on failure. Run them with terminal from the skill directory. Author JSON specs with write_file; read results with read_file or straight from stdout.

"$PY" scripts/docx_create.py spec.json out.docx
"$PY" scripts/pptx_create.py deck.json out.pptx
"$PY" scripts/xlsx_create.py spec.json report.xlsx

Quick Reference

TaskWordPowerPointExcel
Create from JSON specdocx_create.pypptx_create.pyxlsx_create.py, csv_to_xlsx.py
Read backdocx_read.py --text/--structurepptx_read.py --outlinexlsx_read.py --sheets/--json
Editdocx_edit.pypptx_edit.pyxlsx_edit.py, xlsx_restructure.py
Fill a templatedocx_template.pypptx_from_template.py—
Review / checkdocx_revisions.py, docx_comments.py, docx_validate.pypptx_render.py (slide PNGs)xlsx_recalc.py, xlsx_to_csv.py

The per-format reference has the full flag table.

Procedure

  1. Identify the format from the file extension or the ask, and load its reference (skill_view with file_path=references/<format>.md).
  2. Set PY with the Prerequisites block once per session.
  3. Create, edit, or read with that format's helpers; pass an output path to keep the original whenever the helper supports one.
  4. Verify the result as the reference's Verification section says, then give the user the exact output path.

Converting to PDF

When LibreOffice is installed, convert headlessly:

soffice --headless --convert-to pdf --outdir out/ file.docx   # also .pptx, .xlsx
soffice --headless --convert-to csv --outdir out/ report.xlsx # first sheet only

Check first with command -v soffice || command -v libreoffice. Fonts not on the host are substituted, so render-check decks before shipping. There is no pure-Python path to PDF for any of these formats: if soffice is missing, say so rather than approximating. For other sheets use xlsx_to_csv.py --sheet NAME.

Pitfalls

  • Never unzip-and-edit the XML. These files are zip packages; raw text substitution corrupts them. Edit through the helpers (or the libraries) and use patch/write_file only for JSON inputs.
  • Text is split into runs. Word and PowerPoint fragment text at edit boundaries; the replace helpers merge equal-format runs first, but a match across differently formatted runs takes the first run's formatting.
  • Nothing computes fields or formulas. Word TOC/page fields and Excel formulas are filled in by the office app on open (or by xlsx_recalc.py).
  • Encoding. Write specs as UTF-8; the helpers read UTF-8 explicitly.
  • Format-specific traps are in each reference.

Verification

  • Re-read every output with the format's read helper and check the expected content is there and the old content is gone.
  • Word: docx_validate.py out.docx exits 0 after revision, comment, or field surgery.
  • PowerPoint: render with pptx_render.py and check each PNG with vision_analyze when the render tools exist.
  • Excel: xlsx_read.py --formulas lists written formulas; run xlsx_recalc.py when cached values matter.
  • The bundled tests are the full contract: "$PY" -m pytest tests/ -q (needs pytest in that interpreter).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费有简介

通过1Password CLI,将保存的密码和API密钥用于命令及配置模板,完成安装、认证、秘密值读取,并通过环境变量向命令传递凭据。

  • 安装并配置1Password CLI
  • 使用已保存的API密钥运行命令
  • 向配置模板填入秘密值
NousResearch/hermes-agent25.8万2026年10月29日 更新

3-statement-model

免费有简介

创建用公式联动利润表、资产负债表和现金流量表的 Excel 模型,分阶段填入历史实际数据与预测假设,比较不同情景,并检查三张报表之间的一致性。

  • 向财务模板填入历史实际数据
  • 建立三张财务报表联动的预测
  • 比较基准、乐观和悲观情景
NousResearch/hermes-agent25.8万2026年10月29日 更新

accelerate

免费有简介

以少量修改让现有PyTorch训练代码适用于多GPU或多台机器,指导混合精度、节省内存的DeepSpeed与FSDP配置,以及训练启动方法。

  • 将单GPU训练迁移至多GPU
  • 配置混合精度训练
  • 通过DeepSpeed或FSDP节省内存
NousResearch/hermes-agent25.8万2026年10月29日 更新

actual-setup

免费有简介

帮助配置Hermes,通过Actual Computer在自己的设备上运行AI模型。支持加密中继与本地连接,涵盖模型选择、响应测试,以及请求报错或空响应的排查。

  • 使用Actual密钥连接Hermes
  • 在本地设备上运行模型
  • 查找、下载并加载本地模型
NousResearch/hermes-agent25.8万2026年10月29日 更新

adversarial-ux-test

免费有简介

扮演不擅长技术、容易不满的用户测试应用,发现难懂的操作和导致放弃使用的障碍。将实际可改进的问题与个人抱怨分开,整理截图、修复建议和任务单。

  • 在发布或演示前检查易用性
  • 检查新用户的使用体验
  • 查找注册和付费流程中的障碍
NousResearch/hermes-agent25.8万2026年10月29日 更新

从中立立场解决两个智能体分别修改代码产生的Git冲突,对照双方差异和意图,记录每处冲突的取舍理由,并通过构建或测试验证合并结果。

  • 解决两个智能体的分支冲突
  • 整合并行工作树中的修改
  • 核对冲突设计决策的理由
NousResearch/hermes-agent25.8万2026年10月29日 更新

查看 NousResearch 的全部技能

报告此技能的问题