wps-batch-convert

wps-batch-convert is a skill for Claude Code from Bwkyd/wps-skills. It costs 95 tokens per session (1,578 once invoked), scanned A, original, MIT.

A batch document-conversion workflow for changing many files between formats such as Word, PDF, text, Excel, CSV, PowerPoint, and Markdown. It takes files from a folder and writes converted copies to a target folder.

In plain words
What is it for?
Use it for tasks such as converting Word files to PDF or text, exporting Excel files to CSV, converting CSV files to Excel, and turning Markdown or text files into Word documents.
Why use it?
It removes the need to open and convert documents one at a time when a folder contains many files.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for tasks such as converting Word files to PDF or text, exporting Excel files to CSV, converting CSV files to Excel, and turning Markdown or text files into Word documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bwkyd/wps-skills/wps-batch-convert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Bwkyd/wps-skills --skill wps-batch-convert
Clone the repo
git clone --depth 1 https://github.com/Bwkyd/wps-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wps-batch-convert

README.md
[![agentmods](https://agentmods.dev/badge/skills/bwkyd/wps-skills/wps-batch-convert/github.svg)](https://agentmods.dev/skills/bwkyd/wps-skills/wps-batch-convert)
Your own site
<a href="https://agentmods.dev/skills/bwkyd/wps-skills/wps-batch-convert"><img src="https://agentmods.dev/badge/skills/bwkyd/wps-skills/wps-batch-convert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wps-batch-convert

Your own site · 80×15
<a href="https://agentmods.dev/skills/bwkyd/wps-skills/wps-batch-convert"><img src="https://agentmods.dev/badge/skills/bwkyd/wps-skills/wps-batch-convert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.01578
Opus 5 $0.00048 $0.00789
Sonnet 5 $0.00019 $0.00316
Haiku 4.5 $0.00010 $0.00158

Measured 9d ago against content hash 5315b3755dd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

wps-batch-convert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/wps-batch-convert/SKILL.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

批量格式转换工具

一个文件夹 → 全部转换 → 输出到目标文件夹。

When to Use

  • 批量将Word转PDF
  • Excel批量导出CSV
  • Markdown转Word
  • 整个文件夹的格式转换
  • 用户说"批量转PDF""全部导出为CSV"

When NOT to Use

  • PDF内容提取 → 使用 wps-pdf-extract
  • PDF合并拆分 → 使用 wps-pdf-merge-split

支持的转换路径

源格式 目标格式 工具
.docx .pdf python-docx + reportlab 或 WPS CLI
.docx .txt python-docx
.xlsx .csv openpyxl
.csv .xlsx openpyxl
.pptx .pdf python-pptx + WPS CLI
.md .docx markdown + python-docx
.txt .docx python-docx

工作流程

Step 1: 确认转换需求

  • 源格式和目标格式
  • 文件列表或文件夹路径
  • 输出位置

Step 2: 批量转换

from docx import Document
from openpyxl import load_workbook
import csv
import os
import glob as glob_mod
import subprocess

class BatchConverter:
    """批量格式转换器"""

    @staticmethod
    def docx_to_txt(docx_path, output_path=None):
        """Word转纯文本"""
        doc = Document(docx_path)
        text = '\n'.join(para.text for para in doc.paragraphs)
        if not output_path:
            output_path = os.path.splitext(docx_path)[0] + '.txt'
        with open(output_path, 'w', encoding='utf-8') as f:
            f.write(text)
        return output_path

    @staticmethod
    def xlsx_to_csv(xlsx_path, output_path=None, sheet_name=None):
        """Excel转CSV"""
        wb = load_workbook(xlsx_path, read_only=True)
        ws = wb[sheet_name] if sheet_name else wb.active
        if not output_path:
            output_path = os.path.splitext(xlsx_path)[0] + '.csv'
        with open(output_path, 'w', newline='', encoding='utf-8-sig') as f:
            writer = csv.writer(f)
            for row in ws.iter_rows(values_only=True):
                writer.writerow(row)
        wb.close()
        return output_path

    @staticmethod
    def csv_to_xlsx(csv_path, output_path=None):
        """CSV转Excel"""
        from openpyxl import Workbook
        from openpyxl.styles import Font, PatternFill
        wb = Workbook()
        ws = wb.active
        with open(csv_path, 'r', encoding='utf-8-sig') as f:
            reader = csv.reader(f)
            for row_idx, row in enumerate(reader, 1):
                for col_idx, val in enumerate(row, 1):
                    ws.cell(row=row_idx, column=col_idx, value=val)
                if row_idx == 1:
                    for col_idx in range(1, len(row) + 1):
                        ws.cell(row=1, column=col_idx).font = Font(bold=True)
        if not output_path:
            output_path = os.path.splitext(csv_path)[0] + '.xlsx'
        wb.save(output_path)
        return output_path

    @staticmethod
    def md_to_docx(md_path, output_path=None):
        """Markdown转Word"""
        doc = Document()
        with open(md_path, 'r', encoding='utf-8') as f:
            for line in f:
                line = line.rstrip('\n')
                if line.startswith('# '):
                    doc.add_heading(line[2:], level=1)
                elif line.startswith('## '):
                    doc.add_heading(line[3:], level=2)
                elif line.startswith('### '):
                    doc.add_heading(line[4:], level=3)
                elif line.startswith('- '):
                    doc.add_paragraph(line[2:], style='List Bullet')
                elif line.strip():
                    doc.add_paragraph(line)
        if not output_path:
            output_path = os.path.splitext(md_path)[0] + '.docx'
        doc.save(output_path)
        return output_path

    @staticmethod
    def batch_convert(source_dir, source_ext, target_ext, output_dir=None):
        """批量转换文件夹"""
        if not output_dir:
            output_dir = os.path.join(source_dir, f'converted_{target_ext}')
        os.makedirs(output_dir, exist_ok=True)

        converter_map = {
            ('.docx', '.txt'): BatchConverter.docx_to_txt,
            ('.xlsx', '.csv'): BatchConverter.xlsx_to_csv,
            ('.csv', '.xlsx'): BatchConverter.csv_to_xlsx,
            ('.md', '.docx'): BatchConverter.md_to_docx,
        }

        func = converter_map.get((source_ext, target_ext))
        if not func:
            raise ValueError(f'不支持 {source_ext} → {target_ext} 转换')

        files = glob_mod.glob(os.path.join(source_dir, f'*{source_ext}'))
        results = []
        for f in files:
            basename = os.path.splitext(os.path.basename(f))[0]
            out = os.path.join(output_dir, f'{basename}{target_ext}')
            func(f, out)
            results.append(out)

        return results

Read the full file on GitHub · 193 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 193 lines · 95 tokens per session scan A 5315b3755dd7

Subscribe to this mod's changes

wps-batch-convert is a skill published in the GitHub repository Bwkyd/wps-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 95 tokens to every session and 1,578 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

note-organizer

Use this skill whenever the user wants to organize course materials, lecture notes, PPT/PDF/DOCX files, textbooks, personal notes, senior-student notes, historical exams, review questions, standards, manuals, or scattered study resources into a structured Markdown note library. Use it even when the user only says…

Renakoni/note-organizer · 228 tokens

tender-analysis

A workflow for reviewing tender documents, which are formal project requests that describe requirements and bidding rules. It extracts project details, technical and business conditions, deadlines, scoring rules, risks, and questions for clarification.

Amalia6767/curator-skills · 85 tokens

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…

lingxling/awesome-skills-cn · 92 tokens

pydicom

Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.

K-Dense-AI/scientific-agent-skills · 56 tokens

liteparse

Local document and PDF parsing that returns spatial text with bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; running OCR on scans; producing layout-preserved JSON for RAG; batch-ingesting folders of papers; or rendering pages to PNG for multimodal agents. Distinguishing capabilities…

K-Dense-AI/scientific-agent-skills · 86 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens