Agent Skillslawve-ai/awesome-legal-skills › docx-processing-openai

docx-processing-openai

GitHub

提供Word文档(.docx)的读取、创建及编辑功能,强调通过视觉渲染验证排版质量。支持表格、图表等专业格式处理,确保交付文档的排版整洁与内容准确。

skills/docx-processing-openai/SKILL.md lawve-ai/awesome-legal-skills

触发场景

需要阅读或提取DOCX文件内容 创建具有专业排版的Word文档 编辑对版式和字体有精确要求的文档 检查文档的视觉布局和质量

安装

npx skills add lawve-ai/awesome-legal-skills --skill docx-processing-openai -g -y
更多选项

不安装直接使用

npx skills use lawve-ai/awesome-legal-skills@docx-processing-openai

指定 Agent (Claude Code)

npx skills add lawve-ai/awesome-legal-skills --skill docx-processing-openai -a claude-code -g -y

安装 repo 全部 skill

npx skills add lawve-ai/awesome-legal-skills --all -g -y

预览 repo 内 skill

npx skills add lawve-ai/awesome-legal-skills --list

SKILL.md

Frontmatter
{
    "name": "docx-processing-openai",
    "metadata": {
        "author": "OpenAI",
        "license": "Apache-2.0",
        "version": "2026.01.30"
    },
    "description": "Toolkit for comprehensive document reading, editing, and creation with visual quality control. Use to work with Word documents (.docx files) for: (1) Reading or extracting content from existing DOCX files, (2) Creating new Word documents with professional formatting, (3) Editing documents requiring precise typography and layout, or any other DOCX reading or generation tasks."
}

DOCX Skill

When to use

  • Read or review DOCX content where layout matters (tables, diagrams, pagination).
  • Create or edit DOCX files with professional formatting.
  • Validate visual layout before delivery.

Workflow

  1. Prefer visual review (layout, tables, diagrams).
    • If soffice and pdftoppm are available, convert DOCX -> PDF -> PNGs.
    • Or use scripts/render_docx.py (requires pdf2image and Poppler).
    • If these tools are missing, install them or ask the user to review rendered pages locally.
  2. Use python-docx for edits and structured creation (headings, styles, tables, lists).
  3. After each meaningful change, re-render and inspect the pages.
  4. If visual review is not possible, extract text with python-docx as a fallback and call out layout risk.
  5. Keep intermediate outputs organized and clean up after final approval.

Temp and output conventions

  • Use tmp/docs/ for intermediate files; delete when done.
  • Write final artifacts under output/doc/ when working in this repo.
  • Keep filenames stable and descriptive.

Dependencies (install if missing)

Prefer uv for dependency management.

Python packages:

uv pip install python-docx pdf2image

If uv is unavailable:

python3 -m pip install python-docx pdf2image

System tools (for rendering):

# macOS (Homebrew)
brew install libreoffice poppler

# Ubuntu/Debian
sudo apt-get install -y libreoffice poppler-utils

If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.

Environment

No required environment variables.

Rendering commands

DOCX -> PDF:

soffice -env:UserInstallation=file:///tmp/lo_profile_$$ --headless --convert-to pdf --outdir $OUTDIR $INPUT_DOCX

PDF -> PNGs:

pdftoppm -png $OUTDIR/$BASENAME.pdf $OUTDIR/$BASENAME

Bundled helper:

python3 scripts/render_docx.py /path/to/file.docx --output_dir /tmp/docx_pages

Quality expectations

  • Deliver a client-ready document: consistent typography, spacing, margins, and clear hierarchy.
  • Avoid formatting defects: clipped/overlapping text, broken tables, unreadable characters, or default-template styling.
  • Charts, tables, and visuals must be legible in rendered pages with correct alignment.
  • Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes.
  • Citations and references must be human-readable; never leave tool tokens or placeholder strings.

