Official코딩 & 개발github.com

DOCX

사용자가 Word 문서(.docx) 또는 Word 템플릿(.dotx)을 생성, 읽기, 편집 또는 조작해야 할 때 사용하는 스킬입니다. 트리거는 문서 관련 언급 시 활성화됩니다.

DOCX란 무엇인가요?

이 스킬은 AI 에이전트가 Microsoft Word 문서(.docx)를 완전히 제어할 수 있도록 지원합니다. 생성, 편집, 읽기, 분석을 위한 세 가지 접근 방식을 제공합니다. 새로운 문서는 `docx` (npm) 라이브러리를 사용하여 JavaScript 스크립트로 생성하며, 페이지 크기(US Letter), 표, 목록, 이미지, 주석 처리 등 다양한 기능을 지원합니다. 기존 문서는 `unzip` → XML 편집 → 재압축 방식을 통해 편집하며, 추적된 변경 내역(redlining)과 주석(comments)을 안전하게 처리합니다. 또한 `pandoc`을 통해 내용을 읽고 마크다운으로 변환할 수 있습니다. 주요 지원 도구로는 Node.js, Pandoc, LibreOffice(LibreOffice), Poppler(pdftoppm) 등이 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/anthropics/skills/tree/main/skills/docx

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

DOCX 생성, 편집 및 분석

.docx 파일은 XML 파일들의 ZIP 아카이브입니다. 작업에 따라 적절한 방법을 선택하세요:

작업방법
새 문서 생성docx (npm) 스크립트 작성 — 아래 주의사항 참조
기존 문서 편집unzip → word/document.xml 편집 → zip (docx-js는 기존 파일을 열 수 없음)
내용 읽기pandoc -t markdown file.docx

아래 스크립트 경로는 이 스킬의 디렉터리를 기준으로 합니다.

docx-js로 생성 시 주의사항

docx는 사전 설치되어 있습니다. npm install을 먼저 실행하지 말고 스크립트를 작성한 후 바로 require('docx')를 사용하세요. 해당 require가 실패할 경우에만 npm install docx를 실행하세요. 모델은 API를 알고 있습니다. 다음은 자주 실수하는 부분입니다:

  • 페이지 크기 기본값은 A4입니다. US Letter를 사용하려면 page: { size: { width: 12240, height: 15840 } }로 설정하세요 (DXA 단위; 1440 = 1인치).
  • 가로 방향: 세로 방향 치수를 전달하고 orientation: PageOrientation.LANDSCAPE를 설정하세요 — docx-js가 내부적으로 가로/세로를 바꿉니다.
  • 표는 이중 폭 설정이 필요합니다: 표에 columnWidths를 설정하고 모든 셀에 width를 WidthType.DXA로 설정하세요 (PERCENTAGE는 Google Docs에서 깨집니다). 열 너비의 합이 표 너비와 같아야 합니다.
  • 표 음영: ShadingType.CLEAR를 사용하고, 절대 SOLID를 사용하지 마세요 (검게 렌더링됨).
  • 목록: 글머리 기호(•)를 문자 그대로 삽입하지 마세요. LevelFormat.BULLET과 함께 numbering 구성을 사용하세요.
  • ImageRun은 type:이 필요합니다 ("png", "jpg" 등).
  • PageBreak는 Paragraph 안에 있어야 합니다.
  • \n을 절대 사용하지 마세요 — 대신 별도의 Paragraph 요소를 사용하세요.
  • 목차(TOC): 제목은 내장된 HeadingLevel.*을 사용해야 합니다. 사용자 지정 제목 스타일은 outlineLevel을 설정해야 목차에 나타납니다.
  • 수평선으로 표를 사용하지 마세요 — 대신 단락 아래쪽 테두리를 사용하세요.
  • 점선 안내선 / 같은 줄 오른쪽 정렬: TextRun 안에서 PositionalTab (alignment: PositionalTabAlignment.RIGHT, leader: PositionalTabLeader.DOT)을 사용하고, 문자 그대로의 점(.)이나 공백 패딩을 사용하지 마세요.

출력 확인

.docx 파일을 작성한 후 렌더링하여 확인하세요:

python scripts/office/soffice.py --headless --convert-to pdf output.docx
pdftoppm -jpeg -r 100 output.pdf page
ls page-*.jpg   # 그런 다음 이미지를 읽습니다

pdftoppm은 페이지 번호를 페이지 수의 자릿수에 맞춰 제로 패딩합니다 (page-01.jpg…page-12.jpg).

기존 문서 편집

레거시 .doc 파일은 먼저 변환해야 합니다: python scripts/office/soffice.py --headless --convert-to docx file.doc

