I was copying numbers out of the Instagram app by hand and still couldn't tell which hooks worked. So I built a private dashboard. It pulls every post's real stats from Meta's API, transcribes every reel on my laptop, scores each post 0 to 100 against my others, and shows which hook types and topics win. Here's the whole build, so you can make your own.
Want to build it today? Get your token in Step 01, then paste The Prompt into Claude Code. Want to understand it first? Start with What You're Building and read top to bottom.
Build this in a weekend, then go back to posting. Tuning charts for a month instead of shipping content is Building Theater: it feels like progress and it grows nothing.
I'm building a place where you learn to build products that work like a real company's on your own, and get them in front of people who pay, with a CTO who's built two seven-figure software companies in your corner.
Measure. Then Make More.
Free to join the waitlist. Opens at $49/mo, and the price goes up as seats fill, so first in pays the least.
A website only you can open. A sync job asks Instagram for every post and its numbers and saves them in a Postgres database. A script on your laptop downloads each reel, transcribes it and has Claude label the hook. The dashboard scores every post against your others and groups the scores by what you did.
Your top and bottom 10%. Average score by hook type, topic, length, call to action, weekday and time posted. A full list you can sort by any number, colored green and magenta by how each one compares. And a page per post with every stat, its transcript and labels you can fix by hand.
Instagram shows one post at a time and never compares them. You can't sort 180 reels by skip rate, or ask which hook type gets shared most. Once the numbers are in your own database, you can.
You don't need my website to build this. Here's every piece, what it does in Studio, and what it costs. If a term is new, the "Why" line is the one to read.
Next.js is a React framework that serves pages and API routes from one project. TypeScript is JavaScript with types, so your agent catches its own mistakes before you do.
Connect a GitHub repo and every push deploys. It holds your secrets as environment variables and can call your sync route on a schedule.
A hosted Postgres database. It scales to zero when nobody's using it and wakes up when you open the page, which suits a dashboard you check a few times a week.
Meta's official API. With a token for your own account, it lists every post and returns its insights: views, reach, skip rate, watch time, shares and more.
Whisper is OpenAI's open-source speech-to-text model. ffmpeg pulls the audio and the first frame out of each video. Both run locally.
You build Studio with it. Then its command line, claude -p, reads each transcript and first frame and returns the hook, on-screen text, hook type and topic as JSON.
This is the step that takes longest, because Meta's dashboards move around a lot. Your Instagram account must be public and set to Business or Creator. There are two kinds of token. Pick one.
instagram_business_basic and instagram_business_manage_insights.IG) straight into your .env.local.graph.instagram.cominstagram_basic, instagram_manage_insights, pages_show_list and pages_read_engagement.EAA.graph.facebook.com. Your account is found through the Page: /me/accounts.Standard Access covers accounts you own. You don't need App Review, business verification or a live app to read your own insights.
If Business Settings doesn't show your Page, you may be signed in as a different Facebook profile. Switch profiles in the top corner, then assign the Page to the system user.
Leave out publishing, comments and messages. A token that can only read can't post for you if it ever leaks.
# Path A: should print your username curl "https://graph.instagram.com/v27.0/me?fields=username,account_type&access_token=$IG_ACCESS_TOKEN" # Path B: should list your Page with an instagram_business_account id curl "https://graph.facebook.com/v27.0/me/accounts?fields=name,instagram_business_account&access_token=$IG_ACCESS_TOKEN"
Paste the token into .env.local and your host's environment variables, nowhere else. Not into a chat, a doc or a commit. If it ends up somewhere it shouldn't, make a new one and revoke the old one.
Two calls do all the work. /{account}/media lists every post, 50 at a time. /{post-id}/insights returns its numbers. Here's every number a reel gives you, and what I use it for.
GET /v27.0/me/media
?fields=id,media_type,caption,
permalink,media_url,thumbnail_url,
timestamp,is_shared_to_feed
&limit=50
# Follow paging.next until it's gone.
GET /v27.0/{post-id}/insights
?metric=views,reach,likes,comments,
saved,shares,reposts,
total_interactions,
ig_reels_avg_watch_time,
ig_reels_video_view_total_time,
reels_skip_rate
No watch time or skip rate. You get the shared counts plus follows and profile_visits, which reels don't report. Score each format only against itself.
Ask for a metric Instagram won't give for that post and the whole request errors. When a batch fails, retry each metric alone, keep what works, and skip the refused one for the rest of the run.
There's no "trial" field. But a trial reel is never on your grid, so is_shared_to_feed: false is the tell. Score trials against trials: they only reach non-followers.
Reels with licensed music come back with no media_url. Usually they're music with text on screen, so label those from the cover and caption instead.
media_url and thumbnail_url stop working after a few days. Fetch a fresh link right before you download a video, and don't cache thumbnails as if they were permanent.
A reel gets most of its views in its first few days. After day 7 it gains well under 1% a day. So freeze each post's numbers at 7 days, and compare everything at that age.
Follower count, when your followers are online, profile views, website clicks and audience demographics. I don't use them yet, but they're one call away.
Store the raw numbers and work out scores when the page loads. Then a change to the scoring never needs a migration, and you can always rescore history.
-- One row per post. Numbers as JSON, so a new -- metric is a new key, not a new column. create table if not exists studio_posts ( id text primary key, media_type text not null, caption text, permalink text, thumbnail_url text, posted_at timestamptz not null, shared_to_feed boolean, -- false = trial reel metrics jsonb, -- latest metrics_7d jsonb, -- frozen at 7 days synced_at timestamptz, duration_sec real, transcript text, hook text, on_screen_text text, hook_type text, topic text, labeled_at timestamptz, -- by the script edited_at timestamptz -- fixed by hand ); -- The numbers per post per day, for growth curves. create table if not exists studio_snapshots ( post_id text references studio_posts(id) on delete cascade, taken_on date, metrics jsonb not null, primary key (post_id, taken_on) ); -- The token, so the sync can renew it. create table if not exists studio_settings ( key text primary key, value text not null, updated_at timestamptz not null default now() );
DATABASE_URL, and the direct one as DATABASE_URL_UNPOOLED for migrations.alter table … add column if not exists so it's safe to run again.DATABASE_URL, IG_ACCESS_TOKEN, STUDIO_PASSWORD (long and random), CRON_SECRET (openssl rand -hex 32), and IG_USER_ID only if a Path B token sees more than one account.Entering STUDIO_PASSWORD sets an httpOnly cookie holding a SHA-256 hash of it. Every page and server action checks the cookie. Change the password and every browser is signed out. Keep /studio out of robots.txt and your sitemap.
GET /api/studio/sync needs Authorization: Bearer $CRON_SECRET. It lists posts, then fetches insights six at a time. Posts under 60 days old refresh every run; older ones once a week. Give the route a 300-second limit.
I run it as the first step of the label script, so one command after posting does everything. Want it automatic? A Vercel cron is three lines in vercel.json, and Vercel sends CRON_SECRET with each call for you.
# By hand curl -H "Authorization: Bearer $CRON_SECRET" \ https://YOUR-SITE.com/api/studio/sync # Or daily at 11:00 UTC: vercel.json { "crons": [{ "path": "/api/studio/sync", "schedule": "0 11 * * *" }] }
-- Save today's numbers. The first time a post is -- 7+ days old, keep them as its scoring numbers. update studio_posts set metrics = $2::jsonb, metrics_7d = case when metrics_7d is not null then $2::jsonb || metrics_7d when $3 then $2::jsonb -- $3: age >= 7 days end, synced_at = now() where id = $1;
Scores tell you which posts won. Labels tell you why. A script on your laptop asks the site which posts have no label, then does five things to each one. Your server never touches a video file.
media_url and save the video to a temp folder.small model, with the caption as its prompt so it spells your names and tools right.claude -p reads the timed transcript, the caption and the frame, and returns JSON against a schema.# Once brew install ffmpeg python3 -m venv ~/whisper-venv ~/whisper-venv/bin/pip install openai-whisper # What the script runs, per reel ffmpeg -i video.mp4 -vn -ac 1 -ar 16000 audio.wav ~/whisper-venv/bin/python3 -m whisper audio.wav \ --model small --language en --fp16 False \ --output_format json \ --initial_prompt "$CAPTION" # The label, as JSON that matches a schema claude -p "$PROMPT" --output-format json \ --json-schema "$SCHEMA" \ --allowedTools Read --add-dir "$TMP"
Bold claim, Contrarian, Question, Number list, Tool reveal, Result first, Pain point, Story, How-to, Other.
Each gets a one-line definition and an example in the prompt. Fewer, clearer types make better patterns than many fuzzy ones.
Whisper needs more memory and time than a serverless function gets. On your laptop it's free, private and fast enough to run while you do something else.
The first run downloads the model once.
Whisper will mishear things. Each post's page lets you fix the hook, labels and transcript. Those edits set edited_at, and a rerun of the script never overwrites them.
Every number becomes a percentile among your other posts of the same format, so a 0.8% share rate and a 45% skip rate land on the same 0 to 1 scale. Then three groups, blended. My first version scored my best reels in the 20s, so test yours against posts you know did well.
"Usual" is the median views of your previous 20 posts. It keeps an early post that beat a smaller account from losing to every later, bigger one.
Skip rate is ranked lowest-is-best. It leads because, across my trial reels, it predicted how far a reel went better than anything else.
Each one per account reached, weighted in the order Instagram seems to value them. Comments come last because "comment for the link" inflates them.
A reel that reaches strangers rarely keeps a follower-sized like rate. Score only on rates and your viral posts sink to the middle. Reach has to be in the score.
Views, accounts reached and total watch time rank posts almost identically. Weighting them differently changes nothing, so don't spend an afternoon tuning them.
Trial reels go to non-followers, so their views and like rates run far below a normal reel's. Rank their retention and engagement against other trials, or every one looks like a flop.
Hook type, topic, length, whether the caption asks for a comment, weekday and time posted. Grey out any group under 3 posts. One lucky reel isn't a pattern.
A slider limits everything to the last N days. If your account changed a lot, last spring's posts shouldn't decide what works now.
Top fifth strong green, bottom fifth strong magenta, the middle left plain. Always print the number on top, so nobody has to read color alone.
Make an empty folder, open Claude Code in it, and paste this. It builds Studio one step at a time, stops whenever you need to click something in a dashboard, and shows you each piece working before it moves on.
You're helping me build "Studio": a private dashboard that scores every post on my Instagram and shows me which hooks and topics work. I'm [not an engineer / a developer], so explain each step in plain words before you do it. My account: [@handle], a [Business or Creator] account. I post about [your niche]. My computer: [Mac with Apple Silicon / Windows / Linux] My token: [Instagram Login, starts "IG" / System User, starts "EAA"]. It's in .env.local as IG_ACCESS_TOKEN. The stack. Don't swap any of these without asking: - Next.js (App Router) and TypeScript, deployed on Vercel from GitHub - Neon Postgres, through the pg package - The Instagram Graph API v27.0, read-only - Whisper and ffmpeg on my computer for transcripts, and the claude CLI for labels Build it in this order. After each step, show me it working and wait for my OK. 1. Skeleton. A Next.js app with a page at /studio, locked by one password in STUDIO_PASSWORD. Entering it sets an httpOnly cookie holding a SHA-256 hash of the password, checked on every page and server action. No user accounts and no auth library. Keep /studio out of robots.txt and the sitemap. 2. Database. A schema.sql with three tables: studio_posts (id, media_type, caption, permalink, thumbnail_url, posted_at, shared_to_feed, metrics jsonb, metrics_7d jsonb, synced_at, duration_sec, transcript, hook, on_screen_text, hook_type, topic, labeled_at, edited_at), studio_snapshots (post_id, taken_on, metrics) and studio_settings (key, value, updated_at). Idempotent SQL, plus a script that applies it with DATABASE_URL_UNPOOLED. 3. Sync. GET /api/studio/sync, allowed only with "Authorization: Bearer" plus CRON_SECRET, with a 300 second limit: - List every post: id, media_type, caption, permalink, media_url, thumbnail_url, timestamp, is_shared_to_feed. Follow paging. - Fetch insights, six posts at a time. Reels: views, reach, likes, comments, saved, shares, reposts, total_interactions, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reels_skip_rate. Other posts: the shared ones plus follows and profile_visits. - If a batch fails, retry each metric alone and skip any Instagram refuses for the rest of the run. - Save today's numbers and a daily snapshot. The first time a post is 7+ days old, freeze its numbers in metrics_7d. - Refresh posts under 60 days old every run, older ones weekly. - "IG" tokens: graph.instagram.com/me, renewed with refresh_access_token once a week. "EAA" tokens: graph.facebook.com, finding the account through /me/accounts, or IG_USER_ID. 4. Score, in one TypeScript module with tests. For each post, use metrics_7d (or today's numbers, marked "early", if it's under 7 days). Turn every input into a percentile among matured posts of the same format, and for trial reels (is_shared_to_feed false) among other trials, except views, reach and total watch time. Score = 50% reach (views, reach, views divided by the median of the previous 20 posts, total watch time, equal weights) + 25% retention (skip rate 3, lower is better; average watch time 2; views per account reached 1) + 25% engagement per account reached (shares 5, likes 4, saves 3, reposts 2, comments 1). Skip any input a post doesn't have and reweight the rest. 5. Dashboard. Filters for the last N days and hiding trial reels, kept in the URL. Headline stats, my top and bottom 10%, average score by hook type, topic, length, call to action, weekday and time posted (greyed under 3 posts), and a full table sortable by every column with a sticky header. Color each number by fifths: strong green for the top fifth, light green, none, light magenta, strong magenta for the bottom. Use thumbnails; Instagram's image links expire, so plain img tags. 6. Labels. GET and POST /api/studio/labels behind the same secret: GET returns unlabeled posts with a fresh media_url, plus the hook types and topics already in use. Then scripts/label.mjs, run on my computer: call the sync first, then for each post download the video, use ffmpeg for 16 kHz mono audio, the duration and a frame at 0.5s, transcribe with Whisper small (caption as the initial prompt), and run claude -p with a JSON schema to return hook, onScreenText, hookType (from a fixed list of 10 with definitions) and topic (reuse existing topics). POST it back and delete the temp files. Videos with no media_url get labeled from the cover image. 7. Post page. /studio/[id] with every number, its percentile, the transcript, and a form to fix the hook, on-screen text, hook type, topic and transcript. A hand edit sets edited_at, and the label script never overwrites a field I set by hand. Rules: - Never print my token, password or secrets. Read them from .env.local, and give me the list of environment variables to add on Vercel myself. - Read-only on Instagram. Never ask for publishing, comment or message permissions. - Before each step, tell me the plan in 3 to 5 bullets and wait. - When something needs me (Meta, Neon or Vercel dashboards), tell me exactly where to click.
Fill in your handle, your niche, your computer and your token type. Leave the rest as it is.
Do Step 01 before you paste this. It's the one part your agent can't do for you.
Start with mine. Once you have data, look at your five best-known posts and ask the agent why each one ranks where it does.
Edit the list of ten to match how you think about your content, then relabel. Change it again later and relabel again.
Before you trust any pattern, find your five most-viewed reels in the full list. If they're not near the top, the score is wrong, not your memory. Mine were, the first time.
I changed the scoring four times in two days. Because the database only holds what Instagram said, every change rescored every post instantly.
It's a dashboard for one person. One long password and a hashed cookie is enough. The time goes into the score instead.
Transcribing on your laptop means no storage bill, no timeouts and no copies of your videos anywhere new. Only text goes to the database.
The labeler is good, not perfect. Make every label editable, and make sure a rerun can't undo what you fixed.
The point is the next reel. Look at your top 10%, copy what they open with, and check back in a week.
Anybody can build software now. Not everybody can build a business.
Reading about tools is a great way to feel busy. The Lab is for Founders who'd rather get customers: weekly office hours with a CTO who's built two seven-figure software companies, and a room of other Founders who care whether anybody buys what you're making.
Less Theater. More Customers.
Want my 30-Day Launch Plan? It's for Lab members only: validate, plan, build and launch, one week at a time.
See The Solo Founder Lab ▶