hedgehog-finance/hogagent/doc-convert

Claude Code and agent skill by hedgehog-finance/hogagent

Trust tier 3
  • community
Source check pending

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-convert

SKILL.md

DocConvert — Multi-Format Document Conversion

Convert between Markdown, HTML, PDF, and DOCX.

Conversion Matrix

InputOutputScriptEngine
MarkdownPDFmd-to-pdf.mjsmd-to-pdf
HTMLPDFhtml-to-pdf.mjspuppeteer (ECharts-aware)
PDFMarkdownpdf-to-markdown.mjsunpdf (LLM-switchable)
DOCXHTMLdocx-to-html.mjsmammoth
HTMLMarkdownhtml-to-markdown.mjsturndown
DOCXMarkdowndocx-to-markdown.mjsmammoth→turndown (LLM-switchable)

Script Usage

md-to-pdf.mjs — Markdown to PDF
bash
node ./scripts/md-to-pdf.mjs <input.md> <output.pdf> [--css "custom.css"]
html-to-pdf.mjs — HTML to PDF
bash
node ./scripts/html-to-pdf.mjs <input.html> <output.pdf> [--timeout 15000]

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-sandbox fallback.
pdf-to-markdown.mjs — PDF to Markdown
bash
node ./scripts/pdf-to-markdown.mjs <input.pdf> <output.md>

Defaults to local unpdf; LLM path preferred when configured (higher fidelity: tables/layout/formulas).

docx-to-html.mjs — DOCX to HTML
bash
node ./scripts/docx-to-html.mjs <input.docx> <output.html>
html-to-markdown.mjs — HTML to Markdown
bash
node ./scripts/html-to-markdown.mjs <input.html> <output.md>
docx-to-markdown.mjs — DOCX to Markdown
bash
node ./scripts/docx-to-markdown.mjs <input.docx> <output.md>

Defaults to chain (DOCX→HTML→MD); LLM path preferred when configured.

Workflow

  1. Write input file to session task directory
  2. Run: node <this_skill_dir>/scripts/<script>.mjs <input_file> <output_file>
Resolve ./scripts/* to absolute paths from SKILL.md directory (see available_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

json
{
"doc-convert": {
"api-key": "your-api-key",
"endpoint": "https://your-provider/api/paas/v4/files/parser/sync",
"toolType": "prime-sync"
}
}
FieldRequiredDescription
api-keyYesFile parsing service API key
endpointYesParsing service endpoint URL (vendor-agnostic)
toolTypeNoParser 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_KEY
  • DOC_CONVERT_ENDPOINT
  • DOC_CONVERT_TOOL_TYPE
LLM path uses a generic file-parsing protocol; the endpoint URL determines the actual provider.

Conversion Quality

PathTablesLayoutUse Case
Local engineBasicBasicStandard documents, no external deps
LLM pathHigh-fidelityLayout-awareComplex tables, formulas, multi-column

Dependencies

Pre-installed in <hogagent_root>/node_modules/:

  • md-to-pdf, puppeteer — PDF generation through chrome-headless-shell (Puppeteer also powers ECharts-aware HTML→PDF)
  • mammoth — DOCX parsing
  • turndown, 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hedgehog-finance/hogagent/doc-convert/badge)](https://verified-skill.com/skills/hedgehog-finance/hogagent/doc-convert)

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