# the ai reverse engineering workflow
<!--
ref: @content/youtube/all-about-ai/the-ai-reverse-engineering-workflow
tags: [reverse engineering, AI pipelines, Claude Code, plan mode, video clipping, Gemini 3, ffmpeg, Whisper, YOLO]
version: 2
updated_at: 2026-11-22T04:18:25.729Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=uXtQU9YW_6w)**


*Synthesized from all-about-ai, 2025-12-14; speakers are not named in the source.*

A solo presenter (unnamed) walks through how he breaks a product down into a pipeline, using Opus Clip as the example, and then builds a working approximation with Claude Code.

## Core Thesis
The presenter argues that reverse engineering a product starts with watching what it does and writing it as plain-text notes, one pipeline step per line. Those notes go into Claude Code's plan mode to produce a plan, and the plan becomes a working product. The result needn't match the original's polish. The habit of decomposing tools into steps is what generates new ideas.

## Key Insights
- **Start from the product's visible behavior.** Opus Clip turns one long video into about 10 short clips and accepts a pasted video link. Each visible feature becomes a step in the notes.
- **Write the notes as a pipeline, step by step.** The presenter's notes covered:
  1. Download the YouTube video with `yt-dlp`.
  2. Extract the audio from the video and transcribe it to text with timestamps. He considers this cheaper than analyzing the video frames.
  3. Send the timestamped transcript to Gemini 3 to find interesting clip moments.
  4. Produce a timeline JSON per clip with start and end timestamps, the clip text, and a type tag (e.g., funny, educational).
  5. Cut the original video into the chosen clips with `ffmpeg`.
  6. Convert the roughly 30-second clip from 16:9 to 9:16 vertical.
  7. Burn centered captions in with `ffmpeg` and save a final captioned MP4.
- **Vertical conversion uses face tracking.** YOLO detects faces and their coordinates, and those coordinates go to `ffmpeg` to crop around the face. The presenter stresses that the pipeline must follow the face of the person who is actually talking, not just any detected face.
- **Put reference docs in the project.** He made a `docs` folder and added the Gemini 3 documentation so Claude Code has current API information.
- **Plan mode asks clarifying questions.** Claude Code asked three questions, and he answered:
  - Manual clip selection or auto-pick: manual.
  - Whisper transcription local or OpenAI: local.
  - How to handle multiple visible faces: attempt speaker detection.
- **The generated plan mirrors the notes.** Its steps were: download video, extract audio, transcribe, analyze with Gemini 3 for clips, display suggestions, let the user pick, cut the clip, detect faces, identify the speaker, crop, and burn captions for output. It was written in Python, run as `python main.py <YouTube URL>`.
- **A test run on a roughly 15-minute podcast clip largely worked.** Download, audio extraction, Whisper transcription with word-level start/end times, and Gemini clip suggestions all ran. The suggestions included a funny clip about a UFC fight at the White House and a controversial one. He picked clip two.
- **One iteration was needed.** The first run failed because the YOLO model file wasn't downloaded. After fixing that and rerunning, the output was a vertical clip tracking the speaker. The face framing shifted somewhat when the conversation changed context near the end, but it worked well enough.
- **Captions were skipped in the demo.** He said the burned captions weren't finished and that further polish would close the gap with Opus Clip's more refined output.

## Actionable Takeaways
1. Pick a product you want to understand and write its features as terse notes in a file, one pipeline step per line, naming the tool for each step where you can.
2. Download videos with `yt-dlp`, and transcribe from extracted audio (local Whisper) rather than analyzing video frames.
3. Have an LLM (Gemini 3 in the demo) read the timestamped transcript and propose clip candidates. Save the chosen clip as a timeline JSON with `start`, `end`, `text`, and `type`.
4. Cut clips with `ffmpeg` using the JSON timestamps. For 16:9 to 9:16, detect faces with YOLO, track the active speaker's face coordinates, and pass them to `ffmpeg` to crop.
5. Put API docs in a `docs` folder, start `claude`, switch to plan mode, tag the notes file, and ask for a plan in Python. Answer the clarifying questions, then run it.
6. Expect to iterate: report errors (such as a missing YOLO model) back to Claude Code and rerun.
7. Add burned-in, centered captions with `ffmpeg` as a final step and save a separate final MP4.

## Notable Quotes
> "I think economically it's better to just extract the audio from the video." — the presenter (unnamed)
> "The more things you do like this, the more things you come up with stuff you can do." — the presenter (unnamed)

---

*Related: `@content/youtube/sean-kochel/opus-4-7-is-insanely-powerful-and-insanely-expensive` · `@content/youtube/yifan-bth/i-reverse-engineered-claude-code-learn-these-agent-tricks` · `@content/youtube/yifan-bth/the-complete-claude-code-workflow-90-skip-this` · `@content/youtube/tiago-forte/stop-overthinking-ai-use-this-4-step-framework` · `@content/youtube/starter-story/my-ai-app-made-1000-last-week`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*