360 Secure SkillHub
360 安全技能中心

File Converter

核心功能涵盖文档(PDF/DOCX等)、图片(PNG/JPG等)、音视频(MP3/MP4等)多格式互转,还支持批量转换、图片缩放、提取视频音频等操作。典型场景包括格式适配转换、批量文件处理、音频提取等。通过命令行输入文件/目录及参数执行,输出目标文件及含处理信息的JSON结果。

jpengcheng523-netizen
jpengcheng523-netizen
热度 46.68
最近更新 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
}