Communitygithub.com

yuyu04/hwpkit

Read, write & preview Korean HWP/HWPX (한글) from Claude, Gemini CLI, Codex, Cursor or the CLI — local MCP server, no upload. Powered by the rhwp WASM engine.

Was ist hwpkit?

hwpkit is a Claude Code agent skill that read, write & preview Korean HWP/HWPX (한글) from Claude, Gemini CLI, Codex, Cursor or the CLI — local MCP server, no upload. Powered by the rhwp WASM engine.

Funktioniert mitClaude CodeCodex CLICursorGemini CLI
npx skills add yuyu04/hwpkit

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Preview HWP / HWPX as images

Reading a .hwp gives you its text, but not its appearance. This skill renders pages to images using rhwp's own layout engine, so you can look at a Korean document — or verify a document you just generated — without Hancom Office.

How to use

node "${CLAUDE_PLUGIN_ROOT}/scripts/hwp-preview.mjs" "<file.hwp|.hwpx>" "<outdir>" --png

Then read the produced PNG files with the Read tool to actually look at them.

Options:

OptionMeaning
--pngAlso write PNG (needs Chrome/Chromium/Edge as a rasterizer). Without it, only SVG.
--scale <n>PNG pixel ratio, default 2. Use 1 for a quick look, 3 for detail.
--pages <spec>1-based pages, e.g. 1, 1,3, 2-4. Default: every page.

Output is named <stem>-<format>-p<N>.svg / .png, e.g. report-hwp-p1.png.

Typical uses

  • Verify generated output. After hwp-write.mjs, preview page 1 and check the heading hierarchy, table borders, and spacing before handing the file to the user.
  • Inspect a document the user sent when the question is visual ("표가 왜 깨졌지?") rather than textual.
  • Show the user what they'll get without asking them to open 한글.

Notes

  • If --png fails because no browser was found, set CHROME_PATH to a Chrome/Chromium/Edge binary — or drop --png and use the SVG, which needs nothing but Node.
  • This is rhwp's renderer, not Hancom's. Fonts and pagination are close but not identical, and fonts actually available on the machine are substituted. For final visual sign-off, the user should open the file in 한글.
  • Requires Node.js (available in the Cowork VM / Claude Code environment).

Verwandte Skills