What a carousel pipeline needs
- BriefWho it is for, the problem, one feature.
- CopyHook, body slides, last slide. Claude Code is good at this.
- LayoutOne HTML page per slide at 1080 x 1350.
- RenderHeadless browser to JPEG, under 8 MB.
- PostMeta app, token, public image URLs, three API calls.
The do-it-yourself way
1. Write the copy
Give Claude Code a short brief: who the app is for, the problem, one feature, the tone. Ask for a hook under 10 words, 5 to 8 body slides with one idea each, and a last slide that earns the save.
Write an Instagram carousel for Receiptly, an iPhone app that scans receipts for freelancers.
Slide 1: a hook under 10 words with a number.
Slides 2-6: one tip each, 6 to 20 words, same structure every slide.
Slide 7: a one-line takeaway and "Comment SCAN for the link".
No em dashes, no hashtags on slides, no promises about money saved.2. Lay out the slides as HTML
Ask for one HTML file per slide at exactly 1080 x 1350 CSS pixels, with your fonts and colours. Tell it to keep 60 px margins and to shrink the text if a line overflows.
3. Render to JPEG
A headless browser (Playwright or Puppeteer) screenshots each page. Save as JPEG, not PNG: the Instagram API takes JPEG only, at most 8 MB per image.
import { chromium } from 'playwright'
const browser = await chromium.launch()
const page = await browser.newPage({ viewport: { width: 1080, height: 1350 } })
await page.goto('file://' + process.cwd() + '/slide-1.html')
await page.screenshot({ path: 'slide-1.jpg', type: 'jpeg', quality: 90 })
await browser.close()4. Post it
Posting by API needs a Meta app, a Business or Creator account, an access token with publishing permission, and a public HTTPS URL for every slide that Meta can download. Then you create one container per slide, a carousel container that lists them, and publish it. Most people stop here and post by hand from their phone.
Where the DIY way breaks
- Fonts: a font that loads late renders as the fallback in the screenshot.
- Text overflow: a long tip runs off the slide, and nobody notices until it is posted.
- Sizes: a square slide 1 crops every other slide to a square.
- Tokens: Instagram tokens expire and need refreshing, and they should never sit in a project folder an agent can read.
- Hosting: slide URLs must stay up until Meta has fetched them, and short-lived links fail with error
9004 / 2207052.
The hookflock way: connect Claude Code to the app
hookflock runs a local MCP server on your Mac. Claude Code calls its tools to read your product, pick a format, write drafts, check originality and schedule posts. The app renders the slides at the right size, and the Instagram token stays on our server, never in your terminal.
claude mcp add --transport http hookflock http://127.0.0.1:41751/mcp --header "Authorization: Bearer <token from hookflock>"You can also install the hookflock skill for Claude Code from the app's Settings. It teaches Claude the workflow: product, then results, then a blueprint, a draft, an originality check and the queue. See the MCP server page for every client.
Prompts to try
- "Make three carousels for my app from the tips-list blueprint and put them in the queue."
- "Check which of last month's posts got the most saves and make the next draft in that format."
- "Remake this post's idea for my app, then run the originality check."
Making, editing and exporting drafts through the MCP server works today, for free. Posting and scheduling are rolling out once Meta approves the app.
Which way to choose
| Do it yourself | hookflock | |
|---|---|---|
| Cost | Your time, plus hosting | Free to make; one payment to post |
| Slide sizes and JPEG export | You write and test it | Built in |
| Text that fits | You check every slide | Checked before export |
| Posting through the API | Your own Meta app and review | Our approved app (once Meta approves it) |
| Works with | Claude Code | Claude Code, Codex, Gemini CLI, Cursor |
Either way, keep the slide count between 6 and 10 (Instagram allows up to 20) and read the hooks guide before you write slide 1.
Questions
- Can Claude Code post to Instagram by itself?
- Not without help. Posting needs a Meta app, an access token and public image URLs. An MCP server such as the one in the Mac app can do that part for it.
- Do I need an Anthropic API key?
- No. hookflock runs the Claude Code you already have, signed in the way you already use it.
- Does this work with Codex or Gemini CLI?
- Yes. The same local MCP server works with Codex, Gemini CLI, Cursor and other MCP clients.
Sources
Facts checked against these pages on . Meta changes its docs often; tell us at hookflock@ascodelabs.com if something is out of date.