Save YouTube audio as MP3 with Codex.
Ask Codex for an MP3 in plain language. With the lyt skill installed, Codex runs one command, checks the result, and tells you exactly where the file was saved.
How do I install the lyt skill for Codex?
Requires Node.js 20 or newer and a terminal the agent can run. Approve global installation and managed tool setup once. Network access to the media host is required. ffmpeg is needed for MP3 conversion, video merging, and clips.
npm install --global @tanattv/lyt
lyt agent install codex
lyt doctor --json
lyt capabilities --jsonCodex user skills live in ~/.agents/skills/lyt/. Claude Code skills live in ~/.claude/skills/lyt/. An installed and enabled skill can be selected for matching tasks; selection depends on the agent.
What should I ask Codex?
This is my upload. Save the audio from this URL as a 192 kbps MP3 and tell me where it was saved.
Replace URL with your media link. Ownership, permission, licenses, public domain, or applicable exceptions can support the download. Downloading does not establish publication rights.
How does Codex check the media before downloading?
Inspection contacts the media host but does not download media. With --no-download it also avoids provisioning tools.
lyt info --no-download --json "URL"
lyt --mp3 -q 192K --max-filesize 100M --json "URL"A quality setting is a cap, not a guarantee that the source offers that resolution.
How does Codex know where the file was saved?
This is an illustrative success response. Names and paths depend on the source and output directory. Read JSON from stdout and diagnostics from stderr. Check the exit status and ok before using results[].files.
{
"schema": "lyt.result.v1",
"version": "0.8.2",
"command": "download",
"ok": true,
"results": [
{
"url": "URL",
"status": "downloaded",
"mode": "audio",
"files": [
"/downloads/example.mp3"
],
"outputDir": "/downloads"
}
]
}Failure must not be reported as a saved file. Verify that successful paths exist. Playlist downloads and overwrites remain opt-in.
What if the download or setup fails?
Run lyt doctor --json for missing tools. A certificate trust error may require correctly configuring your environment's trusted certificates. Do not disable certificate verification as a default fix. A host or network proxy may return an HTML error page instead of media, causing an invalid-input conversion error. That needs an access or network fix; lyt cannot guarantee access from a restricted agent environment.
Related guides
Frequently asked questions
How do I make Codex save YouTube audio as MP3?
Install the skill with lyt agent install codex, then ask Codex for an MP3 and provide the URL. Codex can run lyt --mp3 -q 192K --json "URL" and report the path listed in results[].files. Use this only for media you have the rights to download.
Where does the lyt skill for Codex get installed?
The direct Codex skill installs to ~/.agents/skills/lyt/. Run lyt agent install codex again after upgrading lyt. The installer does not delete older or custom copies, so compare them before removing anything.
Can Codex check the audio before it downloads?
Yes. lyt info --no-download --json "URL" returns the title, duration, uploader, and formats. It contacts the media host but downloads no media and provisions no tools.
What does Codex get back when the MP3 download succeeds?
One lyt.result.v1 JSON document on stdout. Codex should check ok and the exit status, confirm the file exists, and then report the path from results[].files. A failure must not be reported as a saved file.