Examples¶
Every example in examples/ exists as a Python
script and as the JSON it saves. Run one with uv run python examples/merge_sorted.py. The prompts above each
one are what was typed into Claude Code with the buttery skill installed.
Merging two sorted lists¶

examples/merge_sorted.py: the
merge is simulated in Python, then each step becomes keyframes.
Red-black tree rotation¶

examples/rb_rotation.py: nodes
are groups, edges are lines whose endpoints reference the nodes, so the edges follow the rotation for free.
The before and after trees are two tuples; the script diffs them.
Walking through a function¶

examples/code_walk.py: the
function is revealed a line per beat, then a caption walks through it. Each step selects the part it talks
about with spans whose background tweens in and out, while the syntax coloring underneath stays put.
Syntax theme¶

examples/syntax_theme.py: a
custom theme colors all six token kinds; the legend walks them one per beat and every token of that kind
pulses in the code.
Smaller ones¶
bounce.py: a ball on a sine wave with a ring that follows it by reference.squash_bounce.py: decaying ballistic arcs and squash on impact, all as expressions oftwith no state.launch_demo.json: a scene written directly as JSON.