docx-to-hlz

docx-to-hlz is a skill for Claude Code, Codex from lsj4232/KR_PATENT_SKILL. It costs 52 tokens per session (2,295 once invoked), scanned A, original, MIT.

A Python converter that turns a Korean patent specification in a Word .docx file into an .hlz file for Korea's patent-office editor. The output is a ZIP containing patent XML and drawing images.

In plain words
What is it for?
It is for converting supported Korean patent documents, including their named sections and drawings, into an editable KIPO application file.
Why use it?
It removes the manual reformatting needed to move a structured patent document into the editor's file format. Tables are not supported, and the user must open the result in the editor.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for converting supported Korean patent documents, including their named sections and drawings, into an editable KIPO application file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lsj4232/kr_patent_skill/docx-to-hlz
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 lsj4232/KR_PATENT_SKILL --skill docx-to-hlz
Clone the repo
git clone --depth 1 https://github.com/lsj4232/KR_PATENT_SKILL

Made for: Claude Code, Codex.

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 docx-to-hlz

README.md
[![agentmods](https://agentmods.dev/badge/skills/lsj4232/kr_patent_skill/docx-to-hlz/github.svg)](https://agentmods.dev/skills/lsj4232/kr_patent_skill/docx-to-hlz)
Your own site
<a href="https://agentmods.dev/skills/lsj4232/kr_patent_skill/docx-to-hlz"><img src="https://agentmods.dev/badge/skills/lsj4232/kr_patent_skill/docx-to-hlz/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 docx-to-hlz

Your own site · 80×15
<a href="https://agentmods.dev/skills/lsj4232/kr_patent_skill/docx-to-hlz"><img src="https://agentmods.dev/badge/skills/lsj4232/kr_patent_skill/docx-to-hlz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,295 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.
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.00052 $0.02295
Opus 5.5 $0.00021 $0.00918
Sonnet 5.5 $0.00010 $0.00459
Haiku 4.5 $0.00005 $0.00230

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

Security

Grade A, and why

docx-to-hlz 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 26d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/docx2hlz.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

docx-to-hlz/SKILL.md · 103 lines

How it starts

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

docx-to-hlz — 워드 명세서 → 특허청 편집기(.hlz) 변환

완성된 한국 특허 명세서 .docx를 특허청 전자출원 편집기가 여는 .hlz(ZIP: KIPO XML + 도면)로 변환한다.

사용법

python "<skill>/scripts/docx2hlz.py" "명세서.docx"          # → 같은 폴더에 명세서.hlz
python "<skill>/scripts/docx2hlz.py" "명세서.docx" -o out.hlz

의존성: python-docx, Pillow(png/tiff 재인코딩·크기추정용).

변환 후 사용자가 편집기에서 [파일 > 열기]로 .hlz 선택(또는 창에 드래그&드롭). 편집기 GUI 클릭은 자동화 불가이므로 여는 것은 사용자가 한다.

입력 워드 전제

  • KIPO 별지 서식 【식별항목】 태그로 섹션이 구분돼 있어야 한다(위 description의 12개 태그).
  • 래퍼 태그(【발명의 설명】【발명의 내용】【요약서】)는 자식만 쓰고 자신은 버린다.
  • 비표준 소제목(예 【1. 용어의 정의…】 탐색창용 챕터)은 본문 문단으로 흡수(대괄호 제거).
  • 표(table)는 미지원(현재 대상 명세서에 표가 없어 미구현) — 표 있는 건은 확장 필요.

산출 포맷 핵심 (application-body DTD)

<KIPO keapsVersion="5.6" editorKind="K" pageCount wi imgApply="N" xmlns="http://www.kipo.go.kr">
 <PatentCAFDOC docflag="1.0" documentID="숫자">
  <description>
   <invention-title>한글{ENGLISH}</invention-title>
   <technical-field><p num="0001">…</p></technical-field>
   <background-art>…</background-art>
   <summary-of-invention><tech-problem/><tech-solution/><advantageous-effects/></summary-of-invention>
   <description-of-drawings><p>도 1은…<br/>도 2는…</p></description-of-drawings>
   <description-of-embodiments><p num=…>…</p></description-of-embodiments>
  </description>
  <claims><claim num="1"><claim-text>…단계;<br/>…을 특징으로 하는 ….</claim-text></claim></claims>
  <abstract><summary><p num="0001a"/></summary><abstract-figure><figref num="3"/></abstract-figure></abstract>
  <drawings><figure num="1"><img id he wi file="pat00001.tif" img-format="tif"/></figure></drawings>
 </PatentCAFDOC>
</KIPO>

편집기 호환 하드 규칙 (스크립트가 자동 적용 — 하나라도 어기면 로딩 실패)

  1. ZIP 파일명 = CP949 + UTF-8 플래그(0x800) 제거. ★가장 잘 틀리는 부분★ Python 기본은 한글 파일명에 UTF-8 플래그를 세팅 → 구 MFC 편집기가 엔트리를 못 찾아 압축해제 자체가 실패(temp 폴더 빔) → "…SGM 을(를) 찾을 수 없습니다" 에러. ZipInfo._encodeFilenameFlags 오버라이드로 해결. 레퍼런스 hlz는 전 엔트리 flag=0x0000.
  2. 내부 XML basename == .hlz 파일 basename (편집기가 이름으로 문서파일 탐색).
  3. img-format ∈ {jpg, tif} (DTD: jpg|tif|st33|st35). tiff→tif(3글자), png/bmp/gif→jpg 재인코딩(투명→흰색).
  4. 청구항은 <claim-text> 한 덩어리 + <br/>. 【청구항 N】 뒤 작성자 메모 //…//는 제거.
  5. <p num> = description 전관통 4자리 일련번호. abstract만 별도 카운터 + 접미사 a.
  6. 대표도 = <abstract-figure><figref num>. 도면 = <drawings><figure num><img he wi file img-format>, he/wi=mm(EMU/36000, 최대 165×222mm·E-218).
  7. XML 특수문자 이스케이프, UTF-8. ZIP은 XML 먼저.

Read the full file on GitHub · 103 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 26d ago Changed · -16 lines · -508 tokens per session 7abf6860e455
  2. 2mo ago First seen · 119 lines · 560 tokens per session scan A 94d1a3ca8707

Subscribe to this mod's changes

docx-to-hlz is a skill published in the GitHub repository lsj4232/KR_PATENT_SKILL (70 stars, last pushed 11d ago), licensed MIT. It adds 52 tokens to every session and 2,295 once invoked, about $0.0002 per session on Opus 5.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-22.

Related

docx-to-hlz compared with skills from other repositories

docx-to-hlz next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docx-to-hlzlsj4232/KR_PATENT_SKILLSkill7011d agoMITA52Claude Code, Codex
law-to-markdownanbeime/skillSkill10kyesterdaynoneA86Codex
court-smsThomasMoreAI/legal-skills-openSkill1461mo agoApache-2.0A54Claude Code, Codex
recht-report-pdf-momarcode1ThomasMoreAI/legal-skills-openSkill1461mo agoApache-2.0A31Claude Code, Codex
chinese-copyright-applicationThomasMoreAI/legal-skills-openSkill1461mo agoApache-2.0A102Claude Code, Codex
waliduj-podpis-pdf-plmatematicsolutions/awesome-matematic-skills-plSkill911d agoMITA238Claude Code
chinese-copyright-application-okooo5kmThomasMoreAI/legal-skills-openSkill1461mo agoApache-2.0B179Claude Code, Codex