跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

oma-hwp

Convert Hangul HWP, HWPX, or HWPML documents to Markdown with kordoc. Use for text, table, and image extraction from these formats.

文档与办公1.3kskills/oma-hwp/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/first-fluke/oh-my-agent/oma-hwp/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

HWP Skill - HWP / HWPX / HWPML to Markdown Conversion

Scheduling

Goal

Convert Korean HWP-family documents into readable Markdown or structured JSON while preserving document structure for LLM context, RAG, government-document review, or enterprise document processing.

Intent signature

  • User asks to convert, parse, read, extract, or transform .hwp, .hwpx, or .hwpml.
  • User mentions Korean word processor files, Hangul documents, government forms, or "한글 파일".
  • User needs headings, tables, nested tables, lists, images, footnotes, or hyperlinks extracted from HWP-family files.

When to use

  • Converting Korean HWP documents (.hwp, .hwpx, .hwpml) to Markdown
  • Preparing Korean government/enterprise documents for LLM context or RAG
  • Extracting structured content (tables, headings, lists, images) from HWP
  • User says "convert this HWP", "parse hwpx", "HWP to markdown", "한글 파일"

When NOT to use

  • PDF files -> use oma-pdf (OCR + Tagged PDF specialization)
  • XLSX / DOCX files -> out of scope; run bunx kordoc directly if needed (note: oma-docs is the documentation-drift skill, not a converter)
  • Generating or editing HWP documents -> out of scope (kordoc itself supports generate / fill / seal / patch / redact / lint / validate / render subcommands; run bunx kordoc@latest <subcommand> directly if needed)
  • Already-text files -> use Read tool directly

Expected inputs

  • input_path: .hwp, .hwpx, or .hwpml file path
  • output_path or output_dir: optional explicit output target
  • format: optional output format — markdown (default), json (structured AST), or chunks (RAG-oriented structural chunk JSON with heading breadcrumbs and standalone table chunks)
  • page_range: optional page or section range
  • kordoc_version: optional pinned kordoc version

Expected outputs

  • Markdown output next to the input file or in the requested directory
  • Optional JSON or RAG-chunks output when requested
  • Post-processed Markdown with flattened GFM tables and stripped Private Use Area glyphs by default
  • A short report with output path, detected source format, and conversion issues

Dependencies

  • bun and bunx
  • bunx kordoc@latest or configured pinned kordoc version
  • resources/flatten-tables.ts for Markdown cleanup
  • Local filesystem access to input and output paths

Control-flow features

  • Branches by file extension, output target, format, page range, encryption/DRM state, and post-processing requirements
  • Calls external CLI tools through bunx and bun run
  • Reads local HWP-family files and writes local Markdown or JSON output
  • Routes non-HWP inputs to other skills instead of stretching this skill's scope

Structural Flow

Entry

  1. Confirm the input path exists.
  2. Confirm the extension is .hwp, .hwpx, or .hwpml.
  3. Resolve output path or directory and default filename.
  4. Check that bun is available.

Scenes

  1. PREPARE: Validate path, extension, size, output target, and requested format.
  2. ACQUIRE: Detect source format and runtime availability.
  3. ACT: Run kordoc with explicit output target and requested options.
  4. VERIFY: Post-process Markdown and inspect structure for headings, tables, lists, images, and footnotes.
  5. FINALIZE: Report output path, source format, and any conversion limitations.

Transitions

  • If the input is .pdf, stop and route to oma-pdf.
  • If the input is .xlsx or .docx, explain that this skill does not advertise those formats.
  • If bun is unavailable, stop and ask the user to install Bun.
  • If Markdown is produced, run resources/flatten-tables.ts unless the caller explicitly needs HTML tables or PUA glyphs preserved.
  • If output is empty or garbled, consult resources/troubleshooting.md.

Failure and recovery

FailureRecovery
bun or bunx unavailableAsk user to install Bun
Unsupported or mismatched formatCheck extension and magic bytes, then route or stop
Encrypted or DRM-locked documentReport limitation and request an accessible copy when needed
Empty Markdown outputTreat as possible scanned-image content and recommend OCR outside this skill
Complex merged tablesAccept flattened Markdown or HTML fallback as best effort
Stale kordoc cacheUse bunx kordoc@latest or configured pinned version
Cannot find module "turndown" from flatten-tables.tsRun bun install in this skill's resources/ directory (its node_modules is gitignored and absent on fresh clones)

