---
name: class-exercise-index
description: "Index the exercises in your own recorded fitness, yoga or Pilates classes with Vivu: class file, start time, a demo frame and a jump link per move. Use when building an on-demand library or plan."
---Exercise index from recorded fitness classes
This skill takes three or four of a coach's own recorded classes (local video files with a transcript each) and the coach's list of the exercises those classes use, and returns an exercise index: one row per exercise per class with the class file, the start and end time as MM:SS, a demo frame, the cue line copied from the transcript, and a link to the class in the coach's on-demand library with a time parameter. Claude prices the indexing against the user's Vivu plan, indexes the classes in a private Vivu project, runs one search per exercise for the moment the coach names it and starts demonstrating it, checks every window against the frames and the transcript, runs one more search for moments where the coach switches to a move the list may have missed, and writes exercise_index.csv plus a text block the coach pastes into the members' training plan.
The value is in what the transcript leaves out. Coaches cue "next one", "other side" and "take it down and take it up", so for some moves the name is never said and only the picture shows what the move is. When the name is said, it is often said before or after the first rep, and the same words come up inside other moves ("roll up" is said on every rep of a standing roll down). So the search finds the window, the frames show which move it is, the transcript shows where the coach cues it, and the picture for the index comes from the video. Nothing reaches the index without a frame that shows the move.
When to use
Use when a coach asks "make an exercise index for these three classes so members can jump to each move", "where does each exercise start in my recorded classes, I need timestamps for the training plan PDF", or "pull a picture of each move from my class videos for the plan".
Not for these:
- One question about one class ("when do I start the side kicks?"): search Vivu directly or scrub the video.
- Step cards for a single recipe or tutorial video. The recipe-card-step-frames skill (https://vivu.ai/skills/recipe-card-step-frames) does that.
- Picking a thumbnail. The thumbnail-frame-candidates skill (https://vivu.ai/skills/thumbnail-frame-candidates) does that.
- Judging form, counting reps or correcting a member's technique. This skill finds where moves start; it does not assess anyone's movement.
- Someone else's classes. This skill works only on the coach's own files.
Working principles
- Report measured numbers, not estimates. When a number is an estimate, say so.
- Nothing is verified until it has been checked against the video. A search window is a candidate until the frames show the move and the transcript shows where it is cued. Vivu's reason text paraphrases and can claim a cue that was never said, so it never fills a cell.
- A move the coach never names gets its name from the coach, not from Claude. A window that shows a move not on the list goes back to the coach as NAME NEEDED.
- Stop and tell the user when a required capability or tool is missing. Do not guess around it.
- Ask the user before anything that is expensive to redo (the indexed minutes, before upload). The skill writes local files only; the coach pastes the index into their own plan or library, so nothing is posted on their behalf.
What you need before starting
Check each item at the start of the run and tell the user plainly what is missing before doing anything else.
| Requirement | Why | How to check |
|---|---|---|
| Vivu connector with write access | create a private project, open its upload page, search | vivu_get_account shows can_create_projects: true (tool names may carry a server prefix). A write call failing with "has not granted vivu.write" means the user reconnects Vivu and allows write access |
| A shell with ffmpeg and ffprobe | measure the classes, make frame strips and contact sheets, extract frames | ffmpeg -version, ffprobe -version |
| The classes as local files, the same edit members watch | Vivu indexes uploads, frames come from the coach's copy, and times must match the library version | ls CLASS_DIR shows the files; the user confirms they are the published edits |
| A transcript per class: an .srt from the editor, captions downloaded from the coach's own upload, or a local speech to text tool such as whisper.cpp | windows are checked against the cue words, and the cue line is copied from it | an .srt or .vtt per class, or whisper-cli --help |
| The coach's exercise list, one name per line, with a few words on what each move looks like | each exercise gets its own search, and the description finds moves the coach never names | the user pastes it |
| The library link for each class (optional) | the index links to the moment in the member library | the user pastes one link per class and says how the library takes a start time (for example ?t=SECONDS) |
| An upload path | move the classes into Vivu | vivu_open_upload_page plus the user's own browser, or a browser tool that can attach local files |
This skill needs Claude Code on the user's computer (the terminal or the Code tab of Claude Desktop), because it reads local files and runs ffmpeg. It downloads nothing from YouTube or other sites, so no residential IP is needed. Nothing recurs, so no scheduler is involved; run it once per batch of classes. The only connector it needs is Vivu.
Inputs to collect
Ask for anything missing, most important first.
- CLASS_DIR: the folder with the class videos. Required.
- The exercise list in class order, with a short description of each move. Required. Example: "single leg stretch: lying on the back, head lifted, one knee pulled in while the other leg reaches long, switching legs".
- The transcript files. Default: look for an .srt or .vtt next to each class with the same name; otherwise ask whether to run the local speech to text tool.
- The library link per class and its time parameter. Default: leave library_link empty and put the class file name and MM:SS in the plan block.
- WORK_NAME: a short name for the working folder and the Vivu project. Default: the month and "classes", for example oct-classes.
- Whether to run the search for moves the list missed. Default: yes.
Files and state
Keep everything in one working folder:
index-WORK_NAME/
config.json classes, exercise list with descriptions, library links, Vivu project id, query wording per exercise
classes.csv file, duration_s, video_id, transcript file
upload/ the classes to index (copies of the published edits)
transcripts/ one .srt or .vtt per class
results/ one JSON per search, without the result page link
strips/ five frames across each search window
sheets/ half second contact sheets where a move starts
frames/ the demo frame for each row
candidates.csv every window Vivu returned, with the verdict and the reason
exercise_index.csv the index: one row per exercise per class
plan_block.txt the text the coach pastes into the training plan
state.json steps done, files uploaded, searches run with job ids, windows checked
Run every command from inside index-WORK_NAME/; the ffprobe command in Step 2 reads CLASS_DIR, which can be anywhere. A rerun reads state.json first: an uploaded class is not uploaded again, a search with a saved result is not run again, and a window with a verdict in candidates.csv is not checked again, so an interrupted run picks up where it stopped and no row is written twice.
Step 1: Check the Vivu connector and the setup
Goal: confirm every requirement before touching any file.
- Call vivu_get_account. If the tool is missing, tell the user to add the Vivu connector in Claude (
https://mcp.vivu.ai/mcp) and stop. If it shows can_create_projects: false, or a later write call fails with "has not granted vivu.write", ask the user to reconnect Vivu and allow write access, then stop until they have. - Run
ffmpeg -versionandffprobe -version. If either is missing, say so and stop. - Check the rest of the What you need table: the class files, one transcript per class, the exercise list. Say plainly what is missing.
Done when vivu_get_account shows can_create_projects: true, both ffmpeg commands print a version, and each class has a transcript.
Step 2: Collect the exercise list and measure the classes
Goal: a classes.csv with real durations and a config.json with one query per exercise.
- Measure each class:
ffprobe -v error -show_entries format=duration -of csv=p=0 "CLASS_DIR/CLASS_FILE"
CLASS_DIR is the folder from Inputs; CLASS_FILE is one video in it, and CLASS_NAME is that file name without its extension (CLASS_02 for CLASS_02.mp4). Write file and duration_s to classes.csv. 2. Copy the classes to index-WORK_NAME/upload/ and the transcripts to transcripts/. 3. Write one query per exercise from the coach's description, in the coach's words for the body position and movement, not the brand name of a program. Use this pattern:
the instructor calls out EXERCISE and starts it: BODY POSITION AND MOVEMENT
EXERCISE is the name on the list; BODY POSITION AND MOVEMENT is the coach's description ("lying on her back with knees bent and feet on the mat, she curls the pelvis and spine up into a bridge and rolls back down"). For a move the coach never names in class, drop the "calls out" part and describe only what the body does. 4. Show the user the query list and ask them to fix any description that does not match how they teach the move.
Done when classes.csv lists every class with its duration and the user has approved the query list.
Step 3: Price the run and get approval
Goal: the user sees what indexing and searching will use before anything is uploaded.
- Sum duration_s over classes.csv and divide by 60: that is the index minutes.
- Count the searches: one precise search per exercise plus one for moves not on the list. A precise search uses 5 credits in total and a fast search uses 1 credit. This skill uses only precise searches, because only precise returns a time range.
- Call vivu_get_usage and show one table:
| This batch | Plan allowance | Remaining this month | |
|---|---|---|---|
| Index minutes | measured | from vivu_get_usage | from vivu_get_usage |
| Search credits | estimate: searches x 5 | from vivu_get_usage | from vivu_get_usage |
The plans for reference: Free is 20 indexing minutes a month and 50 search credits a month; Premium is $30 a month with 180 indexing minutes and 500 search credits. 4. If the batch does not fit, offer these levers in order: index fewer classes now (the classes that use the most exercises from the list first), drop the search for moves not on the list, and only then move to a larger plan. Do not cut classes the coach asked for without saying which ones.
Done when the user has approved the minutes and credits in the table.
Step 4: Create the project and upload
Goal: every class is ready in a private Vivu project.
- Call vivu_list_projects and reuse a project named "Class index WORK_NAME" if it exists. Otherwise call vivu_create_project with that name and visibility "private". The default visibility is the whole organization, and class footage may show members, so private is the right choice. Record the project ID in config.json.
- Call vivu_open_upload_page with the project ID. It returns upload_url, a one time link that expires in 180 seconds, so request it right before use and never paste it into a file or a message. Either give it to the user to open in their own browser and pick the files from upload/, or open it in a browser tool that can attach local files. Claude in Chrome accepts at most 10 MB per upload call; most classes are larger, so in that case the user adds them in the Vivu web app. Do not split or recompress a class to fit.
- Poll vivu_list_videos every 30 seconds or so until every class shows status ready. Vivu replaces spaces and punctuation in file names with underscores, so match each video back to classes.csv by the name with those characters replaced, and record video_id.
Done when vivu_list_videos shows every class in classes.csv as ready and each row has a video_id.
Step 5: Find each exercise
Goal: one search per exercise, each result saved.
The standing queries, one per output field:
| Field | Query | Mode | maximum_results |
|---|---|---|---|
| one index row per class for EXERCISE (named moves) | the instructor calls out EXERCISE and starts it: BODY POSITION AND MOVEMENT | precise | 5 |
| one index row per class for EXERCISE (moves never named) | BODY POSITION AND MOVEMENT only, for example "lying on her back with knees bent, the instructor lifts one leg up to tabletop ... then lowers it to tap the foot down and lifts it again, alternating legs" | precise | 5 |
| NAME NEEDED list | the new move query in Step 7 | precise | 40 |
The chain: the per exercise search finds the window where a listed move is said and done, the frame strip and transcript in Step 6 turn that window into a checked start, and the new move search in Step 7 looks at the same classes for changes the list did not cover. The flip from said to shown is built into the queries: named moves are found by the spoken name plus the picture, moves the coach never names by the picture alone. fast mode is not used, because it returns whole files with no time range, and each class is already a known file.
- For each exercise, call vivu_search_videos with project_id, the query from config.json, mode "precise" and maximum_results 5. Five leaves room for the same move in every class of the batch plus a couple of near misses; it is also the most windows a search can return, so raise it for a batch of more than four classes.
- Call vivu_get_search_results with the job ID until complete is true. Each status call can wait up to 45 seconds, so a pending search is not a stalled one.
- Save the results array to results/EXERCISE.json without the result page link, and record the job ID in state.json. Show the result page link in the live reply only: it expires after four hours, so it never goes into the index, the plan block or any file.
Done when every exercise on the list has a saved result file and a job ID in state.json.
Step 6: Check each window and set the start
Goal: every window is judged real or false from the video, and every real row has a start the coach can trust.
- For each window, extract five frames across it into one strip (START and DURATION in seconds from the result, CLASS_FILE the class, EXERCISE the name):
ffmpeg -v error -ss START -t DURATION -i "upload/CLASS_FILE" -vf "fps=5/DURATION,scale=384:-2,tile=5x1" -frames:v 1 "strips/EXERCISE_START.png"
Look at the strip. The window is real only if the frames show the exercise on the list. If they show a different move, it is a false positive: write it to candidates.csv as false with what the frames show, and leave it out of the index. 2. Read the transcript around the window: from 60 seconds before START to the window end. Copy the line where the coach names or sets up the move as the cue. For a speech check without a transcript, call vivu_get_video_summary with include_segments true and start_ms and end_ms around the window, and compare the section summary; the summary is a paraphrase too, so it confirms the move but never fills the cue cell. 3. Set the start. Vivu returns a time range that contains the moment, not an exact frame, and the range can start before the name is said or well after the first rep. Use the earlier of the window start and the cue line. When the window starts in the middle of the move, read back through the transcript to the set up line ("take your left leg up to tabletop") and use that. 4. When an exercise has no real window in a class where the coach says it is used, reword the query once (quote the spoken name, add what comes before or after it in the class order) and run Step 5 again for it. Say in the summary which exercises were reworded.
Done when every window in candidates.csv has a verdict of real or false, and every real row has a start, an end and a cue line.
Worked example from our test run
In our test run we used three public Pilates classes from one instructor (one full class and the first 12 minutes of two others), 40.5 minutes in total, no members on camera, with an exercise list of 12 moves. Indexing took about 11 minutes from upload start to all ready. The upload in our test run did not go through the upload page in a user's browser, and there was no user to approve the cost table, so those parts of Steps 3 and 4 were not exercised in our test run.
The 11 searches for exercises the instructor names found all 14 named moments: 14 real, 0 false and 0 missed against a ground truth we wrote before searching. That count is after 1 rewording on the same corpus for one exercise (rolling like a ball).
The first wording for rolling like a ball returned 1 window and it was false: the frames from 07:59 to 08:17 show the double leg stretch that follows, while the reason text said she announces rolling like a ball. The reworded query quoted the spoken name and said the double leg stretch comes next.
Toe taps, which the instructor never names, was found from the description alone: 1 result, real, but the window began at 07:57, 104 seconds after the move began, and the start in the index came from the set up line in the transcript.
Step 7: Find moves that are not on the list
Goal: catch moves the coach did not list or only cued with "next one".
- Run one more precise search with maximum_results 40 (enough for every change of exercise in a short batch):
the instructor stops one exercise and starts a different one: she changes body position, for example from standing to kneeling on all fours, from lying on her back to lying on her side, or from lying face down to sitting
- Check each window with a frame strip as in Step 6. Drop windows that only show a change to a move already in the index at that time. Every other real window goes to plan_block.txt under NAME NEEDED with the class, MM:SS and what the frames show.
- This search depends on visual and motion understanding, which is weak in Vivu. In our test run it returned 6 windows, 6 real and 0 false, but it found 6 of 23 exercise changes (26%), only big changes of body position, and nothing in two of the three classes. So treat an empty or short list as "not found", never as "the list is complete", and tell the coach to skim any class with a long gap between indexed moves.
Done when every window from this search has a verdict and every unlisted move is in plan_block.txt as NAME NEEDED.
Step 8: Pick the demo frames and build the index
Goal: exercise_index.csv and plan_block.txt, with a picture for every row.
- For each real row, make a half second contact sheet over the first 10 seconds of the move (START is the row's start in seconds):
ffmpeg -v error -ss START -t 10 -i "upload/CLASS_FILE" -vf "fps=2,scale=320:-2,tile=5x4" -frames:v 1 "sheets/CLASS_NAME_START.png"
Pick the tile where the move is clearly shown (the first full rep, not the set up), and work out its time: START plus half a second per tile, counting from zero. 2. Extract that frame at full size (FRAME_SECONDS is the time from the previous point):
ffmpeg -v error -ss FRAME_SECONDS -i "upload/CLASS_FILE" -frames:v 1 -q:v 3 "frames/CLASS_NAME_FRAME_SECONDS.png"
- Show the user one sample row and the field mapping before writing the rest:
exercise,class_file,start_mmss,end_mmss,frame_path,cue_from_transcript,library_link,found_by,status
toe taps,CLASS_02.mp4,06:13,08:40,frames/CLASS_02_379.png,"now let's take your left leg up to tabletop as we breathe out",https://LIBRARY/CLASS_02?t=373,exercise search (description only),checked; start moved back to the set up line
| Field | Source | If unavailable |
|---|---|---|
| exercise | the coach's list | NAME NEEDED |
| class_file | the result's file name, matched to classes.csv | none |
| start_mmss, end_mmss | Step 6 start; window end | none |
| frame_path | Step 8 frame | NOT VERIFIED, no picture |
| cue_from_transcript | the transcript line, verbatim | blank, with "name not said" in status |
| library_link | the coach's link plus the time parameter | blank |
| found_by | exercise search, reworded, description only, or new move search | none |
| status | checked, plus any start correction | none |
- Write the plan block, grouped by class in time order: "MM:SS Exercise -> LINK", then the NAME NEEDED list.
Done when exercise_index.csv has one row per real window, every row has a frame that exists in frames/, and plan_block.txt lists every row plus the NAME NEEDED moves.
Step 9: Coach review and hand off
Goal: the coach checks the index before members see it.
- Give the coach exercise_index.csv, plan_block.txt and the frames folder. Point out every row whose start was moved, every reworded exercise, and every NAME NEEDED move. Also give the coach candidates.csv and say how many windows were checked and how many were rejected as false, with what the frames showed for each rejected one.
- Report the real count, not a target: if an exercise on the list was not found in a class, say so instead of filling the row.
- The coach pastes the plan block into their own training plan or library. Claude does not post or upload it anywhere.
This step was not exercised in our test run: there was no coach, and the index files were rendered locally and not sent anywhere.
Done when the coach has candidates.csv, has seen the count of rejected windows, and has confirmed the rows and named every NAME NEEDED move, or said which rows to drop.
Compliance
- Only the coach's own classes. Ask the coach to confirm before Step 4 that they recorded the classes and hold the rights to them.
- People on camera. If members appear, the coach confirms before Step 4 that those members agreed to be recorded and shown in the member library. Classes with minors on camera are not uploaded unless a parent or guardian has agreed in writing; otherwise leave that class out.
- The skill finds where moves start. It does not judge, correct or comment on anyone's form, and it does not identify people or recognize faces.
- The classes stay in the Vivu project in the user's account until the user deletes them. The project is created private. Claude never deletes a project or a video unless the user asks, and confirms first.
Known failure modes
| Symptom | Cause | Fix |
|---|---|---|
| (observed) a search returns a window that shows the next exercise: "first rolling like a ball wording returned the double leg stretch window 07:59-08:17" | moves that follow each other closely in a class, and the reason text claimed the right move | reject it from the frame strip; reword once with the spoken name and the move that comes next on the list |
| (observed) the window is inside the move but starts long after it begins: "toe taps window began 07:57, 104 s after the exercise starts at 06:13" | a move found only by its description; the search lands on a typical rep, not the first one | read back through the transcript to the set up line and use that as the start |
| (observed) the reason text says the coach cues a move but the transcript has no such words: "the name is not said inside this window" | the reason is a paraphrase written from the picture as well as the speech | copy cue lines from the transcript only; when the name is never said in the window, say so in status |
| (observed) the search for moves not on the list finds nothing in some classes: "new move search returned nothing for CLASS_02 and CLASS_03" | visual and motion search is weak and catches only big changes of body position | treat an empty result as not found; ask the coach to skim gaps between indexed moves |
| upload page asks to sign in or shows an error | the one time upload link expires after 180 seconds | request a new link right before opening it |
| "has not granted vivu.write" | Vivu was connected read only | the user reconnects Vivu with write access |
| a class is rejected by the browser upload tool | the file is above the tool's size limit | the user adds that class in the Vivu web app; do not split or recompress it |
| a result's file name does not match classes.csv | Vivu replaced spaces and punctuation with underscores | match on the name with those characters replaced |
| the same move appears twice for one class | the coach does both sides as separate blocks, or comes back to the move later | keep one row per block if the coach wants both; otherwise keep the first and note the second in status |
| index times are off in the member library | the uploaded file is not the published edit (an intro was trimmed later) | index the exact file members watch, or shift every time by the trimmed length and say so |
| the allowance runs out mid batch | more classes than the plan covers | apply the Step 3 levers, or move to a larger plan |