doc-hwp

doc-hwp is a skill for Claude Code from modu-ai/moai-cowork. It costs 266 tokens per session (3,239 once invoked), scanned A, original, Apache-2.0.

A document creator and converter for HWPX, the XML-based file format used by Hancom Office, the Korean word processor. It creates or converts official letters, drafts, approvals, reports, meeting notes, and proposals, and can extract text.

In plain words
What is it for?
Use it to create HWPX documents, convert HWP files, extract text, or fill Korean official-document templates while keeping their layout.
Why use it?
It helps produce Korean office documents in a format that opens in Hancom Office and preserves standard structures when filling templates or converting older HWP files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the moai-officer plugin — 13 skills, 2 agents shipped together

Good fit Use it to create HWPX documents, convert HWP files, extract text, or fill Korean official-document templates while keeping their layout.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-cowork/doc-hwp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add modu-ai/moai-cowork --skill doc-hwp
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-cowork

Made for: Claude Code.

Or install moai-officer, the plugin that ships this one along with the rest of its 13 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-hwp

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-cowork/doc-hwp/github.svg)](https://agentmods.dev/skills/modu-ai/moai-cowork/doc-hwp)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-cowork/doc-hwp"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-cowork/doc-hwp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc-hwp

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-cowork/doc-hwp"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-cowork/doc-hwp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 266 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00266 $0.03239
Opus 5 $0.00133 $0.01620
Sonnet 5 $0.00053 $0.00648
Haiku 4.5 $0.00027 $0.00324

Measured 7d ago against content hash a4fb5f8a3513, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

doc-hwp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/moai-officer/skills/doc-hwp/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

한글 문서 작성자 (HWPX Writer)

개요

HWPX 형식의 문서를 생성합니다. HWPX는 OWPML(Open Word Processor Markup Language) XML을 담은 ZIP이므로, python-hwpx 라이브러리가 있으면 그 API로(경로 A), 없으면 Python stdlib zipfile로 XML을 직접 조립해(경로 B) 만듭니다. 한컴오피스(Hwp)와 호환되는 공문서·기안서·보고서를 작성하고, 기존 HWP 파일을 HWPX로 변환하거나 텍스트를 추출할 수 있습니다.

트리거 키워드

한글, hwpx, 아래한글, 한컴, 공문서, 기안서, HWP 변환, 한글 문서 생성, HWPX 편집

워크플로우

1단계: 문서 요구사항 분석

사용자 요청 분석 후 작업 유형 결정:

  • 신규 HWPX 생성: 공문서, 기안서, 보고서, 회의록
  • HWP → HWPX 변환: 구버전 한글 파일 최신 포맷 변환
  • 텍스트 추출: 기존 HWPX에서 내용 추출
  • 양식 채우기: 템플릿 레이아웃 보존 후 내용만 수정

2단계: 서식 결정 + 생성 경로 결정

서식 결정 (공문·기안문·품의서 등 정형 문서일 때 필수): references/kr-official-forms.md를 로드해 두문·본문·결문 구조, 문서번호, 시행일자(YYYY. M. D.), 수신·경유, 항목 번호체계(1.→가.→1)→가)), 붙임 n부. 끝., 발신명의, 결재란·전결 표기를 서식대로 적용합니다. 구체 레이아웃(여백·폰트·플레이스홀더)은 references/templates/ 아래 템플릿(공문 gonmun·보고서 report·회의록 minutes·제안서 proposal, 공통 base)을 사용합니다.

생성 경로 결정 (두 경로 중 택1)

  • 경로 A — python-hwpx가 환경에 있으면 사용 (있으면 편리, 없으면 경로 B):
    python -c "import hwpx" 2>/dev/null && echo "python-hwpx 사용 가능" || echo "경로 B(직접 XML 조립) 사용"
    # 없고 설치 가능하면: pip install python-hwpx lxml  (HWP 바이너리 처리 시 olefile 추가)
    
  • 경로 B — 라이브러리 없이 ZIP+XML 직접 조립 (기본 경로): HWPX는 OWPML(XML) 파일들을 담은 ZIP이므로 Python stdlib zipfile만으로 조립할 수 있습니다. 3단계 인라인 코드를 그대로 실행합니다.

3단계: 문서 생성

경로 A (python-hwpx 있을 때):

from hwpx import HwpxDocument

hwp = HwpxDocument.new()
# 단락 추가·표 삽입·서식 적용은 python-hwpx API(add_paragraph, add_table 등)로 수행
hwp.save("output.hwpx")

경로 B (stdlib만, 기본 경로): HWPX = ZIP(mimetype + version.xml + Contents/content.hpf + Contents/section0.xml 등)을 zipfile로 직접 씁니다. 최소 골격:

import zipfile

# section0.xml — OWPML 본문(단락·표). 실제로는 <hp:p> 단락, <hp:tbl> 표를 필요한 만큼 채웁니다.
section = """<?xml version="1.0" encoding="UTF-8"?>
<hs:sec xmlns:hs="http://www.hancom.co.kr/hwpml/2011/section"
        xmlns:hp="http://www.hancom.co.kr/hwpml/2011/paragraph">
  <hp:p><hp:run><hp:t>여기에 본문 단락 텍스트</hp:t></hp:run></hp:p>
</hs:sec>"""

with zipfile.ZipFile("output.hwpx", "w", zipfile.ZIP_DEFLATED) as z:
    z.writestr("mimetype", "application/hwp+zip")           # 반드시 첫 엔트리
    z.writestr("version.xml", '<?xml version="1.0"?><hv:HCFVersion xmlns:hv="http://www.hancom.co.kr/hwpml/2011/version"/>')
    z.writestr("Contents/section0.xml", section)
    # 실제 배포용은 header.xml(글꼴·문단모양)·content.hpf(패키지 매니페스트)를 함께 채웁니다.

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 198 lines · 266 tokens per session scan A a4fb5f8a3513

Subscribe to this mod's changes

doc-hwp is a skill published in the GitHub repository modu-ai/moai-cowork (300 stars, last pushed 7d ago), licensed Apache-2.0. It adds 266 tokens to every session and 3,239 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.