ucsb-nlp-chang/federatedskill/hwpx-template-fill

Claude Code and agent skill by ucsb-nlp-chang/federatedskill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Fill templates in .hwpx (Hancom Office) documents by replacing {{...}} placeholders with values from JSON. Use when given an .hwpx template and a JSON mapping of field names to values. Handles ZIP extraction, XML text replacement, and layout cache invalidation.

Install

npx vskill@latest install ucsb-nlp-chang/federatedskill/hwpx-template-fill

SKILL.md

Fill HWPX Template

HWPX files are ZIP archives containing XML content. To fill placeholders safely:

Workflow

  1. Inspect structure: Use Python zipfile to list contents. Main text lives in Contents/section0.xml (or section*.xml).
  2. Identify placeholders: Look for {{key}} patterns inside <hp:t> tags.
  3. Replace & Invalidate Cache:
  • Replace {{key}} with values from JSON.
  • Critical: Remove <hp:linesegarray>...</hp:linesegarray> from any modified <hp:p> element. HWPX caches layout coordinates here; leaving them causes overlapping/garbled text when string lengths change.
  1. Repackage: Write modified XML back into a new ZIP with ZIP_DEFLATED compression, preserving original file metadata.
  2. Verify: Open the output ZIP, read the XML, and confirm zero {{...}} patterns remain.

Known invariants (by sub-task)

B1: HWPX Template Placeholder Fill
  • <hp:linesegarray> elements must be removed from any modified <hp:p> paragraphs. Failure causes overlapping/garbled characters. (R0: all workers discovered this independently.)

Anti-Patterns

  • Do not treat .hwpx as a plain text file. It is a binary ZIP archive.
  • Do not skip <hp:linesegarray> removal. Modified paragraphs will render incorrectly.
  • Do not rely on external HWP libraries unless necessary; standard zipfile + re is sufficient and more reliable in constrained environments.

Automation

Run scripts/fill_hwpx.py <template.hwpx> <data.json> <output.hwpx> to execute the full workflow. It handles paragraph tracking, cache invalidation, and verification automatically.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
7
Repository forks
2
7-day trend score
15

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ucsb-nlp-chang/federatedskill/hwpx-template-fill/badge)](https://verified-skill.com/skills/ucsb-nlp-chang/federatedskill/hwpx-template-fill)

Something wrong with this skill or its page? Tell us.