Tencent Cloud Real-time Document Extraction Agent: Structured Extraction from Images and PDFs Based on Custom Fields

Preface

Materials such as contracts, invoices, and reports are often circulated as scanned copies or PDFs. To write the key information from these into business systems, common approaches include fixed-template OCR or hand-written parsing rules: if the layout changes, the code must be modified, and maintenance costs rise significantly when tables and key-value pairs are mixed. If you want an Agent to initiate extraction within a conversation using “Field Name + Type + Prompt” and save the results as structured data, you need a set of invocation instructions aligned with Tencent Cloud’s ExtractDocAgent. Below is an introduction to the Tencent Cloud Real-time Document Extraction Agent on SkillHub (coordinate @tencent-adm/tencentcloud-ocr-extractdocagent), published by the Tencent Cloud OCR team. The current version is 1.0.3, the source is enterprise, and the category is office-efficiency.

What is this

This Skill is designed for invoking the Tencent Cloud Real-time Document Extraction Agent (ExtractDocAgent) API: use this skill when users need to extract structured information from images or PDFs based on custom field names. It encodes conventions such as “how to organize fields, how to distinguish between KV and tables, and how to write field prompts” into a SKILL document that Agents can follow, reducing the cost of consulting cloud API documentation from scratch every time.

SkillHub Page: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-ocr-extractdocagent
Skill API Endpoint: https://api.skillhub.cn/tencent-adm/tencentcloud-ocr-extractdocagent

Core Features

The following capabilities are derived from the official introduction. For specific parameters after installation, please refer to the SKILL.md within the skill package.

  1. Input Format: Supports both images and PDFs as extraction sources.
  2. Custom Fields: Allows defining field names based on business needs, rather than being bound to a single fixed template.
  3. Field Types: Supports KV pairs and Table fields, facilitating the simultaneous processing of “header information” and “detail rows.”
  4. Field Prompts: Allows attaching prompts to fields to constrain extraction semantics or disambiguate data.
  5. Scenario Coverage: Officially described as suitable for structured data extraction from documents such as contracts, invoices, and reports.

The skill tag indicates requires_api_key=true. Before use, you must prepare Tencent Cloud OCR-related API credentials and configure them in the Agent environment according to the skill instructions.

Installation and Activation

The installation method provided on the SkillHub page is: instruct the AI to install this coordinate skill based on the general installation documentation.

Please install `@tencent-adm/tencentcloud-ocr-extractdocagent` according to https://skillhub.cn/install/skillhub.md.

If the skillhub CLI is installed on your machine, you can install the skill to the current Agent’s skills directory according to Section 3 of the installation documentation (must use --dir, otherwise the default directory may not be recognized):

command -v skillhub && skillhub --version

If the CLI is not installed, the installation documentation provides a one-click script (full installation includes CLI and default Skills):

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

Example of installing a specific skill (replace <skills directory> with the current environment path):

skillhub install @tencent-adm/tencentcloud-ocr-extractdocagent --dir <skills directory>

Common paths listed in the installation documentation include:

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

Directories vary by client; after installation, refresh or restart the Agent according to the respective product instructions to enable the skill.

Typical Usage

The official SkillHub summary page does not expand on complete request examples. The typical workflow can be understood based on the skill’s positioning, and execution can be handed over to an Agent with this Skill enabled within a conversation:

  1. Provide the image or PDF to be extracted (local path or an address accessible to the Agent, subject to conventions within the skill).
  2. Specify the field list to be extracted: each field includes a name, type (KV or Table field), and field prompt if necessary.
  3. The Agent calls ExtractDocAgent according to SKILL.md, returning structured results (key-value and table partitions) to facilitate writing to databases or downstream forms.

For example, in an invoice scenario, you can define “Invoice Code” and “Invoice Date” as KV fields, define “Item Details” as a table field, and write a prompt for the “Tax Rate” field to avoid confusion with amounts. For specific field JSON structures and authentication headers, please refer to the skill documentation after installation and the Tencent Cloud OCR official API documentation.

Use Cases and Notes

Who is it for

  • Developers or business automation builders who need to perform non-fixed layout document extraction within Agent workflows.
  • Teams already using or planning to use Tencent Cloud OCR ExtractDocAgent who wish to solidify calling conventions into a reusable Skill.

Usage Notes

  • API Key: requires_api_key=true; real calls cannot be completed without configured credentials.
  • Source and Compliance: The skill source is enterprise, maintained by the Tencent Cloud OCR team; when involving document uploads and cloud-side processing, enterprise data and compliance requirements must be observed.
  • Version: The version currently displayed on SkillHub is 1.0.3; for upgrades, use skillhub to update via the same coordinate and check the changelog.
  • Community Data (SkillHub page, for selection reference): Rating 100000, Downloads 3252, Installs 249.

Conclusion

The Tencent Cloud Real-time Document Extraction Agent Skill encapsulates the “Custom Fields + KV/Table + Prompts” capabilities of ExtractDocAgent into call specifications that Agents can execute. It is suitable for structured extraction scenarios involving contracts, invoices, reports, and more. For installation and priority source configuration, see https://skillhub.cn/install/skillhub.md. For skill details, see https://www.skillhub.cn/skills/tencent-adm/tencentcloud-ocr-extractdocagent.

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

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

Xiaoye