Build a self-learning content dashboard with AI
The system I built with Claude that auto-pulls my Instagram performance, tells me why each post worked, and writes my next script. Here's how to build your own.
If you're posting content and it's not performing, I was too. So I built a system with Claude that grew this account to 2,200 followers and 350k+ views in about six weeks. Every video I post lands in it automatically, it tells me why each one worked or flopped, and it writes my next script from what's already winning. Here's exactly what it does, and a copy-paste prompt to build your own.
What it does
Analytics. Every post you publish lands here automatically with all its metrics โ views, reach, likes, comments, saves, shares, length, average watch time โ plus an auto-generated transcript of what you actually said on camera. No spreadsheets, no manual entry.
Topics & audience. It breaks down what's driving performance: by topic, by format, by time of day, and by who's watching (country, age, gender). You stop guessing and start seeing which topics and hooks your audience actually saves and shares.
Insights. For every post, it writes a blunt read of why it worked or failed โ anchored to your own numbers. Not "great job," but "this is top-quartile for your account on save rate, and the hook is why." It compares each post to your own median, so the feedback is real.
Self-learning. Those per-post insights roll up into a living "what works" document: a short list of rules, each tied to a real number, that rewrites itself every time new data comes in.
Scriptor. Give it a topic and it writes a new script that follows your proven patterns โ using your best-performing posts as examples and your own voice โ instead of generic AI slop.
The whole thing is a loop: pull metrics โ explain each post vs your baseline โ distill the rules โ the scriptor writes from those rules โ you post โ it measures the result. It gets a little smarter every week.
How it works (keep it simple)
The design that makes this easy to build: one file per post. Each post is a Markdown file with its metrics in the frontmatter (views, saves, watch time, topic, format, hook, date) and its script, transcript, and insight as sections in the body. The files, kept in git, are the database โ no Postgres, no vector store, just a folder you can read and diff.
A few small scripts on a schedule (a few times a day) do the work:
- Pull. Hit the official Instagram Graph API for your own account, grab each post's insights, and get the video length with ffprobe. Convert timestamps to your local time so day-of-week and time-of-day analysis works.
- Derive. Compute the signals the API doesn't give you directly: save rate = saves / views (the best "did people value this" proxy), engagement rate, and hold rate = avg watch time / length.
- Explain. Once a post's numbers have settled (a couple of days), send its metrics + transcript to an LLM along with your account medians, and have it write 3โ6 blunt sentences ending in one testable "try next" line. The median context is the trick โ it's what turns "nice video" into "this beat your average, do more of it."
- Learn. Aggregate save rate and views by topic / format / weekday / daypart, and have the model turn that into a handful of rules tied to numbers, merged into your "what works" doc.
- Write. The scriptor pulls in that doc, your top posts by save rate (with their scripts) as examples, and your recent hooks (so it varies), then drafts a new script for any topic.
The dashboard itself is a read-only view over those files. All the "analytics" are just functions that group the list of posts in memory.
Build it yourself
Paste this into your coding agent (Claude Code, Cursor, whatever you use). It scaffolds the whole system. Swap in your own stack preferences and it will fill in the rest.
Build me a personal content-performance system for a short-form video creator, in two parts: (a) a scheduled ingestion + enrichment pipeline, and (b) a read-only web dashboard.
STORAGE: one Markdown file per post. Frontmatter holds metrics (views, reach, likes, comments, saves, shares, avg_watch_time, duration, new_follows) and dimensions (date, time, weekday, topic, format, delivery_format, hook, cta, caption, permalink). Body sections hold: the written script, the delivered transcript, on-screen text, an auto-generated "Takeaway" insight, and a "Retention" read. Also keep one account.json (follower counts, a 30-day funnel of reach -> accounts engaged -> profile visits -> link taps -> new follows, and follower demographics by country/age/gender) and one what-works.md learning doc with a machine-managed section fenced by comment markers. Keep everything in git. (If you'd rather use SQLite/Postgres, keep the same shape: a posts table, one account snapshot, one learning doc.)
INGESTION (runs on a schedule a few times a day): pull my OWN posts from the official Instagram Graph API using a long-lived access token, plus a monthly token-refresh step. Per post, fetch insights (views, reach, saved, shares, likes, comments) and, best-effort, Reels average watch time. Get video length via ffprobe on the media URL. Convert UTC timestamps to my local date/time/weekday. Compute derived signals: saveRate = saves/views, engagementRate = (likes+comments+saves+shares)/views, holdRate = avg_watch_time/duration. Wrap the run in an orchestrator with a hard per-step timeout, then commit and redeploy.
ENRICHMENT (each step idempotent and gated so unattended reruns converge): transcribe the video (local Whisper or a hosted API), extract on-screen text with a vision model over a few sampled frames, classify topic + format with a cheap constrained-JSON model call when unset, and โ only after a post's metrics have settled (views present, at least 2 days old) โ generate a blunt 3-6 sentence "why it worked" Takeaway that anchors every claim to this post's numbers versus my account medians/quartiles and ends in one testable next step. Add a step that reads a manually-dropped retention-graph screenshot with a vision model into the Retention section (the API has no retention curve).
LEARNING LOOP: each run, aggregate save rate and median views by topic / format / delivery_format / weekday / daypart (exclude reposts; apply a min-views floor on any "top posts" ranking), have an LLM write a numbers-grounded analysis ending in 3-5 rules for the scriptor, and merge it into the marked section of what-works.md WITHOUT touching the hand-written prose.
SCRIPTOR: a form takes a topic plus optional notes. The endpoint injects a voice guide, the what-works doc, my top-N posts by save rate (with their scripts) as exemplars, and my last 5 hooks (to avoid repetition), then returns a structured Markdown script: hook options, script, on-screen text, visual direction, caption, and a "why this should work" that cites the data. It must never fabricate specifics โ leave [FILL: ...] placeholders instead.
DASHBOARD: password-gate the site. Tabs for Overview (stat cards + a views/saves time series + a sortable post grid with every metric as a column), Analytics (lifetime totals that show how many posts contributed to each, a 30-day funnel, save rate by topic, and demographics bar charts), and Insights (the Takeaway feed + the rendered learning doc). Add a post-detail page and the scriptor page. Keep all analytics as pure functions over the list of posts. If my host can't read the content folder at runtime, snapshot it into the build.
Ask me my preferred framework, hosting, and LLM before you start, then scaffold it.
Before you start (the real gotchas)
- Instagram Graph API access is the gate โ sort this first. The per-post insights need a Business or Creator account linked to a Facebook Page, a Meta developer app, and going through app review for the insights permissions. This is the #1 thing people get stuck on. Do it before you build anything else.
- The per-second retention curve is not in any API. Don't hunt for an endpoint that doesn't exist. The workaround: screenshot your in-app retention graph and have a vision model read the shape (where the hook holds, where it drops).
- Average watch time is Reels-only and depends on the API version โ treat it as best-effort, not guaranteed.
- Transcription and frame analysis run locally (Whisper + ffmpeg), which means an always-on machine โ or swap in a hosted transcription API if you'd rather not babysit a laptop.
- Don't scrape at scale. Pulling your own account through the official API is reliable; scraping other accounts violates Instagram's terms and gets blocked fast. Skip it.
Build the pull and the file-per-post store first, get one week of your own data flowing in, and only then add the insight and scriptor layers. The system is only as smart as the data you feed it.
I'm building ProveMyApp so founders like you can connect your apps, track their growth with verified metrics, and build alongside other founders instead of doing it alone.
Explore the library
More guides and playbooks to grow your app