本文へ移動
cccskills
無料GitHub で公開

oma-hwp

Convert HWP / HWPX / HWPML files to Markdown using kordoc. Extracts text, headings, tables, lists, images, footnotes, and hyperlinks. Use for Korean word processor files (Hangul), government documents, and AI-ready data preparation.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md7.5 KB
  • config/hwp-config.yaml865 B
  • resources/bun.lock776 B
  • resources/execution-protocol.md5.1 KB
  • resources/flatten-tables.ts2.1 KB
  • resources/package.json162 B
  • resources/troubleshooting.md3.6 KB

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 -> currently out of scope (may be covered by a future oma-docs)
  • Generating or editing HWP documents -> out of scope
  • 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, default markdown
  • 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 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

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}"
bun run ".agents/skills/oma-hwp/resources/flatten-tables.ts" "{output_path}"

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. Those are intentionally outside this skill's scope — see "When NOT to use".

References

  • Execution protocol: resources/execution-protocol.md
  • Troubleshooting: resources/troubleshooting.md
  • Configuration: config/hwp-config.yaml
  • Upstream: https://github.com/chrisryugj/kordoc
  • Related: ../oma-pdf/SKILL.md (use for .pdf inputs)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

A fixture whose description uses a YAML folded scalar, which parses with an embedded trailing newline unless normalized before use in Markdown tables.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

Draft and revise academic prose against a rubric, evidence, and citation requirements. Use for essays, reports, literature reviews, or academic style audits.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

Architecture specialist for software/system design, module and service boundaries, tradeoff analysis, and stakeholder synthesis. Uses context-aware methods such as diagnostic routing, design-twice comparison, ATAM-style risk analysis, CBAM-style prioritization, and ADR-style decision records.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

Evaluate system boundaries and architectural tradeoffs. Use for architecture decisions, design reviews, and ADRs.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

Implement server APIs, authentication, and application data access. Schema modeling and query tuning use oma-db.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

Backend specialist for APIs, databases, authentication with clean architecture (Repository/Service/Router pattern). Use for API, endpoint, REST, database, server, migration, and auth work.

日本語の概要は準備中です。原文の説明を表示しています。

first-fluke/oh-my-agent1,3412026年10月13日 更新

first-fluke のスキルをすべて見る

このスキルの問題を報告する