Communitygithub.com

DOCX 생성, 편집 및 분석

변경 추적, 주석, 서식 유지, 텍스트 추출을 지원하는 포괄적인 문서 생성, 편집, 분석 도구입니다. Claude가 전문 문서(.docx 파일) 작업(새 문서 생성, 콘텐츠 수정, 변경 추적, 주석 추가 등)을 수행해야 할 때 사용합니다.

DOCX 생성, 편집 및 분석란 무엇인가요?

이 스킬은 AI 에이전트가 .docx 파일을 생성, 편집, 분석할 수 있는 완벽한 워크플로우를 제공합니다. 텍스트 추출, 주석, 변경 추적, 복잡한 서식 등 다양한 문서 작업을 지원하며, 작업 유형에 따라 최적의 도구와 접근 방식을 안내합니다. 주요 플랫폼으로는 Claude Code, Cursor, Codex 등이 있으며, 문서 생성에는 docx-js(JavaScript/TypeScript)를, 기존 문서 편집에는 Document Library(Python)를 사용합니다. 변경 추적이 필요한 법률, 학술, 비즈니스 문서의 경우 Redlining 워크플로우를 통해 체계적으로 변경 사항을 계획하고 구현할 수 있습니다. 이 스킬은 문서 작업의 정확성과 효율성을 높여 AI 에이전트가 전문적인 수준의 문서를 다룰 수 있도록 지원합니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiskillstore/marketplace/tree/HEAD/skills/docx

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

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

문서

DOCX 생성, 편집 및 분석은(는) 무엇을 하나요?

개요

사용자가 .docx 파일을 생성, 편집 또는 분석하도록 요청할 수 있습니다. .docx 파일은 본질적으로 XML 파일과 기타 리소스를 포함하는 ZIP 아카이브로, 읽거나 편집할 수 있습니다. 작업 유형에 따라 다양한 도구와 워크플로우를 사용할 수 있습니다.

워크플로우 결정 트리

읽기/분석

아래 "텍스트 추출" 또는 "원시 XML 접근" 섹션을 사용하세요.

새 문서 생성

"새 Word 문서 만들기" 워크플로우를 사용하세요.

기존 문서 편집

  • 자신의 문서 + 간단한 변경 "기본 OOXML 편집" 워크플로우를 사용하세요.

  • 다른 사람의 문서 "Redlining 워크플로우" (권장 기본값)

  • 법률, 학술, 비즈니스 또는 정부 문서 "Redlining 워크플로우" (필수)

콘텐츠 읽기 및 분석

텍스트 추출

문서의 텍스트 내용만 읽어야 하는 경우 pandoc을 사용하여 문서를 마크다운으로 변환하세요. Pandoc은 문서 구조를 훌륭하게 보존하며 변경 추적을 표시할 수 있습니다:

# 변경 추적과 함께 문서를 마크다운으로 변환
pandoc --track-changes=all path-to-file.docx -o output.md
# 옵션: --track-changes=accept/reject/all

원시 XML 접근

주석, 복잡한 서식, 문서 구조, 포함된 미디어, 메타데이터에 액세스하려면 원시 XML이 필요합니다. 이러한 기능이 필요하면 문서의 압축을 풀고 원시 XML 내용을 읽어야 합니다.

파일 압축 풀기

python ooxml/scripts/unpack.py <office_file> <output_directory>

주요 파일 구조

  • word/document.xml - 기본 문서 내용
  • word/comments.xml - document.xml에서 참조하는 주석
  • word/media/ - 포함된 이미지 및 미디어 파일
  • 변경 추적은 <w:ins> (삽입) 및 <w:del> (삭제) 태그를 사용합니다.

새 Word 문서 만들기

처음부터 새 Word 문서를 만들 때는 docx-js를 사용하세요. JavaScript/TypeScript를 사용하여 Word 문서를 만들 수 있습니다.

워크플로우

  1. 필수 - 전체 파일 읽기: docx-js.md (~500줄)를 처음부터 끝까지 완전히 읽으세요. 이 파일을 읽을 때 범위 제한을 절대 설정하지 마세요. 문서 생성을 진행하기 전에 자세한 구문, 중요한 서식 규칙 및 모범 사례를 위해 전체 파일 내용을 읽으세요.
  2. Document, Paragraph, TextRun 구성 요소를 사용하여 JavaScript/TypeScript 파일을 만듭니다(모든 종속성이 설치되어 있다고 가정할 수 있지만, 그렇지 않은 경우 아래 종속성 섹션을 참조하세요).
  3. Packer.toBuffer()를 사용하여 .docx로 내보냅니다.

기존 Word 문서 편집

기존 Word 문서를 편집할 때는 Document 라이브러리(OOXML 조작을 위한 Python 라이브러리)를 사용하세요. 이 라이브러리는 인프라 설정을 자동으로 처리하고 문서 조작을 위한 메서드를 제공합니다. 복잡한 시나리오의 경우 라이브러리를 통해 기본 DOM에 직접 액세스할 수 있습니다.

워크플로우

  1. 필수 - 전체 파일 읽기: ooxml.md (~600줄)를 처음부터 끝까지 완전히 읽으세요. 이 파일을 읽을 때 범위 제한을 절대 설정하지 마세요. 문서 파일을 직접 편집하기 위한 Document 라이브러리 API 및 XML 패턴에 대해 전체 파일 내용을 읽으세요.
  2. 문서 압축 풀기: python ooxml/scripts/unpack.py <office_file> <output_directory>
  3. Document 라이브러리를 사용하여 Python 스크립트를 만들고 실행합니다(ooxml.md의 "Document 라이브러리" 섹션 참조).
  4. 최종 문서 패킹: python ooxml/scripts/pack.py <input_directory> <office_file>

Document 라이브러리는 일반적인 작업을 위한 고급 메서드와 복잡한 시나리오를 위한 직접적인 DOM 액세스를 모두 제공합니다.

문서 검토를 위한 Redlining 워크플로우

이 워크플로우를 사용하면 OOXML로 구현하기 전에 마크다운을 사용하여 포괄적인 변경 추적을 계획할 수 있습니다. 중요: 완전한 변경 추적을 위해 모든 변경 사항을 체계적으로 구현해야 합니다.

일괄 처리 전략: 관련 변경 사항을 3-10개씩 그룹화하세요. 이렇게 하면 디버깅이 관리하기 쉬워지면서도 효율성을 유지할 수 있습니다. 다음 배치로 넘어가기 전에 각 배치를 테스트하세요.

원칙: 최소한의 정밀한 편집 변경 추적을 구현할 때는 실제로 변경되는 텍스트만 표시하세요. 변경되지 않은 텍스트를 반복하면 편집 내용을 검토하기 어렵고 비전문적으로 보입니다. 대체를 다음과 같이 나누세요: [변경되지 않은 텍스트] + [삭제] + [삽입] + [변경되지 않은 텍스트]. 원래 실행의 RSID를 추출하여 변경되지 않은 텍스트에 재사용하여 보존하세요.

예시 - 문장에서 "30일"을 "60일"로 변경:

# 나쁨 - 전체 문장을 대체
'<w:del><w:r><w:delText>계약 기간은 30일입니다.</w:delText></w:r></w:del><w:ins><w:r><w:t>계약 기간은 60일입니다.</w:t></w:r></w:ins>'

# 좋음 - 변경된 부분만 표시하고 변경되지 않은 텍스트에는 원래 <w:r>을 보존
'<w:r w:rsidR="00AB12CD"><w:t>계약 기간은 </w:t></w:r><w:del><w:r><w:delText>30</w:delText></w:r></w:del><w:ins><w:r><w:t>60</w:t></w:r></w:ins><w:r w:rsidR="00AB12CD"><w:t>일입니다.</w:t></w:r>'

변경 추적 워크플로우

  1. 마크다운 표현 얻기: 변경 추적이 보존된 마크다운으로 문서를 변환합니다:

    pandoc --track-changes=all path-to-file.docx -o current.md
    
  2. 변경 사항 식별 및 그룹화: 문서를 검토하고 필요한 모든 변경 사항을 식별하여 논리적 배치로 구성합니다:

    위치 찾기 방법(XML에서 변경 사항을 찾기 위한 방법):

    • 섹션/제목 번호(예: "섹션 3.2", "제4조")
    • 번호가 매겨진 경우 단락 식별자
    • 고유한 주변 텍스트가 있는 Grep 패턴
    • 문서 구조(예: "첫 번째 단락", "서명 블록")
    • 마크다운 줄 번호를 사용하지 마세요 - XML 구조에 매핑되지 않습니다.

    배치 구성(배치당 3-10개의 관련 변경 사항 그룹화):

    • 섹션별: "배치 1: 섹션 2 수정", "배치 2: 섹션 5 업데이트"
    • 유형별: "배치 1: 날짜 수정", "배치 2: 당사자 이름 변경"
    • 복잡성별: 간단한 텍스트 대체부터 시작한 다음 복잡한 구조적 변경을 처리합니다.
    • 순차적: "배치 1: 1-3페이지", "배치 2: 4-6페이지"
  3. 문서 읽기 및 압축 풀기:

    • 필수 - 전체 파일 읽기: ooxml.md (~600줄)를 처음부터 끝까지 완전히 읽으세요. 이 파일을 읽을 때 범위 제한을 절대 설정하지 마세요. "Document 라이브러리" 및 "변경 추적 패턴" 섹션에 특히 주의하세요.
    • 문서 압축 풀기: python ooxml/scripts/unpack.py <file.docx> <dir>
    • 제안된 RSID 기록: 압축 풀기 스크립트는 변경 추적에 사용할 RSID를 제안합니다. 이 RSID를 4b단계에서 사용하기 위해 복사하세요.
  4. 변경 사항을 배치로 구현: 변경 사항을 논리적으로(섹션별, 유형별 또는 근접성별) 그룹화하고 단일 스크립트에서 함께 구현합니다. 이 접근 방식:

    • 디버깅을 더 쉽게 만듭니다(배치가 작을수록 오류를 격리하기 쉬움).
    • 점진적인 진행을 허용합니다.
    • 효율성을 유지합니다(배치 크기 3-10개 변경 사항이 효과적).

    제안된 배치 그룹화:

    • 문서 섹션별(예: "섹션 3 변경 사항", "정의", "해지 조항")
    • 변경 유형별(예: "날짜 변경", "당사자 이름 업데이트", "법적 용어 대체")
    • 근접성별(예: "1-3페이지 변경 사항", "문서 전반부 변경 사항")

    각 관련 변경 배치에 대해:

    a. 텍스트를 XML에 매핑: word/document.xml에서 grep하여 텍스트가 <w:r> 요소에 어떻게 분할되어 있는지 확인합니다.

    b. 스크립트 생성 및 실행: get_node를 사용하여 노드를 찾고, 변경 사항을 구현한 다음 doc.save()를 실행합니다. 패턴은 ooxml.md의 "Document 라이브러리" 섹션을 참조하세요.

    참고: 스크립트를 작성하기 직전에 항상 word/document.xml을 grep하여 현재 줄 번호를 얻고 텍스트 내용을 확인하세요. 각 스크립트 실행 후 줄 번호가 변경됩니다.

  5. 문서 패킹: 모든 배치가 완료되면 압축이 풀린 디렉토리를 다시 .docx로 변환합니다:

    python ooxml/scripts/pack.py unpacked reviewed-document.docx
    
  6. 최종 확인: 전체 문서에 대한 포괄적인 검사를 수행합니다:

    • 최종 문서를 마크다운으로 변환:
      pandoc --track-changes=all reviewed-document.docx -o verification.md
      
    • 모든 변경 사항이 올바르게 적용되었는지 확인:
      grep "원래 구문" verification.md  # 찾으면 안 됨
      grep "대체 구문" verification.md  # 찾아야 함
      
    • 의도하지 않은 변경 사항이 도입되지 않았는지 확인합니다.

문서를 이미지로 변환

Word 문서를 시각적으로 분석하려면 2단계 프로세스를 통해 이미지로 변환합니다:

  1. DOCX를 PDF로 변환:

    soffice --headless --convert-to pdf document.docx
    
  2. PDF 페이지를 JPEG 이미지로 변환:

    pdftoppm -jpeg -r 150 document.pdf page
    

    그러면 page-1.jpg, page-2.jpg 등과 같은 파일이 생성됩니다.

옵션:

  • -r 150: 해상도를 150 DPI로 설정합니다(품질/크기 균형 조정).
  • -jpeg: JPEG 형식으로 출력합니다(원하는 경우 -png를 사용하여 PNG로 출력).
  • -f N: 변환할 첫 번째 페이지입니다(예: -f 2는 2페이지부터 시작).
  • -l N: 변환할 마지막 페이지입니다(예: -l 5는 5페이지에서 중지).
  • page: 출력 파일의 접두사입니다.

특정 범위 예시:

pdftoppm -jpeg -r 150 -f 2 -l 5 document.pdf page  # 2-5페이지만 변환

코드 스타일 지침

중요: DOCX 작업을 위한 코드를 생성할 때:

  • 간결한 코드를 작성하세요.
  • 장황한 변수 이름과 중복 작업을 피하세요.
  • 불필요한 print 문을 피하세요.

종속성

필수 종속성(사용 가능하지 않은 경우 설치):

  • pandoc: sudo apt-get install pandoc (텍스트 추출용)
  • docx: npm install -g docx (새 문서 생성용)
  • LibreOffice: sudo apt-get install libreoffice (PDF 변환용)
  • Poppler: sudo apt-get install poppler-utils (pdftoppm을 사용하여 PDF를 이미지로 변환)
  • defusedxml: pip install defusedxml (안전한 XML 구문 분석용)

Individual skills in this repo

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

aiskillstore/marketplace

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

aiskillstore/marketplace

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

aiskillstore/marketplace

Use when the user asks to "pre-launch check the landing page", "run a Quality-Score preflight", or "verify ad-to-page message match before launch"; produces an ad↔page continuity report — message-match gaps, above-the-fold check, page-speed read, form-friction count, mobile-render flags — as a pass/fix punch list. Not for redesigning or rewriting the page — use landing-optimizer; not for scoring the account or the RQS — use ad-account-auditor. 落地页体验预检/广告落地页一致性检查

aiskillstore/marketplace

Use when the user asks to "optimize our landing page for influencer traffic", "fix our promo-code landing page", or "improve conversion from a creator campaign"; produces a message-match audit, page-structure and social-proof recommendations, a promo-code/CTA conversion plan, and an A/B test roadmap. Not for measuring campaign results after launch — use performance-analyzer.

aiskillstore/marketplace

Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review, critique or improve a landing page, sales page, opt-in page, product page or checkout flow, when conversion rate is low, when paid traffic is not converting, or when someone asks "why isn't this page converting" or wants a CRO / landing page review.

aiskillstore/marketplace

This skill helps users extract GitHub repository project details and contributor contact information using keywords, stars, and update dates. Agent should proactively apply this skill when users express needs like search for GitHub projects by keywords, find top open-source contributors in specific domains, extract developer contacts from GitHub repositories, discover trending repositories with high stars, gather contributor profiles and social links for tech recruiting, retrieve GitHub project descriptions and metrics, build developer communities by finding active contributors, search for repositories updated recently, collect personal website and Twitter links of developers, generate targeted leads for developer tools, or track active open-source contributors for collaboration.

aiskillstore/marketplace

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' work to avoid copyright violations.

aiskillstore/marketplace

Using the Wonda CLI to generate images, videos, music, and audio from the terminal — plus LinkedIn, Reddit, and X/Twitter research and automation

aiskillstore/marketplace

Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.

aiskillstore/marketplace

Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

aiskillstore/marketplace

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

aiskillstore/marketplace

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.).

aiskillstore/marketplace

Router skill for LLMQuant portfolio workflows. Use when the user needs company profiles, thesis tracking, theme research, watchlist monitoring, or alert management.

aiskillstore/marketplace

Account assets, equity and fund positions, P&L, cash flow records, account statements, margin ratios, buy-power estimates, order management, and DCA recurring investments via Longbridge (most require Trade permission). Frameworks: portfolio diagnosis, rebalancing, asset allocation, risk analysis (VaR/CVaR), performance attribution, and tax-loss harvesting. Triggers: "持仓", "账户", "盈亏", "资产", "对账单", "下单", "买入", "卖出", "撤单", "定投", "组合诊断", "再平衡", "资产配置", "风险分析", "绩效归因", "税损收割", "持倉", "賬戶", "盈虧", "對賬單", "下單", "買入", "賣出", "組合診斷", "再平衡", "稅損收割", "positions", "portfolio", "P&L", "order", "buy", "sell", "DCA", "statement", "risk analysis", "rebalancing", "tax harvesting", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

aiskillstore/marketplace

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).

aiskillstore/marketplace

Use for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs/products and ChatGPT Work. Also use for model choice/migration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat/Work/Codex comparisons. Do not use for generic app/software tasks that merely mention Codex.

aiskillstore/marketplace

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

aiskillstore/marketplace

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

aiskillstore/marketplace

Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.

aiskillstore/marketplace

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

관련 스킬