Skill Press

No. 655 · office-docx

Word documents

A field guide from DeepSeek

DeepSeek

When to use it

Create, read, edit, and validate Word documents (.docx).

Rank
No. 655 of 971
Installs
Not listed yet
Built for
DeepSeek
Runs in
DeepSeek
Length
588 words · 3 min
Files
3
License
MIT

Get this skill

Download the skill folder (.zip, 10 KB) ↓ · SKILL.md only ↓

DeepSeek Harness

DeepSeek ships this edition in its Office skill package.

  1. To use the downloaded edition in another Harness project, extract the ZIP into .agents/skills/ at the project root.
  2. Check for .agents/skills/office-docx/SKILL.md and start a Harness session in that project.
DeepSeek skill discovery ↗

Agent prompt

Paste into a coding agent with terminal access. Check the upstream requirements for the skill you’re installing.

Prompt
Install the "office-docx" Agent Skill by DeepSeek, from https://github.com/deepseek-ai/deepseek-harness.

1. Fetch the whole folder packages/skill/skill-office/assets/office-docx — SKILL.md plus every script, reference, and asset beside it, not just SKILL.md. For example:
   skill_checkout=$(mktemp -d)
   git init "$skill_checkout"
   git -C "$skill_checkout" fetch --depth 1 https://github.com/deepseek-ai/deepseek-harness.git 2e39e70496aa02986ca6a820c5d497e816b69d7e
   git -C "$skill_checkout" checkout --detach FETCH_HEAD
2. Copy it into your skills directory as a folder named "office-docx":
   - Claude Code: ~/.claude/skills/office-docx/ (all projects) or .claude/skills/office-docx/ (this project only)
   - Another agent: the directory you load Agent Skills from (folders containing a SKILL.md)
3. Check that office-docx/SKILL.md exists and its frontmatter says name: office-docx.
4. Read SKILL.md, then tell me in two or three sentences what the skill does and when it will trigger, and list any dependencies it mentions (Python packages, npm packages, CLIs) that aren't installed yet. Don't install them without asking.

skills CLI

One command; the skills.sh installer detects your agents (Claude Code, Cursor, Codex, and more).

Terminal
npx skills add https://github.com/deepseek-ai/deepseek-harness/tree/2e39e70496aa02986ca6a820c5d497e816b69d7e/packages/skill/skill-office/assets/office-docx --skill office-docx

Contents

  1. Create and edit
  2. Check and deliver

The skill, in full

Use python-docx for DOCX creation and ordinary edits unless an explicit user or applicable AGENTS.md requirement names another library. Run Python as described in the Python environment section below.

Keep scripts, intermediate files, and final documents in the workspace; runtime and skill resources are read-only. Use the requested language and preserve the document’s design unless a redesign is requested.

Name Python scripts for their task, such as edit_docx.py; avoid module names such as inspect.py, docx.py, or zipfile.py that shadow imported libraries.

Create and edit

If office_render, office_convert, or office_recalculate is not in your tools, load office with skill; they appear next step.

python-docx cannot read legacy .doc files. Use office_convert with format: "docx", copy the result into the workspace, then edit the copy.

For text edits, locate the target by its text or position and inspect only its runs and formatting. A title can be an ordinary paragraph without a Title style or document-property title. Update the relevant runs; assigning paragraph .text destroys run formatting. Save a new file unless an in-place edit is requested. For ordinary text edits, do not unzip the document, enumerate ZIP members, dump raw XML, or inspect core properties, headers, or footers unrelated to the target. Investigate these only for a concrete failure, an ambiguous target, an unsupported feature, or an explicit user requirement. Rebuilding a document can lose unsupported features.

Use paragraph styles for headings and body text. Size tables for the section that contains them, and account for merged cells and nested tables. Chinese, Japanese, and Korean text may need an explicit w:eastAsia font assignment in addition to run.font.name; font names alone do not establish glyph availability or rendered appearance.

For a new document, use the selected Python executable:

from docx import Document

document = Document()
document.add_heading("Project report", level=0)
document.add_paragraph("Summary", style="Heading 1")
document.add_paragraph("The requested findings go here.")
document.save("report.docx")

python-docx does not paginate or render documents. Do not represent ordinary replacement, colored text, or comments as tracked changes. When real revisions or unsupported OOXML features matter, preserve their package parts and verify the requested operation rather than silently discarding them. When writing package parts directly, create a new ZIP and copy each unchanged member once; appending a replacement member duplicates its name and corrupts the package.

Check and deliver

Reopen the saved document with python-docx and verify the requested content, related formatting, and unchanged content that must be preserved. These checks complete routine validation; deliver the file once they pass. ZIP integrity, package inventories, and metadata matter only for a concrete failure.

Call office_render on the changed page when the user asks for images or visual inspection, or when styling, font color, spacing, sizing, or text alignment is the requested edit; a request to skip rendering takes precedence. New documents and content edits, with incidental basic formatting, are checked with python-docx alone. For PDF output, call office_convert with format: "pdf", then copy the returned temporary file to the destination.

A fully transparent or uniformly blank image of populated content means the renderer failed, which ends visual checks for the task and leaves the source as it is. When content and structure checks pass, state the visual status only as “Content and structure checks passed; visual inspection was not completed.” or “内容与结构检查通过;视觉检查未完成。”.

Call present({"files":[{"path":"report.docx"}]}) with the actual final DOCX path. It exposes the current file without copying or preserving its bytes; keep it in place and omit temporary QA reports unless requested. If present is unavailable, deliver the final workspace path with the session’s supported method.

More in Office & Productivity

All Office & Productivity skills →

More from DeepSeek

From deepseek-ai/deepseek-harness at 2e39e70, MIT. Install counts from skills.sh.