docx

GitHub

基于python-docx库创建和修订Microsoft Word文档。支持生成报告、信函等,遵循排版规范。提供原地修订功能,处理文本、表格及样式修改,并具备版本验证与保存能力。

docker/sandbox/skills/docx/SKILL.md MODSetter/SurfSense

Trigger Scenarios

需要生成Word文档 请求编辑或修订现有DOCX文件

Install

npx skills add MODSetter/SurfSense --skill docx -g -y
More Options

Non-standard path

npx skills add https://github.com/MODSetter/SurfSense/tree/main/docker/sandbox/skills/docx -g -y

Use without installing

npx skills use MODSetter/SurfSense@docx

指定 Agent (Claude Code)

npx skills add MODSetter/SurfSense --skill docx -a claude-code -g -y

安装 repo 全部 skill

npx skills add MODSetter/SurfSense --all -g -y

预览 repo 内 skill

npx skills add MODSetter/SurfSense --list

SKILL.md

Frontmatter
{
    "name": "docx",
    "description": "Create polished, editable Microsoft Word documents such as reports, letters, proposals, and handbooks."
}

DOCX

Create the requested Word document in /workspace with the preinstalled python-docx package. Never install or download dependencies.

Authoring rules

  • Use one page size and orientation for the document unless the user asks for a different layout. Prefer portrait; narrow wide content instead of silently switching sections to landscape.
  • Choose the page size the user requests, or the locale-appropriate default when they do not specify one.
  • Set margins of at least 18 mm and use built-in heading levels.
  • Set table and cell widths deliberately and use a visible table grid.
  • Use Word numbering/list styles; never insert literal • characters.
  • Put page breaks in their own paragraphs. Use separate paragraphs instead of newline characters for separate blocks.
  • Do not add a table of contents unless the user asks. If requested, use built-in heading levels and state that page numbers populate when Word opens and updates the field.
  • For right-aligned text on the same line, use a right tab stop.
  • Generate the document as one whole document. Do not assemble or save one DOCX per intended page; Word controls pagination through reflow.

Revisions

Start an in-place revision with load_artifact_for_revision. Use python-docx to open primary_path, make common edits directly to the existing document, and write the result to expected_output_path. Common edits include paragraph text and styles, headings, ordinary tables, lists, headers/footers, section settings, and embedded images that python-docx can safely preserve.

If the requested edit touches a structure python-docx cannot safely interpret or preserve—such as macros, SmartArt, complex fields, tracked changes, content controls, or unsupported drawing/layout XML—stop and report the blocker. Do not silently rebuild from markdown_path and do not fall back to a Markdown-only deliverable. Rebuild the DOCX from Markdown/context only when the user explicitly requested or accepted that lossy rebuild.

Do not use vision to reconstruct the document; verify_artifact may use vision after the revision is written. Save the verified revision with the returned artifact_id and expected_generation. A changed title, filename, or design is still the same artifact unless the user explicitly asks for a separate copy.

Verify and save

Call verify_artifact(path=output_path, format="docx"). Warnings are advisory. If it reports blocking findings, fix all blockers together, regenerate once at the same output path, and reverify. If a blocker remains, stop and explain it instead of entering another automatic rewrite loop.

Then call save_artifact(path=output_path, title="...", markdown_representation="..."). Working files may use any paths; no source file, preview file, or matching filename stem is part of the publication contract. The Markdown representation must faithfully contain the document's substantive text for accessibility and search.

Version History

  • 014e47a Current 2026-09-23 08:23

    重构工件流程:要求显式指定验证格式。

  • 2b50e7a 2026-08-20 17:06

Same Skill Collection

.agents/skills/codebase-design/SKILL.md
.agents/skills/migrate-radix-to-base/SKILL.md
.agents/skills/shadcn/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/translate/SKILL.md
.cursor/skills/alert-manager/SKILL.md
.cursor/skills/animation-vocabulary/SKILL.md
.cursor/skills/backlink-analyzer/SKILL.md
.cursor/skills/competitor-analysis/SKILL.md
.cursor/skills/content-gap-analysis/SKILL.md
.cursor/skills/content-quality-auditor/SKILL.md
.cursor/skills/content-refresher/SKILL.md
.cursor/skills/domain-authority-auditor/SKILL.md
.cursor/skills/emil-design-eng/SKILL.md
.cursor/skills/entity-optimizer/SKILL.md
.cursor/skills/frontend-design/SKILL.md
.cursor/skills/geo-content-optimizer/SKILL.md
.cursor/skills/improve-codebase-architecture/SKILL.md
.cursor/skills/internal-linking-optimizer/SKILL.md
.cursor/skills/keyword-research/SKILL.md
.cursor/skills/memory-management/SKILL.md
.cursor/skills/meta-tags-optimizer/SKILL.md
.cursor/skills/on-page-seo-auditor/SKILL.md
.cursor/skills/performance-reporter/SKILL.md
.cursor/skills/python-patterns/SKILL.md
.cursor/skills/rank-tracker/SKILL.md
.cursor/skills/review-animations/SKILL.md
.cursor/skills/schema-markup-generator/SKILL.md
.cursor/skills/seo-content-writer/SKILL.md
.cursor/skills/serp-analysis/SKILL.md
.cursor/skills/shadcn/SKILL.md
.cursor/skills/system-architecture/SKILL.md
.cursor/skills/tdd/SKILL.md
.cursor/skills/technical-seo-checker/SKILL.md
.cursor/skills/ugc-brief/SKILL.md
.cursor/skills/vercel-react-best-practices/SKILL.md
.cursor/skills/web-design-guidelines/SKILL.md
docker/sandbox/skills/flashcards/SKILL.md
docker/sandbox/skills/html/SKILL.md
docker/sandbox/skills/infographic/SKILL.md
docker/sandbox/skills/mindmap/SKILL.md
docker/sandbox/skills/pdf/SKILL.md
docker/sandbox/skills/pptx/SKILL.md
docker/sandbox/skills/quiz/SKILL.md
docker/sandbox/skills/video/SKILL.md
docker/sandbox/skills/xlsx/SKILL.md
.agents/skills/frontend-workflow/SKILL.md
.cursor/skills/playwright-testing/SKILL.md

Metadata

Files
0
Version
176aed2
Hash
eac098d1
Indexed
2026-08-20 17:06

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-01 13:41
浙ICP备14020137号-1