npx skills add ...
npx skills add bradautomates/head-of-content --skill instagram-research
Research high-performing Instagram content (posts and reels) from tracked accounts using Apify's Instagram Scraper. Identifies outlier content, analyzes top 5 videos with AI, and generates reports with actionable hook formulas.
npx skills add bradautomates/head-of-content --skill instagram-research
Research high-performing Instagram posts and reels, identify outliers, and analyze top video content for hooks and structure.
APIFY_TOKEN environment variable or in .envGEMINI_API_KEY environment variable or in .envapify-client and google-genai Python packages.claude/context/instagram-accounts.mdVerify setup:
Parameters:
--type: "posts", "reels", or "stories"--days: Days back to search (default: 30)--limit: Max items per account (default: 50)Output JSON contains:
total_posts: Number of posts analyzedoutlier_count: Number of outliers foundtopics: Top hashtags and keywordsaccounts: List of accounts analyzedoutliers: Array of outlier posts with engagement metricsExtracts from each video:
See the video-content-analyzer skill for full output schema and hook/format types.
Read {RUN_FOLDER}/outliers.json and {RUN_FOLDER}/video-analysis.json, then generate {RUN_FOLDER}/report.md.
Report Structure:
Focus on actionable insights. The "Top Performing Hooks" section with replicable formulas should be prominent.
Full pipeline:
Then read both JSON files and generate the report.
Engagement Score: likes + (3 × comments) + (0.1 × views)
Outlier Detection: Posts with engagement rate > mean + (threshold × std_dev)
Engagement Rate: (score / followers) × 100
RUN_FOLDER="instagram-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && echo "$RUN_FOLDER"python3 .claude/skills/instagram-research/scripts/fetch_instagram.py \
--type reels \
--days 30 \
--limit 50 \
--output {RUN_FOLDER}/raw.jsonpython3 .claude/skills/instagram-research/scripts/analyze_posts.py \
--input {RUN_FOLDER}/raw.json \
--output {RUN_FOLDER}/outliers.json \
--threshold 2.0python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
--input {RUN_FOLDER}/outliers.json \
--output {RUN_FOLDER}/video-analysis.json \
--platform instagram \
--max-videos 5# Instagram Research Report
Generated: {date}
## Top Performing Hooks
Ranked by engagement. Use these formulas for your content.
### Hook 1: {technique} - @{username}
- **Opening**: "{opening_line}"
- **Why it works**: {attention_grab}
- **Replicable Formula**: {replicable_formula}
- **Engagement**: {likes} likes, {comments} comments, {views} views
- [Watch Video]({url})
[Repeat for each analyzed video]
## Content Structure Patterns
| Video | Format | Pacing | Key Retention Techniques |
|-------|--------|--------|--------------------------|
| @username | {format} | {pacing} | {techniques} |
## CTA Strategies
| Video | CTA Type | CTA Text | Placement |
|-------|----------|----------|-----------|
| @username | {type} | "{cta_text}" | {placement} |
## All Outliers
| Rank | Username | Likes | Comments | Views | Engagement Rate |
|------|----------|-------|----------|-------|-----------------|
[List all outliers with metrics and links]
## Trending Topics
### Top Hashtags
[From outliers.json topics.hashtags]
### Top Keywords
[From outliers.json topics.keywords]
## Actionable Takeaways
[Synthesize patterns into 4-6 specific recommendations]
## Accounts Analyzed
[List accounts]RUN_FOLDER="instagram-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python3 .claude/skills/instagram-research/scripts/fetch_instagram.py --type reels -o "$RUN_FOLDER/raw.json" && \
python3 .claude/skills/instagram-research/scripts/analyze_posts.py -i "$RUN_FOLDER/raw.json" -o "$RUN_FOLDER/outliers.json" && \
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py -i "$RUN_FOLDER/outliers.json" -o "$RUN_FOLDER/video-analysis.json" -p instagram