文档办公

docx

k-dense-ai/scie…t-skills

Creates, reads, edits, and manipulates 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.

  • 1818 次安装
  • 5.5万 星标
  • 收录于

安装命令

npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill docx

SKILL.md

DOCX creation, editing, and analysis

A .docx is a ZIP archive of XML files. Choose your approach by task:

Task Approach
Create a new document Write a docx (npm) script — see gotchas below
Fill placeholders in a template patchDocument({ data, outputType, patches }) from docx
Edit arbitrary existing content Safely unpack → edit the relevant OOXML parts → repackage
Read content pandoc -f docx -t markdown --track-changes=all file.docx for review; accept for the accepted text view

Script paths below are relative to this skill's directory.

Creating with docx-js — gotchas

Examples target docx 9.8.1. Check node -p "require.resolve('docx')" in the script's project first. If absent, install it there with npm install docx@9.8.1; preinstallation is environment-specific. These are the main layout constraints: