Communitygithub.com

David-Li0406/meta-skill-evloving

.docx 파일 생성, 편집, 분석을 위한 종합 도구입니다. 변경 추적, 주석, 서식 유지, 텍스트 추출을 지원합니다. Claude가 전문 문서(.docx) 작업 시 활용합니다.

meta-skill-evloving란 무엇인가요?

이 스킬은 Claude가 .docx 파일을 생성, 편집, 분석할 수 있도록 지원하는 종합 도구입니다. 사용자는 문서 생성, 내용 수정, 변경 추적, 주석 추가 등 다양한 문서 작업을 손쉽게 수행할 수 있습니다. 내부적으로는 pandoc을 이용한 텍스트 추출, docx-js를 이용한 새 문서 생성, Document 라이브러리(Python)를 이용한 기존 문서 편집 및 Redlining(변경 추적) 워크플로우를 제공합니다. 특히 법률, 학술, 비즈니스 문서와 같이 정밀한 변경 이력 관리가 필요한 경우 Redlining 워크플로우를 권장하며, 변경 사항을 체계적으로 배치(batch)하여 구현할 수 있습니다. 또한, LibreOffice와 Poppler를 활용하여 문서를 이미지로 변환하는 기능도 포함되어 있어 시각적 분석이 가능합니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/David-Li0406/meta-skill-evloving/tree/HEAD/AgentSkillOS/data/skill_seeds/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개씩 그룹화하세요. 이렇게 하면 디버깅이 관리하기 쉬우면서도 효율성을 유지할 수 있습니다. 각 배치를 테스트한 후 다음 배치로 이동하세요.

원칙: 최소한의 정확한 편집 변경 추적을 구현할 때는 실제로 변경되는 텍스트만 표시하세요. 변경되지 않은 텍스트를 반복하면 편집 내용을 검토하기 어렵고 비전문적으로 보입니다. 교체를 다음과 같이 나누세요: [변경되지 않은 텍스트] + [삭제] + [삽입] + [변경되지 않은 텍스트]. 원본 <w:r> 요소를 추출하여 재사용함으로써 변경되지 않은 텍스트의 원본 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 문서를 시각적으로 분석하려면 두 단계 프로세스를 통해 이미지로 변환하세요:

  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.

David-Li0406/meta-skill-evloving

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

David-Li0406/meta-skill-evloving

Create technical diagrams using Mermaid syntax for architecture, sequences, ERDs, flowcharts, and state machines. Use for visualizing system design, data flows, and processes. Triggers: diagram, mermaid, architecture diagram, sequence diagram, flowchart, ERD, entity relationship, state diagram, C4 model, component diagram, visualize, draw.

David-Li0406/meta-skill-evloving

Complete color manipulation and green screen effects system. PROACTIVELY activate for: (1) Green screen/chromakey removal, (2) Color grading with LUTs, (3) Color correction (levels, curves, white balance), (4) Colorkey/color removal effects, (5) Hue/saturation manipulation, (6) Color space conversions (BT.709, BT.2020, HDR), (7) Color isolation effects, (8) Teal and orange look, (9) Vintage/film looks, (10) Color keying for transparency. Provides: chromakey and colorkey filters, LUT application (lut3d), curves and levels adjustment, color balance, selective color manipulation, color space handling, HDR tone mapping, professional color grading chains.

David-Li0406/meta-skill-evloving

Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.

David-Li0406/meta-skill-evloving

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

David-Li0406/meta-skill-evloving

Build with OpenAI's stateless APIs - Chat Completions (GPT-5, GPT-4o), Embeddings, Images (DALL-E 3), Audio (Whisper + TTS), and Moderation. Includes Node.js SDK and fetch-based approaches for Cloudflare Workers. Use when: implementing chat completions with GPT-5/GPT-4o, streaming responses with SSE, using function calling/tools, creating structured outputs with JSON schemas, generating embeddings for RAG (text-embedding-3-small/large), generating images with DALL-E 3, editing images with GPT-Image-1, transcribing audio with Whisper, synthesizing speech with TTS (11 voices), moderating content (11 safety categories), or troubleshooting rate limits (429), invalid API keys (401), function calling failures, streaming parse errors, embeddings dimension mismatches, or token limit exceeded.

David-Li0406/meta-skill-evloving

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.

David-Li0406/meta-skill-evloving

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

David-Li0406/meta-skill-evloving

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

David-Li0406/meta-skill-evloving

Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.

David-Li0406/meta-skill-evloving

Best practices for Remotion - Video creation in React

David-Li0406/meta-skill-evloving

Provides bidirectional translation (Chinese/English), grammar checking, and sentence polishing. Supports specific tense constraints, context-aware tone adjustment, and natural expression optimization. Outputs direct text without formatting.

David-Li0406/meta-skill-evloving

指导如何通过自定义注解(如@Unicom)标识Dubbo接口,利用BeanDefinitionRegistryPostProcessor在启动时扫描并动态注册ReferenceBean,实现RPC调用的封装。

David-Li0406/meta-skill-evloving

生成Python脚本,利用FFmpeg将图片序列按3x3布局合并,或将合并图拆分。要求使用subprocess模块执行命令,并支持用户交互式输入路径。

David-Li0406/meta-skill-evloving

SOP for extracting and analyzing promotional activity details, handling time formatting, location mapping, payment logic, and step-by-step process validation.

David-Li0406/meta-skill-evloving

Specializes in creating TikTok short video scripts using an anthropomorphic 'Chef' perspective to explain wildlife food chains and survival environments, utilizing real field footage.

David-Li0406/meta-skill-evloving

针对TikTok平台,以拟人化视角(如动物作为厨师)创作系列短视频脚本。重点介绍野生动物、食物链及生态环境,要求使用野外实拍素材,风格幽默且具有教育意义。

David-Li0406/meta-skill-evloving

Generates KWL (Know, Want to know, Learned) charts for educational videos, specifically BrainPOP, using simple 7th-grade language and short, concise bullet points.

David-Li0406/meta-skill-evloving

Develops DAX measures to calculate promo and regular volumes and generates a calculated table of dates excluding continuous promo date ranges, handling multiple periods and nulls.

David-Li0406/meta-skill-evloving

Tracks complex, multi-session work using the Beads issue tracker and dependency graphs, and provides persistent memory that survives conversation compaction. Use when work spans multiple sessions, has complex dependencies, or needs persistent context across compaction cycles. Trigger with phrases like "create task for", "what's ready to work on", "show task", "track this work", "what's blocking", or "update status".

관련 스킬