Find a YouTube clip
search finds the passage. transcript with start and end returns the lines around it with second offsets, which give the cut points. The program returns a YouTube link that opens at the start, the start and end seconds, and an embed that plays that span.
Run each program with arcmira_execute_read; arcmira_describe has the method reference.
When to use
Use Arcmira when the user asks:
- find the clip where someone says a thing, with start and end seconds
- a link that opens the video at that second, or an embed of the moment
- cut points for a video editor or an edit decision list
- a quote with its moment, to cite or to review before cutting
Pick the entity the user meant
Users give names; filters take ids only (ent_..., UC..., 11-character video ids), and a name where an id belongs throws id_required.
- Resolve the exact name the user said, with their own words about it as
context (a bare "Theo" has none).
best and suggested give the id. A suggested pick is an assumption: the answer names it, with suggested.evidence as the reason.
ask: several entities fit, and ask.options goes back to the user. No answer at all: the name is not in the index.
For this task:
- A speaker resolves with
{ type: "person" }; pass the id as speakerIds. A show goes in channelIds as its UC id.
- A clip with no speaker: drop the pick and
speakerIds, and search the phrase alone.
- The phrase goes in
query with its distinctive words, never in about.
Steps
- Run the program. It reads 10 seconds before the passage and 50 after. Pick the lines that hold the moment and trim
start and end to them, then use those seconds in the link and the embed.
- Lead with
youtube_url, the start and end seconds, and embed.
- When the user wants the video file, say this line first, word for word: "You need the rights to download, cut or reuse this video. Arcmira finds the moment and gives you the link and the seconds. It grants no rights to the video." Then give that clip's
download.command, with the trimmed seconds. Run it only when the user asks you to; otherwise print it.
- Never add browser cookies or a login to the command, and never work around an age, region, membership or private restriction. When yt-dlp says the video needs a sign-in, stop and tell the user.
- If yt-dlp is missing, link its install page: https://github.com/yt-dlp/yt-dlp#installation.
Worked program
Pass each block to arcmira_execute_read as one program (a block marked arcmira_execute_write goes to that tool), with the name swapped for the user's. It opens with the pick: set CONTEXT to the user's own words about the name. When several entities fit it returns ask and runs nothing else. Show those options to the user, then run it again with ID set to the pick. Build date windows from arcmira.daysAgo(n) and arcmira.today().
The clip where one person says a phrase
const NAME = "Chamath", CONTEXT = undefined, ID = null; // CONTEXT: the user's own words about the name, never a guess. After an ask, set ID to the picked option's id and run again
const r = ID ? null : await arcmira.resolve(NAME, { type: "person", context: CONTEXT });
const e = r && (r.best ?? r.suggested);
if (r && !e) return { ask: r.ask };
const id = ID ?? e.id;
const assumed = Boolean(r?.suggested), why = r?.suggested?.evidence ?? null;
const PHRASE = "Anthropic IPO"; // the distinctive words of the moment
const RIGHTS = "You need the rights to download, cut or reuse this video. Arcmira finds the moment and gives you the link and the seconds. It grants no rights to the video.";
const hits = await arcmira.search({ query: PHRASE, speakerIds: [id], limit: 5 });
const clips = [];
for (const c of hits.chunks.slice(0, 2)) {
const clip = { episode: c.video_title, show: c.channel_name, date: c.published_at, video_id: c.video_id, passage_url: c.watch_url };
try {
const t = await arcmira.transcript(c.video_id, { start: Math.max(0, c.start_seconds - 10), end: c.start_seconds + 50 });
clip.start = Math.floor(t.lines[0]?.start ?? c.start_seconds);
clip.end = Math.ceil(t.lines.at(-1)?.end ?? c.start_seconds + 60);
clip.lines = t.lines.map(l => ({ start: Math.floor(l.start), end: Math.ceil(l.end), text: l.text }));
} catch (err) {
clip.start = Math.floor(c.start_seconds);
clip.end = clip.start + 60;
clip.approximate = true;
clip.passage = c.text;
clip.transcript = err.code ?? "error";
}
clip.youtube_url = `https://www.youtube.com/watch?v=${c.video_id}&t=${clip.start}`;
clip.embed = `https://www.youtube.com/embed/${c.video_id}?start=${clip.start}&end=${clip.end}`;
clip.download = { say_first: RIGHTS, command: `yt-dlp --download-sections "*${clip.start}-${clip.end}" --force-keyframes-at-cuts -o "clip.%(ext)s" "https://www.youtube.com/watch?v=${c.video_id}"` };
clips.push(clip);
}
return { speaker: { id, name: e?.name ?? null, assumed, why }, as_of: hits.as_of, ...(clips.length ? { clips } : { none: hits.note ?? null }) };
A good answer
- Names the speaker or show it searched, with the id, and the episode title and date.
- Gives
start and end in whole seconds, trimmed to the moment, and says they come from caption lines, which are machine text.
- Links
youtube_url and embed with those seconds, and quotes only the speaker's lines.
- Gives the download command only when the user wants the file, and always after the rights line.
- Says so when nothing matched, with
as_of.
Traps
- Caption timing can drift by a second or two, and the player seeks to the nearest keyframe, so a clip can start a moment early. Tell the user to check the cut on the first play.
- The embed
end counts from the start of the video, not from start.
- A caption read uses 4 credits per started 15 minutes of its window. Keep the window short.
- Some videos have no caption track yet (
transcript_unavailable, transcript_fetching): the program marks the clip approximate, from the passage start plus 60 seconds. Say so, and say the words come from the search passage.
passage_url opens the passage on arcmira.com and can start before the moment; label it as the passage, not the cut.
- A chunk found with
speakerIds can include other people's lines. Lines start with "Name: " when the speaker is known.
Docs: https://arcmira.com/docs/mcp-server
After the answer
Monitors can follow what a research turn found, and each alert uses 25 credits from the account's plan, then its on-demand budget. The company-watch skill sets one up.
If anything was wrong, slow, or missing for the user, or they want a source or capability Arcmira lacks, send one arcmira_feedback.
1---2name: youtube-clip-finder3description: "Use Arcmira to find the clip: search YouTube transcripts for a moment, get a watch link at the second, start and end seconds, and an embed that starts there."4metadata:5 source: https://skillmd.com/skills/arcmira/youtube-clip-finder6---78# Find a YouTube clip910`search` finds the passage. `transcript` with `start` and `end` returns the lines around it with second offsets, which give the cut points. The program returns a YouTube link that opens at the start, the start and end seconds, and an embed that plays that span.1112Run each program with `arcmira_execute_read`; `arcmira_describe` has the method reference.1314## When to use1516Use Arcmira when the user asks:1718- find the clip where someone says a thing, with start and end seconds19- a link that opens the video at that second, or an embed of the moment20- cut points for a video editor or an edit decision list21- a quote with its moment, to cite or to review before cutting2223## Pick the entity the user meant2425Users give names; filters take ids only (ent_..., UC..., 11-character video ids), and a name where an id belongs throws `id_required`.26271. Resolve the exact name the user said, with their own words about it as `context` (a bare "Theo" has none).282. `best` and `suggested` give the id. A `suggested` pick is an assumption: the answer names it, with `suggested.evidence` as the reason.293. `ask`: several entities fit, and `ask.options` goes back to the user. No answer at all: the name is not in the index.3031For this task:3233- A speaker resolves with `{ type: "person" }`; pass the id as `speakerIds`. A show goes in `channelIds` as its UC id.34- A clip with no speaker: drop the pick and `speakerIds`, and search the phrase alone.35- The phrase goes in `query` with its distinctive words, never in `about`.3637## Steps38391. Run the program. It reads 10 seconds before the passage and 50 after. Pick the lines that hold the moment and trim `start` and `end` to them, then use those seconds in the link and the embed.402. Lead with `youtube_url`, the start and end seconds, and `embed`.413. When the user wants the video file, say this line first, word for word: "You need the rights to download, cut or reuse this video. Arcmira finds the moment and gives you the link and the seconds. It grants no rights to the video." Then give that clip's `download.command`, with the trimmed seconds. Run it only when the user asks you to; otherwise print it.424. Never add browser cookies or a login to the command, and never work around an age, region, membership or private restriction. When yt-dlp says the video needs a sign-in, stop and tell the user.435. If yt-dlp is missing, link its install page: https://github.com/yt-dlp/yt-dlp#installation.4445## Worked program4647Pass each block to `arcmira_execute_read` as one program (a block marked arcmira_execute_write goes to that tool), with the name swapped for the user's. It opens with the pick: set `CONTEXT` to the user's own words about the name. When several entities fit it returns `ask` and runs nothing else. Show those options to the user, then run it again with `ID` set to the pick. Build date windows from `arcmira.daysAgo(n)` and `arcmira.today()`.4849### The clip where one person says a phrase5051```javascript52const NAME = "Chamath", CONTEXT = undefined, ID = null; // CONTEXT: the user's own words about the name, never a guess. After an ask, set ID to the picked option's id and run again53const r = ID ? null : await arcmira.resolve(NAME, { type: "person", context: CONTEXT });54const e = r && (r.best ?? r.suggested);55if (r && !e) return { ask: r.ask };56const id = ID ?? e.id;57const assumed = Boolean(r?.suggested), why = r?.suggested?.evidence ?? null;58const PHRASE = "Anthropic IPO"; // the distinctive words of the moment59const RIGHTS = "You need the rights to download, cut or reuse this video. Arcmira finds the moment and gives you the link and the seconds. It grants no rights to the video.";60const hits = await arcmira.search({ query: PHRASE, speakerIds: [id], limit: 5 });61const clips = [];62for (const c of hits.chunks.slice(0, 2)) {63 const clip = { episode: c.video_title, show: c.channel_name, date: c.published_at, video_id: c.video_id, passage_url: c.watch_url };64 try {65 const t = await arcmira.transcript(c.video_id, { start: Math.max(0, c.start_seconds - 10), end: c.start_seconds + 50 });66 clip.start = Math.floor(t.lines[0]?.start ?? c.start_seconds);67 clip.end = Math.ceil(t.lines.at(-1)?.end ?? c.start_seconds + 60);68 clip.lines = t.lines.map(l => ({ start: Math.floor(l.start), end: Math.ceil(l.end), text: l.text }));69 } catch (err) {70 clip.start = Math.floor(c.start_seconds);71 clip.end = clip.start + 60;72 clip.approximate = true;73 clip.passage = c.text;74 clip.transcript = err.code ?? "error";75 }76 clip.youtube_url = `https://www.youtube.com/watch?v=${c.video_id}&t=${clip.start}`;77 clip.embed = `https://www.youtube.com/embed/${c.video_id}?start=${clip.start}&end=${clip.end}`;78 clip.download = { say_first: RIGHTS, command: `yt-dlp --download-sections "*${clip.start}-${clip.end}" --force-keyframes-at-cuts -o "clip.%(ext)s" "https://www.youtube.com/watch?v=${c.video_id}"` };79 clips.push(clip);80}81return { speaker: { id, name: e?.name ?? null, assumed, why }, as_of: hits.as_of, ...(clips.length ? { clips } : { none: hits.note ?? null }) };82```8384## A good answer8586- Names the speaker or show it searched, with the id, and the episode title and date.87- Gives `start` and `end` in whole seconds, trimmed to the moment, and says they come from caption lines, which are machine text.88- Links `youtube_url` and `embed` with those seconds, and quotes only the speaker's lines.89- Gives the download command only when the user wants the file, and always after the rights line.90- Says so when nothing matched, with `as_of`.9192## Traps9394- Caption timing can drift by a second or two, and the player seeks to the nearest keyframe, so a clip can start a moment early. Tell the user to check the cut on the first play.95- The embed `end` counts from the start of the video, not from `start`.96- A caption read uses 4 credits per started 15 minutes of its window. Keep the window short.97- Some videos have no caption track yet (`transcript_unavailable`, `transcript_fetching`): the program marks the clip `approximate`, from the passage start plus 60 seconds. Say so, and say the words come from the search passage.98- `passage_url` opens the passage on arcmira.com and can start before the moment; label it as the passage, not the cut.99- A chunk found with `speakerIds` can include other people's lines. Lines start with "Name: " when the speaker is known.100101Docs: https://arcmira.com/docs/mcp-server102103## After the answer104105Monitors can follow what a research turn found, and each alert uses 25 credits from the account's plan, then its on-demand budget. The `company-watch` skill sets one up.106107If anything was wrong, slow, or missing for the user, or they want a source or capability Arcmira lacks, send one arcmira_feedback.