tomark-skill: Batch convert Word/WPS documents to Markdown

Preface

When migrating historical documents into knowledge bases, preparing corpora for RAG, or letting Agents read raw text directly, .doc, .wps, and complexly formatted .docx files often pose formatting challenges. Relying solely on pandoc or manual copying often leads to common pitfalls like Chinese character garbling (mojibake) and WPS proprietary formatting issues. This article introduces the SkillHub community skill tomark-skill: a tool that performs batch Markdown output via a fixed pipeline on the Agent side, with specialized handling for Chinese and WPS scenarios.

What is this

tomark-skill (Coordinate: @user_f474679a/tomark-skill) is a community Skill published by user_f474679a on SkillHub. It is categorized under office-efficiency, with the current version 1.0.0. The tag requires_api_key=false indicates that it does not depend on external API keys.

In one sentence: It batch converts .doc, .docx, and .wps files to Markdown. The conversion paths provided in the official description are:

  • .docx → mammoth
  • .doc / .wps → WPS COM → .docx → mammoth

The feature description highlights efforts to resolve Chinese character garbling and support for WPS proprietary formats.

Core Features

Based on the SkillHub page and skill description, the verifiable capabilities are as follows:

  1. Batch Conversion: Designed for multi-file scenarios rather than single-file demonstrations.
  2. Multi-extension Support: Supports .doc, .docx, and .wps inputs.
  3. Path-based Processing: Office-based docx files go through mammoth; legacy .doc and WPS formats are first converted to docx via WPS COM before going through mammoth.
  4. Chinese & WPS: Targeted design for encoding issues and WPS formats (specific implementation depends on the SKILL instructions within the skill package).

Installation and Activation

The installation process follows the general SkillHub instructions (skillhub.md). The installation prompt provided on the official page is to install @user_f474679a/tomark-skill according to that document.

1. Check or Install skillhub CLI

First, confirm if the CLI is already on your machine:

command -v skillhub && skillhub --version

If not installed, you can use the official script (full installation includes default Skills; add --cli-only if only the CLI is needed):

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

2. Install tomark-skill to the current Agent’s skills directory

When installing the skill, you must use --dir to point to the skills directory recognized by your current client; otherwise, it defaults to ./skills/, which the Agent might not be able to read.

skillhub install @user_f474679a/tomark-skill --dir <your skills directory>

Common path examples (from SkillHub installation docs):

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

You can also provide the official installation instructions to the AI in the conversation and let it complete the installation according to skillhub.md. If the client requires a restart or skills reload after installation, follow the respective product instructions.

Typical Usage

The public description does not include a standalone list of CLI subcommands; usage primarily involves “enabling the Skill and letting the Agent execute batch conversion according to the skill instructions.” Reproducible intent examples:

  1. Specify a directory and request converting all .doc, .docx, and .wps files within it to Markdown.
  2. Describe the output directory or naming rules, letting the Agent process files one by one following the tomark-skill pipeline (docx→mammoth; doc/wps→WPS COM→docx→mammoth).
  3. For WPS or legacy .doc samples that have previously exhibited garbling, perform a small batch trial conversion first to confirm the body text and heading hierarchy before scaling up.

Specific parameters and script entry points should be based on the locally installed SKILL.md and files within the skill package.

Use Cases and Notes

Who is it for

  • Developers or documentation maintainers needing to sediment existing Word / WPS documents into Markdown.
  • Scenarios where knowledge bases, note repositories, or static site source files are primarily .md, but the source material remains Office / WPS.
  • Environments based on Linux or automation where batch conversion is driven by an Agent rather than manual clicking and exporting.

Limitations and Notes

  • The .doc / .wps path depends on WPS COM, which generally implies the runtime environment must have WPS and available COM automation capabilities; on pure Linux systems without WPS, this path may not work as designed, and you must verify the environment yourself.
  • mammoth excels at extracting structure and body text from docx, but complex layouts, text boxes, and some embedded objects may differ from what is seen in Word; manual spot checks after conversion are recommended.
  • Community source (source: community); upgrades and issue reporting depend on the publisher and the SkillHub ecosystem. It is recommended to pin versions and retain samples for regression testing in production environments.

Conclusion

tomark-skill integrates “direct docx conversion” and “convert via WPS” into a single Skill, aiming for the batch production of Markdown from Chinese and WPS documents. It requires no API key and can be used immediately after installation via SkillHub into the skills directories of clients like Cursor, Claude Code, and Codex.

  • SkillHub Page: https://www.skillhub.cn/skills/user_f474679a/tomark-skill
  • API Coordinate Page: https://api.skillhub.cn/user_f474679a/tomark-skill
  • Installation Instructions: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

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

Xiaoye