Preface¶
Converting HTML to PDF typically involves installing wkhtmltopdf, writing Puppeteer scripts, or running a Chromium instance in CI. For developers already using Agents like Cursor or Claude Code, a more convenient path is: simply state “convert this HTML to PDF” in the conversation, and let a Skill take over the rendering and saving. This article introduces the community Skill “HTML to PDF” on SkillHub, which prioritizes using the system’s built-in browser in headless mode, avoids pulling in additional dedicated conversion dependencies, and supports Windows, macOS, and Linux.
What Is This¶
“HTML to PDF” is an Agent Skill from the SkillHub community source (community), with the coordinates @user_75818cbb/html-to-pdf-new, currently at version 1.0.0, categorized under office-efficiency, and published by user_75818cbb. The tags indicate requires_api_key=false, meaning no API Key configuration is needed after installation.
In one sentence: when a user wants to convert an HTML file to PDF, generate a PDF, or save as PDF, the Agent follows the Skill’s guidance to complete the conversion; implementation-wise, it prioritizes using the system’s built-in browser in headless mode, avoiding the need to install a separate toolchain just for conversion.
Official page: SkillHub - HTML to PDF. API endpoint: https://api.skillhub.cn/user_75818cbb/html-to-pdf-new.
Core Features¶
The following capabilities are drawn from the official description and the SkillHub page; implementation details that have not been independently verified are not elaborated:
- HTML → PDF: Outputs a PDF file from HTML located locally or in the Agent workspace.
- Trigger semantics: When the user expresses intents such as “HTML to PDF”, “generate PDF”, or “save as PDF”, the Agent should enable this Skill.
- Rendering method: Prioritizes the system’s built-in browser headless mode, with no need to install additional dependencies for the Skill (the specific browser command invoked is determined by the Skill’s internal instructions and the current OS).
- Platforms: Supports Windows, macOS, and Linux.
Installation and Activation¶
SkillHub recommends two methods: installing via CLI into the current Agent’s skills directory, or sending the installation prompt to the AI to execute according to the documentation.
Method 1: SkillHub CLI¶
First, check whether skillhub is installed (full steps in SkillHub Installation and Priority Source Configuration):
command -v skillhub && skillhub --version
If not installed, follow the official documentation to run the recommended one-click installation, or install only the CLI. When installing this Skill, you must use --dir to point to the skills directory recognized by the current Agent; otherwise, it will default to ./skills/, which may not be loaded:
skillhub install @user_75818cbb/html-to-pdf-new --dir <skills directory>
Skills paths for common clients (excerpted from the SkillHub installation documentation):
| Environment | skills directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
| Windsurf | ~/.codeium/windsurf/skills/ or .windsurf/skills/ |
After installation, refresh or restart the Agent according to your client’s requirements so the new Skill takes effect.
Method 2: Have the AI install based on official documentation¶
The prompt provided on the SkillHub page is:
Please install `@user_75818cbb/html-to-pdf-new` according to https://skillhub.cn/install/skillhub.md.
Send the above content to the Agent in the current session, and it will complete the CLI check, --dir installation, and directory verification according to skillhub.md. Differences among Codex CLI, Claude Code, and Cursor mainly lie in the skills directory path; the coordinates and --dir rules in the installation command remain consistent.
Typical Usage¶
The official documentation does not provide a fixed one-click shell command; usage is primarily natural language + HTML file path. After installing and enabling the Skill, you can specify the file and output intent in the conversation, for example:
Please use the HTML to PDF capability to export /path/to/report.html as report.pdf in the same directory.
Or:
Generate a PDF from index.html in this project and save it as dist/brochure.pdf.
After matching expressions such as “convert to PDF / generate PDF / save as PDF”, the Agent should read the Skill instructions, render the HTML with a headless browser, and write to the target path. Specific print options (page margins, whether to wait for network resources, etc.) are governed by SKILL.md inside the Skill package; this article does not speculate on unpublished parameter names.
Use Cases and Notes¶
Who it’s for
- Developers already using Agents to write documentation or report HTML, who want to produce PDFs directly in the same session without maintaining separate conversion scripts.
- Those whose machines already have a system browser, and who want to reduce dedicated dependencies like
npm install puppeteer(this is the Skill’s design orientation; if a page has extremely complex dependencies, results may still be affected by the browser and network environment).
Limitations and notes
- Community Skill: The source is community; behavior is determined by the Skill package contents and Agent execution; before upgrading, check on SkillHub whether the version is still 1.0.0.
- No API Key:
requires_api_key=false, no third-party cloud conversion service keys involved; conversion is completed locally/in the Agent environment. - Installation directory: Be sure to
--dirto the current client’s skills path; otherwise the Agent may not find the Skill. - Page complexity: For HTML that depends on external fonts, cross-origin resources, or asynchronous content that hasn’t finished loading, the PDF result depends on the headless browser’s actual loading outcome; for complex scenarios, it’s advisable to state in the conversation whether loading needs to be waited on or offline resources provided.
- SkillHub statistics (at time of capture): score 100000, 1708 downloads; the page shows 0 installations—this is only a store reference and does not indicate whether your machine has installed it.
Conclusion¶
“HTML to PDF” consolidates the “HTML to PDF” task into an office-oriented Skill recognized by Agents: no API Key, cross-platform across the three major desktop systems, and prioritizing the system browser’s headless mode. If you frequently deliver HTML in conversations and need PDF archiving, you can install @user_75818cbb/html-to-pdf-new as described above, and clearly specify the input HTML and output PDF path in your request.
- SkillHub page: https://www.skillhub.cn/skills/user_75818cbb/html-to-pdf-new
- Installation instructions: https://skillhub.cn/install/skillhub.md