cd /news/ai-agents/we-let-claude-code-edit-our-instagra… · home › topics › ai-agents › article
[ARTICLE · art-178203] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

We let Claude Code edit our Instagram reels. The edit is a TypeScript file

A developer at End Frame built a pipeline in which Claude Code writes video edits as a TypeScript file (montage.ts), renders them locally, then reviews its own output as a frame grid and fixes mistakes before showing the result. The agent produced a 25-second Instagram reel for $0.30 in generations and 23 minutes of waiting, and caught five problems on the 'six hours' reel, while a second reel required eight renders before scheduling. The developer reports that anchoring each character pose to a single still image kept gesture similarity between 0.97 and 0.99, and that word-level voice timestamps drive subtitle and sound-effect placement.

recommendation

Store agent-produced artifacts as diffable code files and have the agent review its own rendered output as a frame grid, re-rendering until defects like clipped text or bad splices are gone.

more in playbook: Designing agent systems
by read6 min views2 publishedNov 29, 2026

I sent two messages and got a finished 25 second reel back, scheduled for Thursday. It cost us $0.30 in generations and 23 minutes of waiting. Nobody opened a timeline. There is one in the app, it just wasn't needed.

What happened in between is that Claude Code wrote the edit as a TypeScript file (montage.ts), rendered it on my Mac, looked at its own render and fixed five things before it showed the result to me. We build the tool that makes this possible, End Frame, so take the enthusiasm with some salt. But the parts that work, and the parts that don't, are worth writing down for anyone who is trying to get an agent to do video.

videos/six-hours/
  script.md
  voice/        # one file per line + word timings
  clips/        # generated gestures
  montage.ts    # the edit
  renders/
characters/kai/
assets/sounds/

That's roughly it. The agent commits to a local git repo after every finished step, so "bring back the script from this morning" is a normal request and the agent just checks out the old file. Rendering is local and free. We only pay for generations (images, video clips, voice), and before each of those the agent tells me the price and waits until I say yes.

Timelines are made for a person with a mouse. Think about what an agent sees in a timeline project: a big blob of state that it can't diff and can't really reason about. A .ts file it can read, compare with last week's version, copy the sound hits from and change one scene without touching the rest. And I can review its change like a pull request.

There was one moment where this paid off very concretely. Our Russian reel about a video editor and a cup of coffee was built on the same idea as the English "six hours" one. Instagram doesn't love near duplicates, so my message to the agent was more or less: keep the voice and everything we paid for, come up with new motion. It rewrote the visual half of montage.ts and didn't touch the audio or the paid clips. With a timeline I'd have rebuilt it by hand.

If you've generated a presenter more than twice, you know the problem. The person in clip three has a slightly different jaw than the person in clip one. Viewers notice, even if they can't say what's wrong.

Our fix is boring and works. Each character pose gets one still image that we call the anchor. Max, the presenter of the coffee reel, sitting in a chair: that's one picture (made with Gemini 3.1 Flash Image). Then the agent generated six gestures from it in Veo 3.1 Lite, $0.12 per take, and every gesture starts on the anchor and ends on it. Because they all begin and end on the same frame you can put them in any order and the cut is invisible. The agent measured each take against the anchor and the similarity came out between 0.97 and 0.99.

Max and his gestures cost $0.79 once. After that he's free in every new reel, which is why the coffee reel itself came to $0.47.

Voice goes first, before any editing (ElevenLabs, with a cloned voice for Max). You'd think the audio file is the point. It isn't. The point is the timestamp of every single word that comes back with it. Subtitles snap to those timings, cuts fall between words, sound effects land on words. The coffee reel has 26 hits made from just eight sounds, things like a stamp on "expensive" and a glitch on "effects".

Music gets generated last, against the rendered edit, so that the track actually changes on the cuts and not half a second off. It gets quieter under the voice and comes back in the s.

This is the part we'd copy into any video pipeline. After rendering, the agent turns the video into a grid of frames and goes looking for dumb mistakes: text clipped at the edge, a subtitle sitting on someone's face, a black frame, a bad splice. Then it edits the file and renders again. On the six hours reel it caught five problems that way. One of them was a "6H" label that you basically couldn't see. The coffee reel went through eight renders before it got scheduled.

When I did find something, I didn't describe it in a paragraph. I put a dot on the frame and wrote one line. At 0:05.6 there was an artifact in Max's eye, so the note was literally "this piece needs to be regenerated, there's an artifact with the eye". The agent redid that one gesture (0.95 to the anchor this time) and left everything else alone. My other note was "I don't like the yellow effect, and this receipt looks cheap". That one cost nothing, since it was only a change to the file.

You really don't want to redo lip sync, so it runs once over the whole clip when the voice is approved and the edit has stopped moving. We use latentsync on fal.ai and it's not perfect. On one close up it left a light patch on a chin. Instead of paying for another pass the agent just made that shot wider until the patch was too small to see. A human editor would have done the same, just later.

Reel Generations Time My messages
Six hours, one message (EN, 25 s) $0.30 (character and five gestures: $0.90 once) 23 min 2
Editor for a coffee (RU, 27.8 s) $0.47 (character and six gestures: $0.79 once) 80 min 21, plus 5 dots on frames

The agent runs on the Claude or ChatGPT subscription you already have, so that isn't included above.

Mac only, Apple Silicon, macOS 14 or newer. Scheduled posting is Instagram only for now. For YouTube you take the 16:9 render from the folder and upload it yourself. Without a Claude or ChatGPT subscription the app will open and render projects but won't make anything from a message. Some requests just don't do much. I once asked to make a presenter "look more natural, less AI" and the new image was nearly the same. The agent told me so, and applied it only because I insisted. And we're in beta, pricing isn't announced.

We published both breakdowns with every message I sent and the cost of each step: six hours, one message and the coffee reel. There's also a first video guide that starts from installing the app. The download is free at end-frame.ai.

I'm curious about one thing. If you already edit video with code, do you keep the edit as data (JSON, EDL) or as actual code? We went with code, and it's not an obvious choice.

This article was written with the help of AI. The numbers, prices and chat messages come from our real project logs.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/we-let-claude-code-e…] indexed:0 read:6min 2026-11-29 · —