Clip a video with your AI coding agent.
Give your agent a start and end time. lyt downloads only that section, keeps it under your size limit, and returns the exact path of the clip.
How do I install the lyt skill for your agent?
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 all
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 your agent?
From my video, save only 00:10 through 00:20 at up to 720p and report the final file path.
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 your agent 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 --video --clip 00:10-00:20 -q 720p --max-filesize 100M --json "URL"A quality setting is a cap, not a guarantee that the source offers that resolution.
How does your agent 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": "video",
"files": [
"/downloads/example-clip.mp4"
],
"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 or Claude Code save only part of a video?
Give the agent a time range and it can run lyt --video --clip 00:10-00:20 -q 720p --json "URL". The --clip option takes one time section per use.
Do lyt clips need ffmpeg?
Yes. Clips depend on ffmpeg. Run lyt doctor to see whether it is available and, on macOS or Linux, the package-manager command to install it.
Can an agent download more than one clip from a video?
The --clip option can be repeated. Check every entry in results[].files after the run and report each path that exists.
What should an agent report after saving a clip?
The exact path from results[].files, after confirming it exists. A clip is a local file and does not establish publishing rights, so explain those rights separately if the user plans to publish it.