Final checks

  • Re-render and inspect every page at 100% zoom before final delivery.
  • Fix any spacing, alignment, or pagination issues and repeat the render loop.
  • Confirm there are no leftovers (temp files, duplicate renders) unless the user asks to keep them.

版本历史

  • 7f58aaf 当前 2026-07-05 11:49

同 Skill 集合

skills/agent-authority-charter-builder-arkadiy-miteiko/SKILL.md
skills/agentic-delegation-audit-adrian-lerer/SKILL.md
skills/ai-audit-trail-larissa-meredith-flister/SKILL.md
skills/assignation-refere-recouvrement-creance-selim-brihi/SKILL.md
skills/canned-response-generator-anthropic/SKILL.md
skills/canned-responses-anthropic/SKILL.md
skills/code-security-review-openai/SKILL.md
skills/compliance-anthropic/SKILL.md
skills/contract-review-anthropic/SKILL.md
skills/contract-risk-analyzer-sneha-ganapavarapu/SKILL.md
skills/cookie-policy-generator-malik-taiar/SKILL.md
skills/court-of-bih-war-crimes-chamber-jeanne-sulzer/SKILL.md
skills/data-processing-agreement-art-28-gdpr-oliver-schmidt-prietz/SKILL.md
skills/decision-ownership-audit-adrian-lerer/SKILL.md
skills/disclosure-strategy-mapper-larissa-meredith-flister/SKILL.md
skills/docx-processing-lawvable/SKILL.md
skills/docx-processing-superdoc/SKILL.md
skills/dpdpa-gdpr-compliance-review-parth-desai/SKILL.md
skills/dpdpa-gdpr-review-parth-desai/SKILL.md
skills/dpia-sentinel-oliver-schmidt-prietz/SKILL.md
skills/due-diligence-gate-adrian-lerer/SKILL.md
skills/eccc-khmer-rouge-tribunal-jeanne-sulzer/SKILL.md
skills/epistemic-fault-line-audit-adrian-lerer/SKILL.md
skills/eu-ai-act-examination-report-generator-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-high-risk-classifier-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-quick-assessment-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-report-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-role-determination-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-roles-oliver-schmidt-prietz/SKILL.md
skills/eu-ai-act-triage-oliver-schmidt-prietz/SKILL.md
skills/eu-legislation-malik-taiar/SKILL.md
skills/excel-editor-openai/SKILL.md
skills/financial-comparison-glossary-adrian-lerer/SKILL.md
skills/french-text-proofreading-christophe-quezel-ambrunaz/SKILL.md
skills/icelandic-company-formation-magnus-smarason/SKILL.md
skills/icelandic-company-formation-magnus-smari-smarason/SKILL.md
skills/icelandic-contract-review-magnus-smarason/SKILL.md
skills/icelandic-contract-review-magnus-smari-smarason/SKILL.md
skills/icelandic-court-case-finder-magnus-smarason/SKILL.md
skills/icelandic-eea-gap-analysis-magnus-smarason/SKILL.md
skills/icelandic-eea-gap-analysis-magnus-smari-smarason/SKILL.md
skills/icelandic-labour-law-magnus-smarason/SKILL.md
skills/icelandic-labour-law-magnus-smari-smarason/SKILL.md
skills/icelandic-legal-terminology-magnus-smarason/SKILL.md
skills/icelandic-legal-terminology-magnus-smari-smarason/SKILL.md
skills/icelandic-privacy-review-magnus-smarason/SKILL.md
skills/icelandic-privacy-review-magnus-smari-smarason/SKILL.md
skills/icty-ictr-irmct-jeanne-sulzer/SKILL.md
skills/indian-dpdp-act-consent-notice-siddhi-kudalkar/SKILL.md

元信息

文件数
0
版本
7f58aaf
Hash
e8568740
收录时间
2026-07-05 11:49

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-01 07:34
浙ICP备14020137号-1 $访客地图$