본문으로 건너뛰기
cccskills
무료GitHub에 공개

docx-convert

[Document Processing] Use when converting between Word DOCX and Markdown (GFM, math rendering). --to={markdown|docx}.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Word
설치 방법 보기

포함된 파일(21)

  • SKILL.md7.6 KB
  • scripts/convert.cjs3.4 KB
  • tests/dispatcher.test.cjs4.4 KB
  • to-docx/assets/default-theme.json311 B
  • to-docx/package.json406 B
  • to-docx/scripts/convert.cjs4.7 KB
  • to-docx/scripts/lib/config-loader.cjs2.4 KB
  • to-docx/scripts/lib/converter.cjs2.7 KB
  • to-docx/scripts/lib/output-handler.cjs1.6 KB
  • to-docx/tests/converter.test.cjs4.2 KB
  • to-docx/tests/fixtures/sample.md724 B
  • to-docx/tests/run-tests.cjs895 B
  • to-docx/tests/test-framework.cjs2.0 KB
  • to-markdown/package.json457 B
  • to-markdown/scripts/convert.cjs4.5 KB
  • to-markdown/scripts/lib/converter.cjs4.1 KB
  • to-markdown/scripts/lib/html-to-markdown.cjs1.6 KB
  • to-markdown/scripts/lib/output-handler.cjs1.7 KB
  • to-markdown/tests/converter.test.cjs3.7 KB
  • to-markdown/tests/run-tests.cjs415 B
  • to-markdown/tests/test-framework.cjs3.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Quick Summary

Goal: Convert Word DOCX to Markdown, or Markdown to Word DOCX, through one entry point.

Workflow:

  1. Pick a direction — --to markdown (DOCX in, Markdown out) or --to docx (Markdown in, DOCX out)
  2. Install that direction — each one has its own package.json; install only the one you need
  3. Convert — run scripts/convert.cjs --to <direction> with the direction's own options
  4. Output — the converter returns JSON with the success status and output path

Key Rules:

  • --to is required. There is no default direction — converting the wrong way silently is worse than an error.
  • Every other argument is passed straight to the chosen converter, so each direction keeps its own CLI.
  • Dependencies are per direction: --to markdown never pulls in the DOCX writer, and vice versa.

Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).

Contents

docx-convert

Convert Microsoft Word (.docx) files to GitHub-Flavored Markdown, and Markdown files to editable Word documents with tables, code blocks, images and LaTeX math.

Directions

FlagConvertsLives inDependencies
--to markdownDOCX → Markdownto-markdown/mammoth, turndown, turndown-plugin-gfm
--to docxMarkdown → DOCXto-docx/markdown-docx, gray-matter

Installation Required

Each direction installs separately. Install only the one you need:

# DOCX -> Markdown
cd .claude/skills/docx-convert/to-markdown
npm install

# Markdown -> DOCX
cd .claude/skills/docx-convert/to-docx
npm install

ck init (which runs install.sh) handles every skill at once.

Quick Start

# DOCX -> Markdown
node .claude/skills/docx-convert/scripts/convert.cjs --to markdown --input ./document.docx

# DOCX -> Markdown, extracting images to a folder instead of inlining base64
node .claude/skills/docx-convert/scripts/convert.cjs --to markdown -i ./doc.docx --images ./images/

# Markdown -> DOCX
node .claude/skills/docx-convert/scripts/convert.cjs --to docx --input ./README.md

# Markdown -> DOCX with a custom theme
node .claude/skills/docx-convert/scripts/convert.cjs --to docx -i ./doc.md --theme ./theme.json

--to=markdown and --to markdown are equivalent. A missing or unknown --to prints the valid directions and exits 1.

CLI Options

Dispatcher

OptionDescriptionDefault
--toConversion direction: markdown or docx(required)

--to markdown (DOCX → Markdown)

OptionShortDescriptionDefault
--input-iInput DOCX file path(required)
--output-oOutput markdown file path{input}.md
--imagesDirectory for extracted imagesinline base64
--help-hShow help message

--to docx (Markdown → DOCX)

OptionShortDescriptionDefault
--input-iInput markdown file(required)
--output-oOutput DOCX path{input}.docx
--theme-tCustom theme JSONbuilt-in
--titleDocument titlefilename
--help-hShow help

Run scripts/convert.cjs --to <direction> --help to see a direction's full help.

Features

DOCX → Markdown

  • GFM Tables: Word tables become markdown tables
  • Images: embedded images extracted (base64 inline, or written to a folder)
  • Lists: ordered and unordered lists preserved
  • Code Blocks: monospace text converted to code blocks
  • Links and Headings: hyperlinks and heading levels maintained

Markdown → DOCX

  • GFM Support: tables, strikethrough, task lists
  • Code Blocks: syntax preserved with a monospace font
  • Images: local and URL images embedded
  • Math: LaTeX equations rendered by default ($...$, $$...$$)
  • Frontmatter: YAML metadata supplies the title
  • No System Dependencies: pure JavaScript, no Chrome needed

Both directions work on Windows, macOS and Linux.

Conversion Pipeline (--to markdown)

DOCX → mammoth → HTML → turndown → Markdown

The two-stage conversion follows mammoth's official recommendation for best results.

Output

Both directions return JSON on success:

{
    "success": true,
    "input": "/path/to/input.docx",
    "output": "/path/to/output.md",
    "stats": {
        "images": 3,
        "tables": 2,
        "headings": 5
    }
}

--to docx omits stats. On failure both return { "success": false, "error": "..." } and exit 1.

Compatibility (--to docx)

Generated DOCX files open in Microsoft Word (2007+), Google Docs, LibreOffice Writer and Apple Pages.

Limitations

  • Complex layouts (columns, text boxes) may not preserve structure
  • Merged table cells produce basic markdown tables
  • Comments and track changes are stripped
  • Some formatting (fonts, colors) is lost in conversion

Troubleshooting

Missing dependencies: the error output carries a hint with the exact cd … && npm install command for the direction you invoked.

Tests

cd .claude/skills/docx-convert && node tests/dispatcher.test.cjs   # routing and --to validation
cd .claude/skills/docx-convert/to-markdown && node tests/run-tests.cjs
cd .claude/skills/docx-convert/to-docx && node tests/run-tests.cjs

[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting. This prevents context loss from long files. Keep task depth proportional to the work.

Closing Reminders

IMPORTANT MUST ATTENTION Goal: Convert Word DOCX to Markdown, or Markdown to Word DOCX, through one entry point — scripts/convert.cjs --to {markdown|docx}.

IMPORTANT MUST ATTENTION --to is required — never guess the direction for the user IMPORTANT MUST ATTENTION each direction installs its own dependencies; the error hint names the exact directory IMPORTANT MUST ATTENTION break work into small todo tasks using TaskCreate BEFORE starting IMPORTANT MUST ATTENTION search codebase for 3+ similar patterns before creating new code IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act) IMPORTANT MUST ATTENTION add a final review todo task to verify work quality

[TASK-PLANNING] Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Code Quality] Use when a workflow step or the user asks for AI code or plan review: LLM calls, prompts, agents, RAG, evals and guardrails. --mode={code|plan}; --report-only is read-only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Architecture] Use when a workflow step or the user asks for architecture design, compliance review, scalability grading or whole-project audit via --mode={design|review|scalability|full}.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Content] Use when a workflow step or the user asks for product/feature ideation with ranked opportunities and validation tests. --mode={roadmap|scope}.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Content] Use when a workflow step or the user asks for business viability: Business Model Canvas, financials, risks and go-to-market recommendation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Code Quality] Use when a workflow step or the user asks for a focused code-change review: staged, unstaged, branch diff or simple pull request. --fix-loop fixes and re-reviews. Complex pull request: workflow-review-changes; rationale: why-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

duc01226의 스킬 모두 보기

이 스킬의 문제 신고