ucsb-nlp-chang/federatedskill/hwpx-template-fill
Claude Code and agent skill by ucsb-nlp-chang/federatedskill
- community
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-fillSKILL.md
Fill HWPX Template
HWPX files are ZIP archives containing XML content. To fill placeholders safely:
Workflow
- Inspect structure: Use Python
zipfileto list contents. Main text lives inContents/section0.xml(orsection*.xml). - Identify placeholders: Look for
{{key}}patterns inside<hp:t>tags. - 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.
- Repackage: Write modified XML back into a new ZIP with
ZIP_DEFLATEDcompression, preserving original file metadata. - 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
.hwpxas 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+reis 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
- SKILL.md in the repositoryCheckingpaper_logs/4_fed_hetero_mixed_cli/qwen3.6-plus/HWPX-Document-Automation/round_001/.snapshots/u0/hwpx-template-fill/SKILL.md
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
[](https://verified-skill.com/skills/ucsb-nlp-chang/federatedskill/hwpx-template-fill)