convert

A command for converting one OGG or OGGH audio file to MP3 while preserving available cover art and metadata.

In plain words
What is it for?
Use it with one input file to create an MP3, report its output path, say whether cover art was embedded, count metadata fields, and explain conversion errors.
Why use it?
It avoids manually running the conversion tool and gives a clear result when the output file already exists or cover art is unavailable.

Command

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.

agentmods
npx agentmods add commands/herbertgao/ogg2mp3/convert
Clone the repo
git clone --depth 1 https://github.com/HerbertGao/ogg2mp3
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.00356
Opus 5 $0.00010 $0.00178
Sonnet 5 $0.00004 $0.00071
Haiku 4.5 $0.00002 $0.00036

Measured 2d ago against content hash 7060ee78fd2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 2d 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.

packaging/claude-code/commands/convert.md · 25 lines

What it actually says

用户参数:$ARGUMENTS

把第一个参数当作输入文件路径,其余作为额外 flag 透传。必须始终加上 --yes --json(slash command 是非交互上下文)。

调用形式:

ogg2mp3 convert "<file>" --yes --json [...passthrough flags]

解析 JSON 结果:

  • ok: true —— 转换成功。一句话告诉用户:输出路径(output)、是否带封面(cover_embedded)、嵌入了几个元数据字段(metadata_fields
  • cover_embedded: false —— 不是错误。主动提示用户:"这个文件可能不是 QQ 音乐下载的(没有 ICNS 封面资源),MP3 已生成但无专辑封面。"
  • 退出码非 0 —— 转换失败。从 stderr 读 ffmpeg: 开头的行抓真因,告诉用户哪一步坏了

如果用户没提供文件路径($ARGUMENTS 为空),告诉用户用法:/ogg2mp3:convert <file>,不要瞎调命令。

如果用户没明确要求覆盖,但目标 .mp3 已存在导致 exit 1 "output exists",问用户是否要加 --overwrite 重跑,不要自作主张覆盖。

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. 2d ago First seen · 25 lines · 21 tokens per session scan A 7060ee78fd2c

Subscribe to this mod's changes

convert is a command published in the GitHub repository HerbertGao/ogg2mp3 (5 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 356 once invoked, about $0.0001 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.