דוח אישי שמראה לך איזה Reel באמת עבד, איזה הוק לא תפס, ומה האלגוריתם דחף — מתוך הנתונים הפרטיים של אינסטגרם, בלי לכתוב שורת קוד.
נכנסים ל-composio.dev ועושים הרשמה חינמית. זה לוקח דקה.
אחרי ההרשמה תגיע לדאשבורד.
פותחים את אפליקציית אינסטגרם בנייד:
פותחים את Claude Code Desktop שכבר מותקן אצלך. אם הוא עדיין לא מחובר למנוי שלך — הוא יבקש להתחבר. עוקבים אחרי התהליך בדפדפן ויש לך כניסה.
על שולחן העבודה (Desktop), יוצרים תיקייה חדשה בשם ig-report.
ב-Claude Code Desktop:
כל מה שיקרה מעכשיו — יקרה בתוך התיקייה הזאת. אם משהו ישתבש, פשוט תמחק את התיקייה ותתחיל מחדש.
זה השלב שבדרך כלל מבלבל אנשים — אז אנחנו עושים אותו פשוט.
פשוט תגיד ל-Claude Code בצ'אט:
צור קובץ בשם .env בתיקייה הזו עם השורה הבאה: COMPOSIO_API_KEY=PASTE_YOUR_KEY_HERE
אחרי שהקובץ נוצר — פותחים אותו, ובמקום PASTE_YOUR_KEY_HERE מדביקים את המפתח שהעתקת מ-Composio בשלב 1.
COMPOSIO_API_KEY= ואחר כך המפתח. שומרים את הקובץ.
זה הקסם. אתה מעתיק את הפרומפט הבא, מדביק לתוך הצ'אט של Claude Code — והוא בונה לך הכל.
Build me a personal Instagram Reels analytics report.
WHAT IT SHOULD DO:
A small TypeScript script that connects to my Instagram via Composio's hosted MCP, pulls my last 14 days of Reels with their private insights, and generates a self-contained HTML report I can open in a browser.
TECH STACK:
- TypeScript with tsx (no build step)
- @anthropic-ai/claude-agent-sdk for the agent
- @composio/core for Instagram tool access
- Use Composio's hosted Tool Router — call composio.create(userId) to get a fresh MCP URL, pass it as an HTTP MCP server to the Agent SDK
- dotenv for the .env file
ENV VARS:
There's a .env file in this folder with COMPOSIO_API_KEY. Don't ask me for keys directly, always direct to paste into the file if needed. Don't print them.
WHAT TO BUILD:
1. agent.ts — uses the Claude Agent SDK with model "claude-sonnet-4-6". Instructs Claude to:
a. Call INSTAGRAM_GET_IG_USER_MEDIA with ig_user_id="me", limit=25. Filter to media_type REELS or VIDEO from the last 14 days.
b. For each reel, call INSTAGRAM_GET_IG_MEDIA_INSIGHTS with metric set: "reach,views,likes,comments,shares,saved,total_interactions,ig_reels_avg_watch_time". If a metric errors, retry without it.
c. Save each post's id, caption (first 80 chars), permalink, and thumbnail_url.
2. render.ts — reads the data and computes:
- watch_s = ig_reels_avg_watch_time ÷ 1000
- hook_rate = watch_s ÷ duration_s
- replay_rate = views ÷ reach
- share_pct = shares ÷ reach × 100
- save_pct = saved ÷ reach × 100
- hook_score = watch_s × √reach × (1 + share_pct/100 + save_pct/200)
Then download each post's thumbnail to ./thumbs/<post_id>.jpg via curl.
3. report.html — a self-contained light-mode HTML file. Embed all thumbnails inline as base64. Sections:
- Headline insight at top: top reel's reach divided by median reach as a multiplier.
- Pattern callout: words appearing 2+ times in top-5 captions but never in bottom-5 (and vice versa).
- 3-panel action grid: 🟢 Do More (top 3 by hook_score), 🔴 Stop (bottom 3), 🟡 Fix (hook_rate top quartile but watch_s bottom quartile).
- Quick stats: reach concentration %, watch-time gap, strong-hook count (watch ≥ 12s), replay-winner count (hook ≥ 1.2).
- Full ranked list. Each post card shows:
* Clickable thumbnail (linking to permalink)
* Caption + colored auto-diagnosis tag: "Winner — all three axes worked" / "Strong hook, IG didn't push it" / "People clicked, content didn't hold" / "Sharable concept, weak delivery" / "Weak on all axes — kill this format" / "Hook landed" / "Underperformed"
* 3 normalized 0–100 axis bars: Hook (watch_s), Reach, Viral (shares+saves)
* The hook_score number on the right
* "open ↗" link to the IG post
Top 3 cards have green left border, bottom 3 red, packaging-mismatches amber.
4. README.md with one-line instructions to re-run.
FIRST RUN BEHAVIOR:
On first run, Composio will print an Instagram authorization link in the terminal. I click it, log into Instagram, approve, and come back. Then re-run. Connection persists from then on.
Build and ship. Don't ask clarifying questions. When done, run it once.
Claude יתחיל לבנות. זה לוקח כמה דקות. הוא יתקין חבילות, יכתוב את הקבצים, וירוץ את הסקריפט.
בפעם הראשונה שהסקריפט רץ, Composio יציג בטרמינל קישור ארוך שמתחיל ב-https://connect.composio.dev/link/...
הפעם הוא יביא את כל הנתונים. בסוף תופיע בתיקייה report.html — לחיצה כפולה, והדוח נפתח בדפדפן.
לא עוד גרפים יפים שלא אומרים כלום
חייב להיות Business או Creator (לא חשבון Personal). שינוי חינמי ולוקח 30 שניות מתוך אפליקציית אינסטגרם — מסביר את זה בשלב 02.
פשוט תכתוב ל-Claude Code "יש לי שגיאה" ותדביק את הטקסט מהטרמינל. הוא יבין ויתקן. אם זה ממש נתקע — תמחק את התיקייה ותתחיל מחדש מהפרומפט בשלב 06.
הכל אצלך. הקובץ .env, ה-thumbnails, וה-report.html כולם בתיקייה שלך על המחשב. שום מידע לא הולך לשום שרת חיצוני חוץ מ-Composio (שזה רק הצינור לאינסטגרם).
Composio חינם בשימוש אישי. Claude Pro/Max זה המנוי שיש לך כבר. אין עלויות נוספות.
בכיף. אחרי שזה בנוי פעם אחת — להריץ זה דקה. תפתח את התיקייה ב-Claude Code ותגיד "רוץ שוב". יש מי שמריץ כל יום ראשון.
כן, וזה אחד הדברים היפים. כל אחד מהמשפטים האלה זה פרומפט אחד שתדביק לתוך Claude Code:
· "מתי הכי כדאי לי לפרסם?" — Claude יוסיף סעיף שמראה את שלוש השעות הכי טובות בכל יום בשבוע.
· "תייג את הפוסטים שלי לפי סוג הוק" — challenge / curiosity / list / story — ויראה איזה פורמט מנצח.
· "שלח לי את הדוח כל ראשון לאימייל" — אוטומציה מלאה.