Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

convert

БесплатноБез исполняемых скриптовНе проверен

Convert a file from one format to another, routed by media category. Documents (PDF/HWP/HWPX/HWPML) extract to Markdown via oma-pdf/oma-hwp; images, video…

gracefullightот gracefullight★ 47 звёзд на GitHub

Об этом скилле

  • Response language: the user's prompt language first, then language in .agents/oma-config.yaml, then English.
  • Follow .agents/skills/_shared/core/execution-policy.md for authorization, clarification, verification, and completion. Execute required steps on the selected path in dependency order; apply documented branch and skip conditions.
  • Default output location: same directory as input file.
  • Route by category, then by extension — never run a document converter on a media file or vice versa.
  • Never re-encode losslessly-convertible data destructively without saying so — report quality/codec choices.

Vendor note: This workflow executes inline (no subagent spawning). It is a dispatcher over three engines: oma-pdf (PDF), oma-hwp (HWP family), and ffmpeg (image/video/audio transcode — already provisioned for oma-video). Read the matching SKILL.md when a document branch needs detail beyond the canonical command path below.


Step 1: Validate Input & Route

  1. Identify the input file path from the user's request.

  2. Confirm the file exists (ls -lh "{path}").

  3. Determine the target format:

    • User said it explicitly (--to webp, to png, jpg -> webp) → use it.
    • Not specified → use the category default (Document → Markdown; media → ask which target).
  4. Determine output location:

    • User specified a path → use it
    • Not specified → same directory as the input file
  5. Set output filename: {input_basename}.{target_ext}

  6. Route by category (extension, case-insensitive):

    Category Extensions Branch Engine
    Document .pdf Step 2A oma-pdf → uvx opendataloader-pdf
    Document .hwp, .hwpx, .hwpml Step 2B oma-hwp → bunx kordoc
    Image .jpg, .jpeg, .png, .webp, .avif, .gif, .tiff, .bmp, .heic Step 2C ffmpeg
    Video .mp4, .webm, .mov, .mkv, .avi, .gif Step 2D ffmpeg
    Audio .mp3, .wav, .m4a, .flac, .ogg, .opus, .aac Step 2E ffmpeg
    other — Stop — out of scope route to the matching skill

    .gif disambiguation (listed in both Image and Video): route by the target format — still-image target (png, webp, …) → Step 2C; video target (mp4, webm, …) or no target given → Step 2D (treat as animated GIF).

If user provided no file path, ask:

Which file should I convert? Provide the path, and the target format if it's an image/video/audio file.

For batch input (a glob or directory), apply the same category routing per file; mixed-type batches run each type through its own branch.


Step 2A: Document — PDF branch

uvx opendataloader-pdf "{input_path}" --format markdown --output-dir "{output_dir}"

Variants: --use-struct-tree (Tagged PDF), --image-output embedded (inline images), --format markdown,json (multiple formats), --table-method cluster (borderless tables), --pages "1-50" (large PDFs in ranges). Then go to Step 3 (document normalization).


Step 2B: Document — HWP branch

Always pin @latest to avoid stale bunx cache:

bunx kordoc@latest "{input_path}" -o "{output_path}"

Batch into a directory: bunx kordoc@latest "{input_pattern}" -d "{output_dir}".

First run on a fresh clone: run bun install in .agents/skills/oma-hwp/resources/ once (its node_modules is gitignored). Then go to Step 3 (document normalization).


Step 2C: Image → Image

Transcode with ffmpeg. The target codec is inferred from the output extension.

ffmpeg -i "{input_path}" "{output_path}"          # e.g. photo.jpg -> photo.png

Common targets:

ffmpeg -i in.jpg -quality 80 out.webp             # WebP (lossy, q 0-100)
ffmpeg -i in.jpg -lossless 1 out.webp             # WebP lossless
ffmpeg -i in.png out.avif                          # AVIF (needs libaom/libsvtav1 build)
ffmpeg -i in.png -vf "scale=800:-1" out.webp       # resize while converting

AVIF/HEIC support depends on the local ffmpeg build. If ffmpeg lacks the codec, report it and suggest sharp (already used by oma-slide) or ImageMagick as a fallback. Then go to Step 4.


Step 2D: Video → Video

ffmpeg -i "{input_path}" "{output_path}"          # container/codec from target ext

Common targets:

ffmpeg -i in.mov -c:v libx264 -crf 23 -c:a aac out.mp4        # MOV -> MP4 (H.264)
ffmpeg -i in.mp4 -c:v libvpx-vp9 -crf 32 -b:v 0 out.webm      # MP4 -> WebM (VP9)
ffmpeg -i in.mp4 -vf "fps=12,scale=480:-1" out.gif           # MP4 -> GIF

State the CRF/codec used in the report (quality is not lossless). Then go to Step 4.


Step 2E: Audio → Audio

ffmpeg -i "{input_path}" "{output_path}"          # codec from target ext

Common targets:

ffmpeg -i in.wav -b:a 192k out.mp3                 # WAV -> MP3
ffmpeg -i in.m4a ou
Полный SKILL.md на GitHub

Установить convert в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл convert?

Convert a file from one format to another, routed by media category. Documents (PDF/HWP/HWPX/HWPML) extract to Markdown via oma-pdf/oma-hwp; images, video, and audio transcode to a target format via ffmpeg.

Как установить скилл convert?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл convert запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить convert с