Exit

  • Success: output file exists and structure is readable after post-processing.
  • Partial success: output exists with explicitly reported table, glyph, encryption, or fidelity limitations.
  • Failure: no reliable output is produced and the blocking cause is reported.

Logical Operations

Actions

ActionSSL primitiveEvidence
Validate file path and extensionVALIDATEInput preflight in execution protocol
Check runtime availabilityVALIDATEbun --version
Select output target and formatSELECTOutput behavior and config
Run converterCALL_TOOLbunx kordoc@latest
Write output artifactWRITEMarkdown or JSON output
Flatten tables and strip PUA glyphsCALL_TOOLresources/flatten-tables.ts
Inspect extraction qualityVALIDATEVerification step
Report resultNOTIFYFinal user-facing summary

Tools and instruments

  • kordoc: primary HWP-family conversion CLI
  • flatten-tables.ts: post-processing for GFM tables and Hancom PUA cleanup
  • bun / bunx: runtime and CLI executor

Canonical command path

bunx kordoc@latest "{input_path}" -o "{output_path}"
# fresh clone: run `bun install` in {skill_dir}/resources/ first (node_modules is gitignored)
bun "{skill_dir}/resources/flatten-tables.ts" "{output_path}"
# {skill_dir} = this skill's directory: .agents/skills/oma-hwp (project mode) or ~/.agents/skills/oma-hwp (global mode)

For batch conversion, use an explicit output directory:

bunx kordoc@latest "{input_pattern}" -d "{output_dir}"

Resource scope

ScopeResource target
LOCAL_FSInput HWP-family files and generated outputs
PROCESSbunx kordoc and bun run subprocesses
MEMORYFormat decisions, validation notes, and final report

Preconditions

  • Input file exists and is readable.
  • Output location is writable or can be created.
  • bun is installed.
  • kordoc can parse the document or fail with a reportable error.

Effects and side effects

  • Creates Markdown or JSON output files.
  • May flatten merged-cell tables, trading cell fidelity for Markdown compatibility.
  • Strips Private Use Area characters by default because they render as blanks without Hancom fonts.
  • Does not intentionally modify the source HWP-family document.

Guardrails

  1. Always pass @latest or an explicit pinned version to avoid stale bunx cache.
  2. Always pass an explicit output target when the user expects a file.
  3. Do not add custom security defenses around kordoc's ZIP, XML, SSRF, or XSS defenses.
  4. Report missing tables, garbled text, empty output, encrypted segments, and best-effort DRM extraction.
  5. Keep full CLI details in resources/execution-protocol.md and troubleshooting branches in resources/troubleshooting.md.

Supported Formats

FormatExtensionNotes
HWP 5.x binary.hwpFull support (incl. DRM-locked via kordoc's rhwp-algorithm port)
HWPX.hwpxFull support incl. nested tables, merged cells
HWPML.hwp (XML variant)Auto-detected by signature

kordoc also parses PDF / XLSX / DOCX and offers document-authoring subcommands (generate, fill, seal, patch, redact, lint, validate, render). All of those are intentionally outside this skill's scope; see "When NOT to use". Conversion-quality flags (--dedupe-headers, --keep-empty-cols, --inline-images) and the chunks format are documented in resources/execution-protocol.md.

References

  • Execution protocol: resources/execution-protocol.md
  • Troubleshooting: resources/troubleshooting.md
  • Configuration: read the hwp: section of .agents/oma-config.yaml first, then fall back to config/hwp-config.yaml for any key it does not set (supported_formats lives only in the skill config). User overrides belong in .agents/oma-config.yaml, since oma update overwrites the skill config.
  • Upstream: https://github.com/chrisryugj/kordoc
  • Related: ../oma-pdf/SKILL.md (use for .pdf inputs)

相似的 Skill

pdf
anthropics/skills180k

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.

文档与办公

discernment-nudge
anthropics/skills180k

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
anthropics/skills180k

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.

文档与办公

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

文档与办公

pptx
anthropics/skills180k

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 "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

文档与办公

canvas-design
anthropics/skills180k

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

文档与办公