Agent skill

Office Documents

by ZS520L in ZS520L/HanakoPro

A skill your agent uses when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from…

Apache-2.0Auto-check passedDocuments & Office

Install Office Documents

skills CLI
$ npx skills add ZS520L/HanakoPro --skill office-documents -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZS520L/HanakoPro office-documents --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZS520L/HanakoPro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills2set/office-documents .claude/skills/office-documents && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
office-documents
GitHub stars
103
Token cost
~1.6k tokens
SKILL.md length
502 words
Files
13 (incl. scripts, references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from…

  • Works in 7 steps: Identify the file type from the… → Read first, edit second. Always inspect… → For reading, run scripts/read_document.py. → …
  • The user asks to open
  • SKILL.md covers Core Workflow, Reading, Editing and Verification, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Office Documents is an agent skill from ZS520L/HanakoPro. Use when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from PDF, DOCX, XLSX, XLSM, or PPTX files, including when they mention Word, Excel, PowerPoint, spreadsheet, presentation, Office document, or PDF in passing. 读取或修改 PDF、Word、Excel、PPT 文件时必须使用。

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/docx.md` and `references/licenses.md`). Compatibility notes: Uses bundled Python scripts. Optional libraries improve coverage: markitdown, python-docx, openpyxl, python-pptx, pdfplumber, pypdf. No OfficeCLI, Microsoft…

It sits in Documents & Office, covering Excel spreadsheets, PowerPoint presentations and Word documents. It works with Microsoft Excel, Microsoft PowerPoint and Microsoft Word. The repository describes itself as: Hanako优化版,增加文件diff,内置终端实时查看程序运行日志,消息撤回等程序员和研究生迫切需要的功能。 The licence is Apache-2.0.

When your agent uses it

  • The user asks to open
  • Extract tables/text from
  • Convert information from PDF
  • Including when they mention Word

Example prompts

  • “/office-documents”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Uses bundled Python scripts. Optional libraries improve coverage: markitdown, python-docx, openpyxl, python-pptx, pdfplumber, pypdf. No OfficeCLI, Microsoft Office, LibreOffice, or GUI viewer is required.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Identify the file type from the extension and the user's requested outcome.
  2. Read first, edit second. Always inspect the source file before modifying it.
  3. For reading, run scripts/read_document.py.
  4. For edits, write a small JSON operations file and run the matching edit script.
  5. Save edits to a new output file unless the user explicitly asks to overwrite.
  6. Read the output file again with scripts/read_document.py and verify the requested change.
  7. If the requested operation is outside the supported surface, say so clearly and stop.

What it can do on your machine

Read from SKILL.md and the folder at commit 49ec8dc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Uses bundled Python scripts. Optional libraries improve coverage: markitdown, python-docx, openpyxl, python-pptx, pdfplumber, pypdf. No OfficeCLI, Microsoft Office, LibreOffice, or GUI viewer is required.

    From compatibility in the SKILL.md frontmatter.

Context cost

Office Documents loads about 1.6k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 96 tokens; SKILL.md has 502 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ZS520L/HanakoPro at commit 49ec8dc, republished under its Apache-2.0 licence (© ZS520L). 502 words, ~1,583 tokens.

Download SKILL.mdSave it as .claude/skills/office-documents/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
office-documents
description
Use when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from PDF, DOCX, XLSX, XLSM, or PPTX files, including when they mention Word, Excel, PowerPoint, spreadsheet, presentation, Office document, or PDF in passing. 读取或修改 PDF、Word、Excel、PPT 文件时必须使用。
compatibility
Uses bundled Python scripts. Optional libraries improve coverage: markitdown, python-docx, openpyxl, python-pptx, pdfplumber, pypdf. No OfficeCLI, Microsoft Office, LibreOffice, or GUI viewer is required.
metadata.default-enabled
true

Office Documents

Use this skill for document files, not for building an Office viewer. The goal is to let the agent understand and safely modify files through deterministic scripts.

Supported formats:

  • PDF: .pdf
  • Word: .docx
  • Excel: .xlsx, .xlsm
  • PowerPoint: .pptx

Do not use Anthropic/Claude document skills as source material. This skill is independently written and relies on permissive open-source libraries or direct OOXML parsing. See references/licenses.md before changing dependencies.

Core Workflow

  1. Identify the file type from the extension and the user's requested outcome.
  2. Read first, edit second. Always inspect the source file before modifying it.
  3. For reading, run scripts/read_document.py.
  4. For edits, write a small JSON operations file and run the matching edit script.
  5. Save edits to a new output file unless the user explicitly asks to overwrite.
  6. Read the output file again with scripts/read_document.py and verify the requested change.
  7. If the requested operation is outside the supported surface, say so clearly and stop.

Reading

Use read_document.py for every supported format:

bash
python3 skills2set/office-documents/scripts/read_document.py input.docx --format markdown
python3 skills2set/office-documents/scripts/read_document.py input.xlsx --format json --output summary.json
python3 skills2set/office-documents/scripts/read_document.py input.pdf --max-chars 120000

Behavior:

  • It tries MarkItDown first when available.
  • If MarkItDown is unavailable, it uses direct OOXML readers for DOCX, XLSX, and PPTX.
  • For PDF text extraction it tries pdfplumber, then pypdf.
  • It returns clear JSON errors when required PDF libraries are unavailable or the file is unsupported.

For large documents, read enough to understand structure first, then narrow by sheet, slide, page, heading, or searched text.

Editing

Use JSON operations. Keep each operation explicit and small enough to verify.

DOCX
bash
python3 skills2set/office-documents/scripts/edit_docx.py input.docx output.docx --ops ops.json

Supported operations:

json
[
  { "op": "replace_text", "find": "old text", "replace": "new text" },
  { "op": "append_paragraph", "text": "New paragraph" },
  { "op": "add_table", "rows": [["Name", "Value"], ["A", "10"]] }
]

Use replace_text for safe text updates. append_paragraph and add_table require python-docx.

XLSX
bash
python3 skills2set/office-documents/scripts/edit_xlsx.py input.xlsx output.xlsx --ops ops.json

Supported operations:

json
[
  { "op": "set_cell", "sheet": "Sheet1", "cell": "B2", "value": "Approved" },
  { "op": "set_formula", "sheet": "Sheet1", "cell": "C10", "formula": "=SUM(C2:C9)" },
  { "op": "append_row", "sheet": "Sheet1", "values": ["Total", 1200] },
  { "op": "add_sheet", "name": "Summary" },
  { "op": "rename_sheet", "sheet": "Sheet1", "name": "Data" },
  { "op": "set_style", "sheet": "Data", "cell": "A1", "bold": true, "font_color": "FFFFFF", "fill_color": "1F4E79" }
]

XLSX editing requires openpyxl. Preserve formulas unless the user asks to replace them.

PPTX
bash
python3 skills2set/office-documents/scripts/edit_pptx.py input.pptx output.pptx --ops ops.json

Supported operations:

json
[
  { "op": "replace_text", "find": "Q1", "replace": "Q2" },
  { "op": "set_shape_text", "slide": 1, "shape_index": 2, "text": "Updated title" },
  { "op": "add_textbox", "slide": 3, "text": "Speaker note", "left": 1, "top": 1, "width": 8, "height": 1 }
]

Use replace_text for direct OOXML text updates. Shape targeting and text boxes require python-pptx.

Show full SKILL.md (210 more words)Show less
PDF
bash
python3 skills2set/office-documents/scripts/edit_pdf.py input.pdf output.pdf --ops ops.json

Supported operations:

json
[
  { "op": "rotate_pages", "pages": "1,3-4", "degrees": 90 },
  { "op": "extract_pages", "pages": "1-2,5" },
  { "op": "delete_pages", "pages": "7" },
  { "op": "merge", "inputs": ["a.pdf", "b.pdf"] },
  { "op": "set_metadata", "metadata": { "/Title": "Updated document" } }
]

PDF editing requires pypdf. Do not claim support for arbitrary PDF text replacement. PDF text is drawing instructions, not normal document text.

Verification

After any edit:

  1. Confirm the output file exists and is non-empty.
  2. Read the output with read_document.py.
  3. Check that requested content changed and unrelated content still appears intact.
  4. Report any limitation, dependency failure, or partial edit.

For XLSX formulas, openpyxl preserves formulas but does not calculate them. If calculated values matter and no recalculation engine is available, say that formulas were written but not recalculated locally.

Unsupported Or Caution Cases

Be explicit when the requested task needs a real Office renderer or advanced document engine:

  • Pixel-perfect layout repair.
  • Scanned PDF OCR when no OCR engine or model is available.
  • PDF arbitrary text replacement.
  • Macros, VBA, encrypted files, password-protected files.
  • Complex PowerPoint animations, transitions, SmartArt, embedded media, OLE objects.
  • Excel pivot table authoring, slicers, external links, macros.
  • Redline or track-changes fidelity matching Microsoft Word.

If the user needs one of these, explain the specific limitation and suggest the smallest safe alternative.

References

Read only the relevant reference file when needed:

  • references/docx.md for Word details.
  • references/xlsx.md for spreadsheet details.
  • references/pptx.md for PowerPoint details.
  • references/pdf.md for PDF details.
  • references/licenses.md for licensing and dependency constraints.

© ZS520L, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (scripts, references) in skills2set/office-documents of ZS520L/HanakoPro.

  • SKILL.md
  • agents/openai.yaml
  • references/docx.md
  • references/licenses.md
  • references/pdf.md
  • references/pptx.md
  • references/xlsx.md
  • scripts/edit_docx.py
  • scripts/edit_pdf.py
  • scripts/edit_pptx.py
  • scripts/edit_xlsx.py
  • scripts/office_common.py
  • scripts/read_document.py

Open the folder on GitHubat commit 49ec8dc

Compare with similar skills

Office Documents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Office Documents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Office Documents this skillZS520L/HanakoPro103—~1.6kAutomated safety check: PassApache-2.0
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Markitdownjimmc414/Kosmos5952 repos~1.7kAutomated safety check: PassNone
PaperJSX Document Generatorcomposio-community/awesome-codex-skills17k—~842Automated safety check: PassApache-2.0
Skill Doc Deliverynyldn/claude-octopus4.2k1 repos~2.4kAutomated safety check: PassMIT
Exam IngestZeKaiNie/universal-examprep-skill303—~5.6kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Markitdown

    jimmc414/Kosmos

    Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing.

    595 GitHub starsUsed in 2 repos~1.7k tokens
    Documents & OfficeAuto-check passed
  • PaperJSX Document Generator

    composio-community/awesome-codex-skills

    Generates PPTX, DOCX, XLSX and PDF files from a JSON layout spec through PaperJSX's packages, creating new documents rather than editing them.

    17k GitHub stars~842 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Skill Doc Delivery

    nyldn/claude-octopus

    Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables

    4.2k GitHub starsUsed in 1 repo~2.4k tokens
    Documents & OfficeAuto-check passed
  • Exam Ingest

    ZeKaiNie/universal-examprep-skill

    从学生上传的课件/大纲/老师勾的重点/真题,一键初始化并验证备考工作区:解析 PDF、DOCX、PPTX、 XLSX、常见独立图片与 txt/md,建立分章节 LLM Wiki、标准题库、结构化接管队列与进度状态;仅在 Python 确实无法运行时 明确降级为手动写盘。当工作区尚未建立、资料发生变化、或建库 readiness 被阻断时使用。

    303 GitHub stars~5.6k tokensUpdated 12 days ago
    Documents & OfficeAuto-check passed
  • Process, convert, OCR, extract, redact, sign, and fill documents using the Nutrient DWS API.

    276k GitHub starsUsed in 4 repos~1.5k tokens
    Documents & OfficeAuto-check passed

More from ZS520L/HanakoPro

  • Research Platform

    ZS520L/HanakoPro

    全自动科研平台:从论文检索、知识图谱构建、研究缺口分析、假设生成,到实验执行、论文写作、自审修正的完整科研流水线。Agent 按此 Skill 的指令自主推进研究流程。触发场景:做研究、搜论文、找研究缺口、生成假设、跑实验、写论文、文献综述、benchmark对比 / Triggers: research, literature review, paper search, hypothesis…

    103 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Hana Plugin Creator

    ZS520L/HanakoPro

    Create Hana plugin scaffolds and guide users through beginner or developer plugin planning, capability checks, manifest setup, runtime tools, iframe UI, SDK templates, and install-ready plugin…

    103 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Skill Creator

    ZS520L/HanakoPro

    Create new skills, modify and improve existing skills, and measure skill performance.

    103 GitHub stars~7.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Quiet Musing

    ZS520L/HanakoPro

    Deep reasoning framework for complex tasks. An agent skill from ZS520L/HanakoPro.

    103 GitHub stars~574 tokensUpdated 4 mo ago
    Auto-check passed
  • User Guide

    ZS520L/HanakoPro

    Hanako 用户说明书。解答用户关于软件使用方法、功能介绍、常见问题和实用技巧的疑问. An agent skill from ZS520L/HanakoPro.

    103 GitHub stars~2.8k tokensUpdated 4 mo ago
    Auto-check: warnings
  • Image Gen Guide

    ZS520L/HanakoPro

    使用图片/视频生成工具时必读。包含工具参数、非阻塞工作流、任务路由。

    103 GitHub stars~381 tokensUpdated 4 mo ago
    Auto-check passed

Questions about Office Documents

What does Office Documents do?

A skill your agent uses when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from…. Office Documents is an agent skill from ZS520L/HanakoPro. Use when the user asks to open, read, inspect, understand, summarize, analyze, extract tables/text from, modify, update, repair, split, merge, rotate, or convert information from PDF, DOCX, XLSX, XLSM, or PPTX files, including when they mention Word, Excel, PowerPoint, spreadsheet, presentation, Office document, or PDF in passing.

When should I use Office Documents?

Office Documents fits situations like: the user asks to open; extract tables/text from; convert information from PDF; including when they mention Word.

How do I install Office Documents in Claude Code?

Run `npx skills add ZS520L/HanakoPro --skill office-documents -a claude-code`. Or copy the skill folder (skills2set/office-documents in ZS520L/HanakoPro) into .claude/skills/office-documents in your project. Claude Code loads it when a task matches its description.

How do I install Office Documents in Codex?

Run `npx skills add ZS520L/HanakoPro --skill office-documents -a codex`. Or copy the skill folder (skills2set/office-documents in ZS520L/HanakoPro) into .agents/skills/office-documents in your project. Codex loads it when a task matches its description.

Can I use Office Documents in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZS520L/HanakoPro --skill office-documents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/office-documents, .gemini/skills/office-documents, .github/skills/office-documents and .opencode/skills/office-documents in your project.

What does Office Documents need to run?

Going by SKILL.md and its folder, Office Documents needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3. Compatibility (from SKILL.md): Uses bundled Python scripts. Optional libraries improve coverage: markitdown, python-docx, openpyxl, python-pptx, pdfplumber, pypdf. No OfficeCLI, Microsoft Office, LibreOffice, or GUI viewer is required..

Does Office Documents access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Office Documents safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Office Documents use?

Office Documents is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Office Documents use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Office Documents?

Skills that share tags, products or a category with Office Documents: Markitdown (ImCa0/just-laws, 781 stars), Markitdown (jimmc414/Kosmos, 595 stars), PaperJSX Document Generator (composio-community/awesome-codex-skills, 17k stars) and Skill Doc Delivery (nyldn/claude-octopus, 4.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Office Documents?

ZS520L (a GitHub user) maintains it in ZS520L/HanakoPro, which has 103 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on May 31, 2026.

Source: ZS520L/HanakoPro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.