unzip -q doc.docx -d unpacked/
find unpacked -type l -delete   # 심볼릭 링크 항목 제거 — 외부에서 받은 docx는 신뢰할 수 없음
python scripts/merge_runs.py unpacked/   # 조각난 실행(run)을 병합하여 텍스트를 찾을 수 있게 함
# unpacked/word/document.xml을 그 자리에서 편집 — 재포맷하거나 이쁘게 출력하지 마세요
(cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .)
python scripts/office/validate.py out.docx --original doc.docx   # XSD 검사; --auto-repair가 일반적인 문제 수정
# 변경 내용 추적(redlining) 중인가요? --author "<변경 내용 추적한 이름>" 을 추가하여 모든 편집이 추적되었는지 확인하세요

Word는 텍스트를 여러 <w:r> 실행으로 나누므로(개정 ID, 맞춤법 검사 표시), 문서에서 볼 수 있는 구문이 XML에서 연속된 문자열로 존재하지 않는 경우가 많습니다. merge_runs.py는 word/document.xml에서 인접하고 동일한 서식의 실행을 병합하며, 내용이나 렌더링은 변경하지 않습니다. 또한 .docx 파일을 직접 받을 수도 있습니다 (python scripts/merge_runs.py doc.docx -o merged.docx).

변경 내용 추적: 변경 내용을 추적(redlining)할 때 --author "<변경 내용 추적한 이름>" (필요 --original)로 유효성을 검사하세요 — 실수로 <w:ins>/<w:del>로 감싸지 않고 변경한 텍스트를 보고합니다. 이는 승인된 보기에서 보이지 않아 쉽게 간과될 수 있습니다. 실행을 <w:ins>/<w:del>로 감싸고 w:id, w:author, w:date 속성을 포함하세요. <w:del> 내부의 텍스트 요소는 <w:delText>이며 <w:t>가 아닙니다. 삭제된 단락 표시(<w:pPr><w:rPr><w:del w:id=".." w:author=".." w:date=".."/></w:rPr></w:pPr>)는 "이 단락을 다음 단락과 병합"을 의미합니다. 따라서 단락을 완전히 삭제하는 것은 위의 표시와 모든 실행에 대한 <w:del>을 추가하는 것입니다. <w:del/>은 rPr의 다른 자식보다 먼저 와야 하며, 순서는 스키마에 의해 강제됩니다.

모든 변경 내용을 수락한 깨끗한 복사본을 만들려면: python scripts/accept_changes.py in.docx out.docx.

삭제된 단락 표시를 수락하면 해당 단락이 아래 단락과 병합되어야 하므로, 모든 실행이 삭제된 단락은 사라집니다. Word는 이렇게 처리합니다. accept_changes.py와 pandoc --track-changes=accept는 항상 그렇지는 않습니다. 둘 다 같은 방식으로 실패합니다 — 삭제된 텍스트는 제거하지만 비워진 단락은 남겨두므로, 자동 번호가 매겨진 경우 잘못된 빈 글머리 기호로 표시됩니다:

  • pandoc --track-changes=accept는 절대 단락을 병합하지 않습니다.
  • accept_changes.py (LibreOffice)는 삭제된 단락 뒤에 빈 공백 단락이 오는 경우를 제외하고 올바르게 병합합니다.

어느 보기에서든 빈 글머리 기호는 해당 보기의 인공물일 뿐, 문서의 결함이 아닙니다. 단락 삭제는 XML에서 확인하세요.

주석

주석은 6개의 상호 연결된 파일이 필요합니다. 도우미를 사용하세요. 디렉터리 모드(동시에 document.xml을 편집할 경우 선호, unzip/rezip 주기 절약), .docx 직접 모드:

# 이미 압축이 풀린 디렉터리에서 (표식도 함께 배치할 때 선호)
python scripts/comment.py unpacked/ "수수료 및 경비 한도가 너무 낮습니다"
python scripts/comment.py unpacked/ "동의함" --parent 0

# .docx에 직접 적용
python scripts/comment.py contract.docx "이 한도가 너무 낮습니다" -o annotated.docx

이 스크립트는 comments.xml, commentsExtended.xml, commentsIds.xml, commentsExtensible.xml, 관계 파일, 콘텐츠 형식 재정의를 작성합니다. 주석 ID는 자동 할당됩니다. 그런 다음 <w:commentRangeStart>/<w:commentRangeEnd>/<w:commentReference> 조각을 출력하므로, word/document.xml에 추가하여 주석이 특정 텍스트에 고정되도록 할 수 있습니다. 해당 표식을 배치하기 전까지 주석은 존재하지만 보이지 않습니다.

의존성

docx (npm, 사전 설치됨 — require('docx')가 실패할 때만 설치) · pandoc · LibreOffice (soffice) · pdftoppm (Poppler)

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists

anthropics/template-skill

Replace with description of the skill and when Claude should use it.

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists

claude-api

|-

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill

slack-gif-creator

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \

관련 스킬