360 Secure SkillHub
360 安全技能中心

File Converter

该 Skill 提供文件格式转换能力,通过命令行调用脚本在 PDF、DOCX、Markdown、HTML、TXT 之间转换文档,在 PNG、JPG、WebP、GIF、SVG、HEIC 之间转换图片,并支持音频、视频格式互转、视频提取音频、图片缩放和批量转换,结果以 JSON 形式返回成功状态与文件大小。

jpengcheng523-netizen
jpengcheng523-netizen
热度 46.74
最近更新 2026-05-11 17:35:58
分类:效率依赖:代码执行 / 读写文件应用场景:文件转换 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add jpeng-file-converter
Metadata
name
jpeng-file-converter
description
File format conversion skill. Convert between PDF, DOCX, Markdown, HTML, images, audio, and video formats.
version
1.0.0
author
jpeng
tags
["file","convert","pdf","docx","markdown","image","audio","video"]

File Converter

Convert files between different formats.

When to Use

  • User wants to convert a file to another format
  • Convert documents (PDF, DOCX, Markdown)
  • Convert images (PNG, JPG, WebP, SVG)
  • Convert audio/video formats

Supported Conversions

Documents

  • PDF ↔ DOCX
  • Markdown ↔ HTML ↔ PDF
  • TXT ↔ DOCX

Images

  • PNG ↔ JPG ↔ WebP ↔ GIF
  • SVG → PNG/JPG
  • HEIC → JPG/PNG

Audio

  • MP3 ↔ WAV ↔ FLAC ↔ AAC
  • M4A ↔ MP3

Video

  • MP4 ↔ WebM ↔ AVI
  • Video → GIF

Usage

Convert document

python3 scripts/convert.py \
  --input ./document.docx \
  --output ./document.pdf

Convert image

python3 scripts/convert.py \
  --input ./image.png \
  --output ./image.jpg \
  --quality 90

Batch convert

python3 scripts/convert.py \
  --input-dir ./images/ \
  --output-dir ./converted/ \
  --from png \
  --to webp

Resize image

python3 scripts/convert.py \
  --input ./photo.jpg \
  --output ./thumbnail.jpg \
  --resize 800x600

Extract audio from video

python3 scripts/convert.py \
  --input ./video.mp4 \
  --output ./audio.mp3 \
  --extract-audio

Output

{
  "success": true,
  "input": "./document.docx",
  "output": "./document.pdf",
  "input_size_kb": 45,
  "output_size_kb": 52
}