Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计异常

hwpxhwpx 搜索

Agent Skill

hwpx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

404

周安装

17

GitHub Stars

1

下载量

141
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hwpx(hwpx 搜索)
来源仓库:https://github.com/iamseungpil/claude-for-dslab
仓库路径:skills/hwpx
安装命令:
npx skills add https://github.com/iamseungpil/claude-for-dslab --skill hwpx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/iamseungpil/claude-for-dslab --skill hwpx

简介

hwpx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于特定领域(如 dslab)中的信息调研、资源发现和线索整理场景。
  • 通过关键词和来源仓库筛选,Agent 可返回相关文档或代码片段供进一步分析。
  • 安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写操作。
  • hwpx 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

HWPX creation, editing, and analysis

Overview

A.hwpx file is a ZIP archive containing XML files, based on the OWPML (Open Word-Processor Markup Language) standard (KS X 6101).

Quick Reference

TaskApproach
Read/analyze contenthwpxjs or unpack for raw XML
Create new documentUse hwpxjs - see Creating New Documents below
Edit existing documentUnpack → edit XML → repack - see Editing Existing Documents below
Insert imagesUse lxml with complete hp:pic structure - see references/image-insertion.md

Converting.hwp to.hwpx

Legacy .hwp files must be converted before editing:

# Using hwpxjs CLI (pure TypeScript, no external dependencies)
npx hwpxjs convert:hwp document.hwp output.hwpx

# Or using LibreOffice as fallback
python scripts/office/soffice.py --headless --convert-to hwpx document.hwp

Reading Content

# Text extraction via CLI
npx hwpxjs txt document.hwpx

# HTML conversion (includes images/styles)
npx hwpxjs html document.hwpx > output.html

# Raw XML access
python scripts/unpack.py document.hwpx unpacked/

Converting to Images

python scripts/office/soffice.py --headless --convert-to pdf document.hwpx
pdftoppm -jpeg -r 150 document.pdf page

Creating New Documents

Generate.hwpx files with JavaScript. Install: npm install @ssabrojs/hwpxjs

Setup

const { HwpxWriter, HwpxReader } = require("@ssabrojs/hwpxjs");
const fs = require("fs");

// Create document from plain text
const writer = new HwpxWriter();
const content = `문서 제목

첫 번째 문단입니다.
두 번째 문단입니다.`;

const buffer = await writer.createFromPlainText(content);
fs.writeFileSync("output.hwpx", buffer);

Reading Documents

const { HwpxReader } = require("@ssabrojs/hwpxjs");
const fs = require("fs");

const reader = new HwpxReader();
const fileBuffer = fs.readFileSync("document.hwpx");
await reader.loadFromArrayBuffer(fileBuffer.buffer);

// Extract text
const text = await reader.extractText();
console.log(text);

// Get document info
const info = await reader.getDocumentInfo();
console.log(info);

// List images
const images = await reader.listImages();
console.log(images);
// [{ binPath: "BinData/0.jpg", width: 200, height: 150, format: "jpg" }]

HTML Conversion

// Basic HTML conversion
const html = await reader.extractHtml();

// With all options
const fullHtml = await reader.extractHtml({
  paragraphTag: "p",
  tableClassName: "hwpx-table",
  renderImages: true,       // Include images
  renderTables: true,       // Include tables
  renderStyles: true,       // Apply styles (bold, italic, color)
  embedImages: true,        // Base64 embed images
  tableHeaderFirstRow: true // First row as <th>
});

HWP to HWPX Conversion

const { HwpConverter } = require("@ssabrojs/hwpxjs");

const converter = new HwpConverter({ verbose: true });

// Check availability
if (converter.isAvailable()) {
  // Convert HWP to HWPX
  const result = await converter.convertHwpToHwpx("input.hwp", "output.hwpx");
  if (result.success) {
    console.log(`Converted: ${result.processingTime}ms`);
  }

  // Or extract text only
  const text = await converter.convertHwpToText("input.hwp");
}

Template Processing

// hwpxjs supports {{key}} template replacement
const reader = new HwpxReader();
await reader.loadFromArrayBuffer(templateBuffer);

// Apply template replacements
const html = await reader.extractHtml();
const result = html
  .replace(/\{\{name\}\}/g, "홍길동")
  .replace(/\{\{date\}\}/g, "2025-01-01");

Critical Rules for hwpxjs

  • createFromPlainText returns Buffer - save with fs.writeFileSync(path, buffer)
  • loadFromArrayBuffer for reading - pass fileBuffer.buffer not fileBuffer
  • Text-only creation - for tables/images, use XML editing approach below
  • HwpConverter for HWP files - pure TypeScript, no LibreOffice needed
  • extractHtml for rich content - includes styles, tables, images

Editing Existing Documents

Follow all 3 steps in order.

Step 1: Unpack

python scripts/unpack.py document.hwpx unpacked/

Step 2: Edit XML

Edit files in unpacked/Contents/. See XML Reference below for patterns.

Use the Edit tool directly for string replacement. Do not write Python scripts. Scripts introduce unnecessary complexity. The Edit tool shows exactly what is being replaced.

CRITICAL: Remove <hp:linesegarray> when modifying text. This element contains cached layout data. Leaving stale linesegarray causes character overlap:

<!-- BEFORE: paragraph with stale layout cache -->
<hp:p id="0" paraPrIDRef="0" styleIDRef="0">
  <hp:run charPrIDRef="19">
    <hp:t>Original text</hp:t>
  </hp:run>
  <hp:linesegarray>
    <hp:lineseg textpos="0" vertpos="0" vertsize="1000" horzsize="5000" .../>
  </hp:linesegarray>
</hp:p>

<!-- AFTER: remove linesegarray entirely -->
<hp:p id="0" paraPrIDRef="0" styleIDRef="0">
  <hp:run charPrIDRef="19">
    <hp:t>New longer text that exceeds original width</hp:t>
  </hp:run>
</hp:p>

Note: Multiple <hp:run> elements share one <hp:linesegarray>. Remove it when editing ANY run in the paragraph.

Step 3: Pack

python scripts/pack.py unpacked/ output.hwpx

Common Pitfalls

  • Character overlap after edit: Remove <hp:linesegarray> from the edited <hp:p>. Multiple <hp:run> elements share one linesegarray—remove it when editing ANY run.
  • Wrong table cell modified: Include <hp:cellAddr> in search pattern. CRITICAL: <hp:cellAddr> appears AFTER cell content, not before. Use grep -B20 'colAddr="2" rowAddr="0"' section0.xml.
  • Preserve charPrIDRef: Don't change charPrIDRef when editing text—it references font/size/style in header.xml.
  • File corruption from string replacement: Use lxml for structural changes (inserting elements). String replacement breaks XML parent-child relationships.
  • Page overflow from text replacement: Replacing blanks/spaces with text can cause content overflow and page breaks. Solutions: (1) Keep replacement text similar in length to original spaces, (2) Preserve charPrIDRef for underlined fields to maintain underline style, (3) Reduce unnecessary whitespace proportionally, (4) Cell/margin adjustments may be needed.
  • Image size too large (e.g., 635mm): HWP unit calculation error. 1 HWP unit = 1/7200 inch, so 1mm ≈ 283.5 HWP units.

- ❌ Wrong: width="180000" → 635mm (too large!) - ✅ Correct: width="3400" → ~12mm (signature size) - Formula: mm × (7200 ÷ 25.4) = HWP units


XML Reference

Key Elements

ElementPurpose
<hp:p>Paragraph
<hp:run>Text run with formatting
<hp:t>Text content
<hp:tbl>Table
<hp:tc>Table cell
<hp:cellAddr>Cell position (AFTER content)
<hp:pic>Image
<hp:linesegarray>Layout cache (remove when editing)

Paragraph Structure

<hp:p id="0" paraPrIDRef="0" styleIDRef="0" pageBreak="0">
  <hp:run charPrIDRef="0">
    <hp:t>Text content</hp:t>
  </hp:run>
  <hp:linesegarray>  <!-- Remove this when editing text -->
    <hp:lineseg textpos="0" vertpos="0" vertsize="1000" .../>
  </hp:linesegarray>
</hp:p>

Table Cell Structure

<hp:tc borderFillIDRef="5">
  <hp:subList textDirection="HORIZONTAL" vertAlign="CENTER">
    <hp:p paraPrIDRef="20">
      <hp:run charPrIDRef="19">
        <hp:t>Cell content</hp:t>
      </hp:run>
    </hp:p>
  </hp:subList>
  <hp:cellAddr colAddr="0" rowAddr="0"/>  <!-- Position identifier -->
  <hp:cellSpan colSpan="1" rowSpan="1"/>
  <hp:cellSz width="5136" height="4179"/>
</hp:tc>

Images

⚠️ CRITICAL: Image insertion requires ALL 15 child elements in hp:pic. Missing elements cause crashes!

See references/image-insertion.md for the complete required structure.

Quick checklist for image insertion:

  1. Copy image file to BinData/
  2. Add to manifest Contents/content.hpf:
<opf:item id="image1" href="BinData/image1.png" media-type="image/png" isEmbeded="1"/>
  1. Insert complete <hp:pic> with ALL 15 elements (use lxml, not string replacement)

Minimum required hp:pic elements (in order):

  1. hp:offset 2. hp:orgSz 3. hp:curSz 4. hp:flip 5. hp:rotationInfo
  2. hp:renderingInfo 7. hc:img 8. hp:imgRect 9. hp:imgClip ⚠️
  3. hp:inMargin 11. hp:imgDim ⚠️ 12. hp:effects ⚠️
  4. hp:sz 14. hp:pos 15. hp:outMargin

Size units: HWP uses 1/7200 inch units. 1mm ≈ 283.5 units (7200 ÷ 25.4)

Page Break

<hp:p pageBreak="1" ...>  <!-- pageBreak="1" inserts break before paragraph -->

Differences from DOCX

AspectHWPXDOCX
Text element<hp:t><w:t>
Paragraph<hp:p><w:p>
Run<hp:run><w:r>
Layout cache<hp:linesegarray>None
Content locationContents/section*.xmlword/document.xml
Cell identifier<hp:cellAddr> after contentimplicit order

Key difference: HWPX stores layout cache in linesegarray; DOCX doesn't. This is why editing HWPX requires removing linesegarray.

For detailed XML structures (headers/footers, lists/numbering, paragraph formatting), see references/xml-reference.md.


Dependencies

npm install @ssabrojs/hwpxjs
  • hwpxjs: npm install @ssabrojs/hwpxjs - reading, writing, HTML conversion, HWP→HWPX conversion
  • pyhwp2md: Converting HWP/HWPX to Markdown (alternative)
  • LibreOffice: PDF conversion (auto-configured via scripts/office/soffice.py)
  • Poppler: pdftoppm for PDF to images

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.64%
按下载量换算52

Claude

28.15%
按下载量换算40

Cursor

20.95%
按下载量换算30

Gemini CLI

8.63%
按下载量换算12

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills