batch

A command for converting all OGG and OGGH files in a directory to MP3, normally including subdirectories and skipping MP3 files that already exist.

In plain words
What is it for?
Use it for recursive batch conversion, with optional overwrite or dry-run behavior, and receive a machine-readable summary of each file.
Why use it?
It handles repeated file conversions in one operation and reports successes, skipped files, failures, and missing cover art.

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/batch
Clone the repo
git clone --depth 1 https://github.com/HerbertGao/ogg2mp3
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 423 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.00026 $0.00423
Opus 5 $0.00013 $0.00211
Sonnet 5 $0.00005 $0.00085
Haiku 4.5 $0.00003 $0.00042

Measured yesterday against content hash 4fb240064b1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

batch 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 yesterday.

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/batch.md · 29 lines

What it actually says

用户参数:$ARGUMENTS

第一个参数是目录路径。默认策略:递归 + 跳过已存在 + 非交互 + JSON:

ogg2mp3 batch "<dir>" -r --skip-existing --yes --json [...passthrough flags]

如果用户在 $ARGUMENTS 里显式传了 --overwrite--dry-run 等,原样透传(注意 --overwrite--skip-existing 互斥——透传 --overwrite 时去掉默认的 --skip-existing)。

输出是 NDJSON(每行一个对象)。汇总:

  • ok: true && !skipped 多少条(实际转换的)
  • skipped: true 多少条
  • ok: false 多少条;如果有,列出失败的 input 和 error
  • 如果有任何 cover_embedded: false,单独提一句"X 个文件没成功嵌入封面(可能不是 QQ 音乐源)"

如果命令退出码 0:用一行总结成功结果,例:"转换 12 个文件,跳过 3 个已存在,全部带封面。" 如果退出码 1:列出失败的文件,告诉用户具体哪几个出问题、可能原因。

如果用户没提供目录($ARGUMENTS 为空),告诉用户用法:/ogg2mp3:batch <dir>,不要瞎调。

不要主动 --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. yesterday First seen · 29 lines · 26 tokens per session scan A 4fb240064b1d

Subscribe to this mod's changes

batch is a command published in the GitHub repository HerbertGao/ogg2mp3 (5 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 423 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.