hedgehog-finance/hogagent/doc-convert
Claude Code and agent skill by hedgehog-finance/hogagent
- community
Checking that the SKILL.md file is still in the repository.
Convert between document formats: Markdown/HTML to PDF, PDF to Markdown, DOCX to HTML/Markdown. Applicable: document conversion, format transformation, report export, content extraction. Triggers: convert document, PDF to markdown, docx to markdown, docx to html, html to markdown, markdown to pdf, html to pdf. Blocking: password-protected documents, scanned PDF OCR, interactive PDF forms.
Install
npx vskill@latest install hedgehog-finance/hogagent/doc-convertSKILL.md
DocConvert — Multi-Format Document Conversion
Convert between Markdown, HTML, PDF, and DOCX.
Conversion Matrix
| Input | Output | Script | Engine | |
|---|---|---|---|---|
| Markdown | md-to-pdf.mjs | md-to-pdf | ||
| HTML | html-to-pdf.mjs | puppeteer (ECharts-aware) | ||
| Markdown | pdf-to-markdown.mjs | unpdf (LLM-switchable) | ||
| DOCX | HTML | docx-to-html.mjs | mammoth | |
| HTML | Markdown | html-to-markdown.mjs | turndown | |
| DOCX | Markdown | docx-to-markdown.mjs | mammoth→turndown (LLM-switchable) |
Script Usage
md-to-pdf.mjs — Markdown to PDF
html-to-pdf.mjs — HTML to PDF
Renders HTML with Puppeteer's chrome-headless-shell. Auto-detects and waits for ECharts charts to finish rendering before PDF capture.
--timeout: max ms to wait for ECharts render (default 10000)- Chromium sandboxing remains enabled on Windows and non-root POSIX runs. Only a POSIX process already running as root receives Puppeteer's required
--no-sandboxfallback.
pdf-to-markdown.mjs — PDF to Markdown
Defaults to local unpdf; LLM path preferred when configured (higher fidelity: tables/layout/formulas).
docx-to-html.mjs — DOCX to HTML
html-to-markdown.mjs — HTML to Markdown
docx-to-markdown.mjs — DOCX to Markdown
Defaults to chain (DOCX→HTML→MD); LLM path preferred when configured.
Workflow
- Write input file to session task directory
- Run:
node <this_skill_dir>/scripts/<script>.mjs <input_file> <output_file>
Resolve./scripts/*to absolute paths from SKILL.md directory (seeavailable_skills).Use absolute paths for I/O; output written to session task directory.
LLM Parsing Config (Optional)
PDF→MD and DOCX→MD support an LLM parsing path for higher fidelity (tables, complex layouts, formulas). When unconfigured, the default local engine is used.
Config file: ~/.hogagent/skills_config.json
| Field | Required | Description | |
|---|---|---|---|
api-key | Yes | File parsing service API key | |
endpoint | Yes | Parsing service endpoint URL (vendor-agnostic) | |
toolType | No | Parser tool type, default prime-sync |
The managed HogAgent spelling is api-key; portable Skill installations may use the apiKey alias. The loader accepts both without changing precedence for the canonical field.
Environment variables (fallback when not set in config file):
DOC_CONVERT_API_KEYDOC_CONVERT_ENDPOINTDOC_CONVERT_TOOL_TYPE
LLM path uses a generic file-parsing protocol; the endpoint URL determines the actual provider.
Conversion Quality
| Path | Tables | Layout | Use Case | |
|---|---|---|---|---|
| Local engine | Basic | Basic | Standard documents, no external deps | |
| LLM path | High-fidelity | Layout-aware | Complex tables, formulas, multi-column |
Dependencies
Pre-installed in <hogagent_root>/node_modules/:
md-to-pdf,puppeteer— PDF generation throughchrome-headless-shell(Puppeteer also powers ECharts-aware HTML→PDF)mammoth— DOCX parsingturndown,turndown-plugin-gfm— HTML→MD (with GFM table support)unpdf— PDF→MD (based on pdf.js)
The official HogAgent package includes these dependencies. Before using a source checkout or an independently copied Skill, install its declared runtime dependencies with npm install --omit=dev --prefix '<skill_dir>'. A package.json declaration alone does not install the modules.
Execution safety
Document inputs are limited to 100 MiB, custom CSS to 5 MiB, embedded local images to 50 MiB, parser responses to 50 MiB, and generated PDFs to 250 MiB. Parser calls time out after 60 seconds, reject redirects, and require HTTPS except for loopback endpoints. Outputs use the documented extension and replace the target only after a complete temporary result passes validation.
Security
- Security scanPassed, 90 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 repositoryCheckingskills/doc-convert/SKILL.md
Popularity
- 7-day trend score
- 0
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/hedgehog-finance/hogagent/doc-convert)