File Format Conversion Assistant
Paste the following prompt into your AI chat to install this skill:
Please install @user_f88d4da5/file-format-exchange according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem Context
When office files move between TXT, DOCX, PDF, XLSX, HTML, CSV, and Markdown, manual copy-and-paste can drop tables, heading levels, and list structure. Batch work also becomes tedious when each file must be opened, saved, and checked separately. This skill turns common format exchange into a reusable workflow, useful for engineers who want to embed file conversion in automation instead of relying on scattered utilities.
How It Works
The skill is built on Python 3.8+ with a layered architecture that separates format I/O, conversion mapping, and presentation. Its core path follows references/file_adapter.py and references/converter.py: confirm the source file and target format, validate the conversion path against the supported mapping, then call the appropriate libraries to read and write the result. It supports single-file conversion, batch conversion, two-way DOCX and Markdown exchange, and Chinese font and size control when outputting DOCX. In batch mode, one failing file does not block the others, and results can be reviewed by success or failure status.
Scope and Cautions
It is better suited to structured conversion among text, documents, spreadsheets, HTML, and Markdown than to images, scanned PDFs, or complex layout restoration. Chinese output for PDFs depends on an available system Chinese font; without one, the result may fall back to a Western font. Large files can take longer to convert, so splitting work into batches is safer. For headless runs, prefer the programming interface or command-line batch script; use the desktop GUI when manual font, size, and output directory selection is needed.
Use Cases
- Convert a batch of `DOCX` requirement documents to `Markdown`, preserving headings, lists, and tables for a repository or knowledge base.
- Convert customer-provided `XLSX` spreadsheets to `CSV` for downstream data cleaning, import, or automation.
- Convert `PDF` reports to `DOCX` with specified Chinese fonts and sizes for layout review or further editing.
- Use a Python API in a pipeline to convert `HTML` content to `Markdown`, avoiding structure loss from manual copying.
Best For
- Product engineers who convert multiple `DOCX` requirement documents to `Markdown` and archive them in a code repository.
- Data engineers who convert customer `XLSX` spreadsheets to `CSV` for cleaning and automated ingestion.
- Operations or content editors who need to convert `PDF` reports into editable `DOCX` with controlled Chinese fonts.
- Development engineers who embed file conversion into Python pipelines instead of manual saving.
Related Skills
Organizes files by extension into subfolders like Documents, Code, and Archives, then outputs a report.
Extract tables, formulas, charts, and layout from invoices, reports, papers, and multi-column documents.
Generates a multi-sheet Excel report containing only structured data tables from byteplan-analysis results.
Automatically sort directory files into type-based folders, with dry-run preview, reports, and JSON custom rules.