Guide
Instagram carousels with Claude Code
A carousel template does the layout. You, or Claude Code, write the words in one block of text, and one command exports every slide as a 4:5 PNG.
Updated
To make an Instagram carousel with AI, start from a carousel template at 1080 x 1350 (4:5), let Claude Code write your content into the template, and export every slide as a PNG that you upload in order as one post. The template handles the layout, numbering, progress bars and text fitting, so the AI only has to write the words.
This guide explains how such a template works, which design fits which kind of post, and how to export the slides.
How a carousel template works
In Carousel Studio, each design is a HyperFrames project where one second is one slide. The look is fixed in the design; the content lives in one block of structured text (JSON) inside index.html. Changing a carousel means changing that block:
- One object per slide, in order. The first is the cover, the last is the call to action.
- A type per slide. The
typefield picks the layout, such as a cover, a tip or a closing slide. Each design's recipe lists its types and their fields. - Add or remove slides freely. Slide numbers, counters and progress bars update themselves.
- Emphasis with asterisks. Write
*word*and that word gets the design's highlight, color or underline. - Colors in one place. The
themeholds the main colors as hex codes; change one and every slide follows. - Text that fits. Long text shrinks to fit its box, but shorter always reads better on a phone.
Because the content is plain text, Claude Code can write it from your notes, a blog post or a list, and the design keeps every slide consistent.
Pick a design for the job
Motion Cheat Code's Carousel Studio has 20 designs, k01 to k20. Match the design to the kind of post:
| Post | Design | What it does |
|---|---|---|
| Listicle | k01 Listicle | Numbered tips, one per slide |
| Cheat sheet | k15 Save-This Cheat Sheet | Reference slides people keep |
| Case study | k12 Case Study | Problem, plan, result |
| FAQ | k13 FAQ | Questions and answers as a chat |
| Tutorial | k14 Tutorial Screens | Steps with screenshot slots |
| Process | k02 Step by Step | Steps and routines with times |
| Correction | k03 Myth vs Fact | A belief, then the fact |
| Comparison | k08 This vs That | Rounds and a verdict |
The other designs cover quotes, checklists, mistakes, tool stacks, product features, event recaps, announcements and more.
Write the content
You can write the content yourself, but it is faster to hand Claude Code your raw material and the design number. A few rules make slides worth saving:
- Slide 1 is the hook. One promise in a few words, big type.
- One idea per slide. If a slide needs a second paragraph, make it two slides.
- The last slide asks for one thing. Save, share, follow or comment a keyword.
- Real numbers only. The charts in designs such as Stats Story and Case Study need real data. With no real data, leave the chart out.
- Real reviews only. The testimonial design ships with marked placeholders; publish only real words from real customers, shared with permission.
Every brand, person and number in the sample content is made up, so replace all of it before you post.
Add photos and screenshots
Some designs have image slots and show a drawn placeholder until you add your own file. Put the files in the project's assets/ folder and point the field the recipe names at them, for example a screenshot per step in the tutorial design or a product photo in the product design.
Check and export the slides
Run the check first, then export:
npx hyperframes check
node tools/export-slides.mjs --sheet
The export writes slides/slide-01.png, slide-02.png and so on, plus a contact sheet with every slide on one image. Look at the contact sheet: every slide readable, nothing cut off, the cover clear at a glance. Two more options help:
--slides 1,4exports only those slides, handy after a small fix.--out folderwrites the PNGs somewhere else.
If HyperFrames is not installed yet, the first export downloads it with npx, so it needs an internet connection once. To watch the slides while you edit, run npx hyperframes preview and scrub the timeline, one second per slide.
An example prompt
Use carousel design k01. Turn my notes in notes.md into a
listicle: a cover, five tips and a closing slide that asks
people to save the post. One idea per slide, short lines.
Check it, export the slides with a contact sheet, and tell
me what I still need to replace before posting.
Claude Code copies the design, rewrites the content block, runs the check and the export, and reports the folder and the slide count. Upload the PNGs in order as one post and write alt text for the cover. If the carousel goes with a Reel, the covers and thumbnails guide uses the same kind of variables, and Reels safe zones lists the margins for every format.
Carousel Studio is part of the full Motion Cheat Code pack. The free starter kit shows how a prompt becomes a render on a video template first.
Questions
What size should an Instagram carousel slide be?
1080 x 1350 pixels, a 4:5 frame, exported as PNG. Use the same size for every slide in the post, keep 60 px margins on every side, and keep body text at 44 px or more so it reads on a phone.
Does the AI design the slides too?
The template does the design, so every slide stays consistent. Claude Code writes the content, can change the colors in the theme and can add or remove slides. If you want a new look, each design folder also has a recipe for building it from scratch.
Can I edit a carousel without AI?
Yes. Open index.html in any text editor, change the text in the content block, and run the export command in that folder. Claude Code only saves you the typing.
Can I change the number of slides?
Yes. The designs have no fixed slide count. Add or remove slide objects in the content block and the numbering, counters and progress bars update themselves. The export always writes one PNG per slide.