본문으로 건너뛰기
cccskills
무료GitHub에 공개

converting-files

Convert a file from one format to another inside the container — documents, images, audio, video. Routes to the right engine (pandoc, LibreOffice, ImageMagick, ffmpeg) by format pair. Triggers on "convert X to Y", "turn this docx into a pdf", "make a gif from this mp4", "md to docx", "batch-convert these images", or any single-file or batch format change where the source and target extensions differ. NOT for editing content (use docx/pptx/xlsx/pdf skills), creating files from scratch, or reading a file you already have in context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구JiraWord
설치 방법 보기

포함된 파일(4)

  • SKILL.md6.5 KB
  • CHANGELOG.md1.8 KB
  • README.md1.5 KB
  • scripts/convert.py6.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

converting-files

Four conversion engines are already in this container — pandoc, libreoffice (headless), ImageMagick's convert, and ffmpeg. The hard part isn't running them; it's picking the right one. pandoc mangles a real .docx into PDF; LibreOffice is the tool for that. pandoc is better than LibreOffice for md → docx. Neither touches mp4 → gif. This skill encodes that routing so the choice isn't re-derived (often wrongly) each time.

scripts/convert.py is a dispatcher over those four binaries, not a new engine. Use it for the common cases; drop to the raw engine when you need flags it doesn't pass through.

Is this the right skill?

You want to…Use instead
Change a file's format (ext A → ext B)this skill
Edit/author a Word/PPT/Excel/PDF's contentdocx / pptx / xlsx / pdf skills
Read a file already shown in contextjust read it — no conversion
Extract text/tables from a PDFpdf-reading skill
Fill or merge PDFspdf skill

Format change = here. Content change = a content skill. A docx → pdf is a format change; "fix the grammar in this docx" is not.

Engine routing (the actual content of this skill)

Source family → target family decides the engine. The dispatcher applies this; the table is here so the reasoning is auditable and so you can call the engine directly when needed.

From → ToEngineWhy
markup → markup (md, html, rst, latex, org, epub, rtf, ipynb…)pandocwhat it's built for
markup → Office (md → docx/pptx/odt)pandoccleaner than LibreOffice from markup
Office → markup (docx/odt/pptx → md/html…)pandocreads modern OOXML well
Office → PDF (docx/pptx/xlsx → pdf)LibreOfficepreserves layout; pandoc mangles it
Office ↔ Office, or legacy (.doc/.ppt/.xls) anythingLibreOfficepandoc can't read legacy binary formats at all
markup → PDF (md → pdf)pandoc (+pdflatex/xelatex)lighter than LibreOffice for plain markup
image ↔ image (png, jpg, gif, webp, tiff, heic, svg…)ImageMagickconvert in out
image → PDFImageMagick
audio ↔ audio (mp3, wav, flac, ogg, aac, m4a, opus…)ffmpeg
video ↔ video, mp4 → gif, gif → mp4ffmpeggif-from-video is an ffmpeg job, not ImageMagick

gif lives in both image and video worlds: png → gif is ImageMagick (still image), mp4 → gif is ffmpeg (animation). The dispatcher handles the split by the source family.

Usage

# Plan only — print engine + reason + exact command, run nothing. Do this first
# on an unfamiliar pair to confirm the route before committing.
python3 /mnt/skills/user/converting-files/scripts/convert.py --plan in.docx out.pdf

# Convert.
python3 /mnt/skills/user/converting-files/scripts/convert.py in.docx out.pdf
python3 /mnt/skills/user/converting-files/scripts/convert.py notes.md notes.docx
python3 /mnt/skills/user/converting-files/scripts/convert.py clip.mp4 clip.gif

# Pass engine flags through (everything after OUTPUT goes to the engine):
python3 .../convert.py photo.png photo.jpg -quality 85         # ImageMagick
python3 .../convert.py song.wav song.mp3 -b:a 192k             # ffmpeg
python3 .../convert.py paper.md paper.pdf --pdf-engine=xelatex # pandoc

# Force a specific engine if you disagree with the route:
python3 .../convert.py weird.docx weird.md --engine pandoc

Exit codes: 0 ok, 2 no route exists, 3 engine failed (stderr tail printed), 4 bad args / missing input.

Batch

The dispatcher is one file at a time by design — batch is a shell loop so each file's failure is visible:

for f in *.png; do
  python3 /mnt/skills/user/converting-files/scripts/convert.py "$f" "${f%.png}.webp" || echo "FAILED: $f"
done

Gotchas (the things that cost a re-run)

  • LibreOffice names the output itself — it writes <input-stem>.<ext> into --outdir, ignoring your chosen filename. The dispatcher renames to your OUTPUT after. If you call libreoffice raw, expect the input-stem name.
  • LibreOffice headless is single-instance. Two concurrent --headless calls collide on the user profile and one silently does nothing. Run them serially (the batch loop above is serial — fine).
  • markup → pdf needs a LaTeX engine. pdflatex/xelatex are present, but exotic Unicode wants --pdf-engine=xelatex. If LaTeX chokes on the content, route through docx first: md → docx (pandoc) then docx → pdf (LibreOffice).
  • ImageMagick here is IM6 (convert, not magick). Policy may block some formats; if convert refuses a PDF/PS op, that's the /etc/ImageMagick-6/policy.xml security policy, not a missing codec.
  • markup → jira emits heading anchors. md → jira works (both are pandoc formats), but headings come out as h1. {anchor:slug}Title — pandoc materializing the auto-generated heading ID. Suppress with --engine pandoc ... -f markdown-auto_identifiers (pass the format-with-extension yourself, since the dispatcher infers a bare markdown).
  • --plan lies about nothing but runs nothing — it can't tell you the content will survive (e.g. a pptx → md drops all layout). Plan checks the route; only a real run checks the result.

Why not VERT (or any web converter) as the skill

VERT (vert.sh) is a Svelte/WASM browser app wrapping these same engines (libvips, ffmpeg.wasm, Pandoc-wasm) for a human at a tab who wants local privacy. There's no library or CLI to import — the app is the UI. In-container we already have the native binaries with full filesystem access and no browser memory ceiling, so the WASM wrappers would be strictly slower and weaker. VERT is a good recommendation to a person; it's the wrong shape for a skill. This skill is the in-container equivalent of what VERT does in a tab.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

GitHub repository access in containerized environments using REST API and credential detection. Use when git clone fails, or when accessing private repos/writing files via API.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe (evaluator-as-selector, stop on regression). Routes on measured cost-per-completed-task rather than per-token price, because a tier's token count varies more by task shape than price varies across tiers. Covers per-model effort semantics, the concision lever, cascade preconditions, context handoff, and watching a subagent fan-out live. Use when choosing a subagent's model or effort, when choosing how to escalate a failed attempt, or when asked which model or effort a task should get. Grounded in a 2026-07 calibration, a 2026-08 coding-cost study, a 2026-09 seeded-bug repair battery, a 2026-10 Haiku 5.5 ladder priced per spawn, and a 2026-10 retry-versus-escalation ladder on 295 SWE-bench Verified tasks; Managed Agents API specifics are operational, not calibrated.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Securely manages API credentials for multiple providers (Anthropic Claude, Google Gemini, GitHub). Use when skills need to access stored API keys for external service invocations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Guidance for asking clarifying questions when user requests are ambiguous, have multiple valid approaches, or require critical decisions. Use when implementation choices exist that could significantly affect outcomes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Pre-change blast-radius report for a symbol or file. Walks tree-sitting references, augments with a plain-text scan over non-parsed files (configs, plain docs), and clusters affected sites by feature (`_FEATURES.md`) or top-level package. Use when about to refactor, rename, or delete something in a repo you don't own — "what breaks if I change `validateUser`", "who calls this", "is this safe to remove", "where is this used", "blast radius", "impact analysis". This is the CONVERGENT pre-change risk skill — for "what is this repo?" use exploring-codebases; for "where is X?" use searching-codebases.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Read Bluesky/ATProto without depending on Bluesky's AppView — interactions on a user's posts, thread replies, any repo's records, network-wide backlinks across every lexicon, an account's handle and PDS history, which collections are active network-wide, and layer-by-layer outage diagnosis. Use when bsky.app or the AppView is down or slow, when a Bluesky read returns timeouts or 5xx, when asked who liked/replied/quoted/reposted something, when pulling live Bluesky context cheaply, when reading records straight from a PDS, when asked who references a record or account anywhere on the network, whether an account has changed handle or migrated servers, or which lexicons and non-Bluesky apps are active on atproto. Complements browsing-bluesky, which routes everything through the AppView and fails when it does.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

oaustegard의 스킬 모두 보기

이 스킬의 문제 신고