Duhui Document Conversion - Document to PDF: Asynchronously Convert Local Documents to PDF within an Agent

Foreword

In automated workflows or conversational development, it is often necessary to consolidate local Word documents, spreadsheets, images, or web snapshots into PDFs for archiving, review submission, or database ingestion. Installing LibreOffice locally and writing scripts to invoke various format converters results in high maintenance costs, and handling multiple formats can easily lead to errors. If you are already using a document-to-PDF service like “Duhui Document Conversion” (度慧文档转换) in the Alibaba Cloud Marketplace, you would prefer the Agent to directly utilize that same set of asynchronous APIs when identifying relevant intents, rather than manually writing invocation steps every time.

The following is an introduction to the community Skill on SkillHub: “Duhui Document Conversion - Document to PDF” (ID @user_d9c601a2/duhui-all-to-pdf, version 1.0.0). It embeds trigger conditions and conversion capabilities into SKILL.md, making it loadable for clients that support Skills, such as Cursor, Claude Code, and Codex.

What is This

“Duhui Document Conversion - Document to PDF” is an office efficiency Skill from the SkillHub community (community), published by user_d9c601a2 and categorized under office-efficiency.

One-sentence positioning: When there is a need to convert a single local file to PDF via an asynchronous API using Duhui Document Conversion from the Alibaba Cloud Marketplace, the Agent triggers and completes the invocation according to the Skill instructions.

It solves the problem of “mentioning document-to-PDF conversion in a conversation, but the Agent not knowing which API to use, which formats are supported, or when to use an asynchronous task.” The Skill body clearly defines trigger words and applicable boundaries to reduce misjudgments and repetitive explanations.

Core Features

The following capabilities are derived from the SkillHub page and captured metadata; parts not explicitly covered are not fabricated here.

  1. Single File to PDF
    Targets conversion requests for a single local document, not batch directory scanning (batch processing requires looping at the business layer, and service quotas should be considered).

  2. Multiple Input Formats
    The official description covers scenarios converting “any file” including Office/WPS, OFD, images, text, and web pages to PDF; specific support depends on the current formats supported by the Duhui Document Conversion service.

  3. Asynchronous API Flow
    Conversion is completed via an asynchronous API, suitable for files with large volumes or long processing times; the Agent should submit the task and poll or wait for the result according to the guidelines in the Skill (specific steps are subject to the installed SKILL.md).

  4. Intent Triggering
    This Skill should be triggered when the user mentions “Duhui”, “document to PDF”, “doc to pdf”, “document conversion”, “format conversion”, “document format conversion”, “PDF conversion”, or explicitly needs to convert a local file to PDF via an asynchronous API.

  5. Requires API Key
    The tag requires_api_key=true indicates that Duhui/Alibaba Cloud Marketplace related API credentials need to be configured before use; if environment variable names are not listed on the public page, refer to the documentation within the Skill package.

SkillHub Statistics (at time of capture): Rating 100000, Downloads 2210, Installs 181.

Installation and Activation

Before installation, ensure the skillhub CLI is available on your machine; if not, please install it according to the official SkillHub installation instructions first.

command -v skillhub && skillhub --version

If not installed, you can execute (full installation, including default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

To install only the CLI:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

When installing this Skill, you must use --dir to point to the current Agent’s skills directory; otherwise, defaulting to ./skills/ might not be recognized by the client. The package name provided on the official page is @user_d9c601a2/duhui-all-to-pdf.

Taking Cursor as an example, the skills directory is generally ~/.cursor/skills/:

skillhub install @user_d9c601a2/duhui-all-to-pdf --dir ~/.cursor/skills/

Other common client paths (from SkillHub installation docs, choose one based on your actual client):

  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, configure the API Key according to the instructions in the Skill package, and restart or reload the Agent’s Skills directory so that SKILL.md takes effect.

Typical Usage

The public page does not provide independent script examples. The typical usage is conversational triggering + the Agent invoking the Duhui asynchronous interface according to the Skill. A reproducible interaction method is as follows:

  1. Activate and obtain the necessary API credentials for “Duhui Document Conversion” on the Alibaba Cloud Marketplace, and write them into the configuration as required by the Skill (field names are subject to the SKILL.md inside the package).
  2. Place the file to be converted in a path accessible by the local Agent.
  3. Clarify the intent and file in the conversation, for example: “Use Duhui to convert /path/to/report.docx to PDF” or “Convert document to PDF, the file is contract.ofd on the desktop”.
  4. After the Agent hits the Skill, it should follow the asynchronous API flow: submit the conversion task, and return the PDF path or download result to you after completion.

Trigger words are consistent with the official introduction for easy retrieval: 度慧, 文档转PDF, doc to pdf, 文档转换, 格式转换, 文档格式转换, PDF转换.

Applicable Scenarios and Notes

Who it is for

  • Teams already using or planning to use Duhui Document Conversion from the Alibaba Cloud Marketplace, hoping for Coding Agents to uniformly utilize the same PDF conversion capability.
  • Developers who occasionally need to convert local Office/WPS, OFD, image, text, or web files to PDF via conversation, but do not want to check API documentation every time.

Limitations and Notes

  • Single File: The Skill is positioned for a single local document; multiple files require multiple calls or custom batch processing, and attention should be paid to API rate limits and costs.
  • API Key: requires_api_key=true; the Agent cannot complete the actual invocation without configured credentials.
  • Network and Compliance: The invocation uses a cloud asynchronous service, meaning files will be uploaded to the service provider; sensitive documents must go through enterprise security and compliance processes first.
  • Source and Version: Community Skill, version 1.0.0; behavior is subject to the SKILL.md in the installation package and the official Duhui API documentation. Pay attention to changelogs before upgrading.

Conclusion

“Duhui Document Conversion - Document to PDF” embeds “when to use Duhui, what to convert, and how to use the asynchronous API” into an Agent Skill, suitable for transforming document-to-PDF conversion from a one-off script into a repeatable conversational capability. For installation and priority source configuration, please refer to the SkillHub Installation Instructions; for Skill details and installation entry, see the SkillHub Page and API Address.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye