Oma hwp

From first-fluke/oh-my-agent · View interactive version

Oma hwp is an AI agent skill from the GitHub repository first-fluke/oh-my-agent. Convert Hangul HWP, HWPX, or HWPML documents to Markdown with kordoc. Use for text, table, and image extraction from these formats.

How to use this skill

Skill file

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

When to use

When NOT to use

Expected inputs

Expected outputs

Dependencies

Structural Flow

Transitions

Failure and recovery

| Failure | Recovery |

|---------|----------|

| bun or bunx unavailable | Ask user to install Bun |

| Unsupported or mismatched format | Check extension and magic bytes, then route or stop |

| Encrypted or DRM-locked document | Report limitation and request an accessible copy when needed |

| Empty Markdown output | Treat as possible scanned-image content and recommend OCR outside this skill |

| Complex merged tables | The post-process flattens merged cells into GFM pipe tables; nested tables and tables without a <th> heading row stay HTML. Accept as best effort and report it |

| Stale kordoc cache | Use bunx kordoc@latest or configured pinned version |

| Cannot find module "turndown" from flatten-tables.ts | Run bun install in this skill's resources/ directory (its node_modules is gitignored and absent on fresh clones) |

Exit

Logical Operations

Canonical command path

  1. Confirm the input path exists and is readable, the extension is .hwp, .hwpx, or .hwpml, and bun is available (bun --version). Check the file size and detect the source format.
  2. Resolve the output path or directory, the default filename, and the requested format; the output location must be writable or creatable.
  3. Run kordoc with an explicit output target and the requested options:

```bash

bunx kordoc@latest "{input_path}" -o "{output_path}"

```

For batch conversion, use an explicit output directory:

```bash

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

```

  1. For Markdown output, flatten tables and strip PUA glyphs (see Transitions for the exception):

```bash

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

```

  1. Inspect the structure for headings, tables, lists, images, and footnotes.
  2. Report the output path, source format, and any conversion limitations.

Resource scope and effects

Reads the input HWP-family files and does not modify the source document. Creates Markdown or JSON output files next to the input or in the requested directory. Runs bunx kordoc and bun subprocesses. Post-processing may flatten merged-cell tables, trading cell fidelity for Markdown compatibility, and strips Private Use Area characters by default because they render as blanks without Hancom fonts.

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

| Format | Extension | Notes |

|--------|-----------|-------|

| HWP 5.x binary | .hwp | Full support (incl. DRM-locked via kordoc's rhwp-algorithm port) |

| HWPX | .hwpx | Full support incl. nested tables, merged cells |

| HWPML | .hwpml (or an XML-variant .hwp) | Auto-detected by signature |

Conversion-quality flags (--dedupe-headers, --keep-empty-cols, --inline-images) and the chunks format are documented in resources/execution-protocol.md.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.