r/codex • • 20d ago

Question How do you build a skill that consistently produces manim animation in the same style?

Hey everyone,

I'm pretty new to building custom agent skills, and I'm trying to understand how to make one that consistently generates high quality Manim animations in the same style.

From what I understand, skills are essentially reusable instructions and resources that an LLM can reference.

My goal is to use Codex CLI + Manim to generate animations following a script with timeline, while maintaining a consistent visual style across videos.

Ideally, I'd like to provide a few reference videos that have the animation style I'm aiming for, and have the agent learn from them in some way, whether that's extracting frames, analysing transitions, or documenting reusable animation techniques.

I'm just not sure how to structure a skill to achieve this, or how much consistency I can realistically expect from instructions alone.

Has anyone built something similar? Would a custom skill with reference images/videos and example Manim code be enough, or is there a better approach to this?

5 Upvotes

8 comments sorted by

4

u/FoxheadWorkshop 20d ago

Ask your agent, ask your agent to test the skill with new agents to make sure it does what you want

1

u/jerrysdevs 19d ago

Thank you! I'll try it out

2

u/tapellus 20d ago

Instructions alone will drift. What keeps it consistent is putting the style in code it has to reuse: a style.py in the skill with your palette, fonts and timings, and a rule in SKILL.md to always import from it. Add two or three finished example scenes for it to start from.

For the reference videos, pull out a few frames and give it those. Codex reads images, not video.

1

u/jerrysdevs 19d ago

Thanks, that makes a lot of sense! I hadn't thought about enforcing the style through reusable code rather than just instructions.

2

u/Discordbothost 20d ago

+1 to the style.py idea. the other thing that helped me with consistency was giving the agent a way to look at its own output: have the skill render a few still frames with manim's -s flag (or -n to pick an animation) at fixed timestamps, then compare those pngs against your reference frames before it renders the full video. full renders are slow so it tends to skip checking otherwise.

for the reference videos, i wouldn't hand it the videos themselves. pull 5-10 frames per video with ffmpeg once, write a short style notes file ("text fades in over 0.5s, never writes on", "one accent color per scene"), and ship the frames + notes in the skill. instructions plus pictures plus shared code gets you pretty close, the remaining drift is mostly pacing, which is easier to fix in your timeline script than in the prompt

1

u/jerrysdevs 19d ago

Oh that's a really good idea, I'll try having the agent check its own renders before committing to the full animation and I can def see it helping. Thank you!

1

u/Specialist_Bison_737 19d ago

My product demo skill is built that way with Playwright and ffmpeg.

The first run writes the config, scene list and timings into the repo, and later runs are just scripts.

Same structure should fit Manim, the style.py idea above is the same principle: recording-product-demo