Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Social media campaign analysis and performance tracking that calculates engagement rates, ROI, and cross-platform benchmarks. Use for analyzing social performance, calculating engagement rate, or measuring campaign ROI.
.claude/skills/borghei-social-media-analyzer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 172% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 150% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 241% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 383% | 0% |
Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks.
Before analyzing, confirm these inputs. If any is unknown or vague, ASK — do not assume:
Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
Analyze social media campaign performance:
| Field | Required | Description | |-------|----------|-------------| | platform | Yes | instagram, facebook, twitter, linkedin, tiktok | | posts] | Yes | Array of post data | | posts].likes | Yes | Like/reaction count | | posts].comments | Yes | Comment count | | posts].reach | Yes | Unique users reached | | posts].impressions | No | Total views | | posts].shares | No | Share/retweet count | | posts].saves | No | Save/bookmark count | | posts].clicks | No | Link clicks | | total_spend | No | Ad spend (for ROI) |
Before analysis, verify:
Engagement Rate = (Likes + Comments + Shares + Saves) / Reach × 100| Metric | Formula | Interpretation | |--------|---------|----------------| | Engagement Rate | Engagements / Reach × 100 | Audience interaction level | | CTR | Clicks / Impressions × 100 | Content click appeal | | Reach Rate | Reach / Followers × 100 | Content distribution | | Virality Rate | Shares / Impressions × 100 | Share-worthiness | | Save Rate | Saves / Reach × 100 | Content value |
| Rating | Engagement Rate | Action | |--------|-----------------|--------| | Excellent | > 6% | Scale and replicate | | Good | 3-6% | Optimize and expand | | Average | 1-3% | Test improvements | | Poor | < 1% | Analyze and pivot |
Calculate return on ad spend:
| Metric | Formula | |--------|---------| | Cost Per Engagement (CPE) | Total Spend / Total Engagements | | Cost Per Click (CPC) | Total Spend / Total Clicks | | Cost Per Thousand (CPM) | (Spend / Impressions) × 1000 | | Return on Ad Spend (ROAS) | Revenue / Ad Spend |
| Action | Value | Rationale | |--------|-------|-----------| | Like | $0.50 | Brand awareness | | Comment | $2.00 | Active engagement | | Share | $5.00 | Amplification | | Save | $3.00 | Intent signal | | Click | $1.50 | Traffic value |
| ROI % | Rating | Recommendation | |-------|--------|----------------| | > 500% | Excellent | Scale budget significantly | | 200-500% | Good | Increase budget moderately | | 100-200% | Acceptable | Optimize before scaling | | 0-100% | Break-even | Review targeting and creative | | < 0% | Negative | Pause and restructure |
| Platform | Average | Good | Excellent | |----------|---------|------|-----------| | Instagram | 1.22% | 3-6% | >6% | | Facebook | 0.07% | 0.5-1% | >1% | | Twitter/X | 0.05% | 0.1-0.5% | >0.5% | | LinkedIn | 2.0% | 3-5% | >5% | | TikTok | 5.96% | 8-15% | >15% |
| Platform | Average | Good | Excellent | |----------|---------|------|-----------| | Instagram | 0.22% | 0.5-1% | >1% | | Facebook | 0.90% | 1.5-2.5% | >2.5% | | LinkedIn | 0.44% | 1-2% | >2% | | TikTok | 0.30% | 0.5-1% | >1% |
| Platform | Average | Good | |----------|---------|------| | Facebook | $0.97 | <$0.50 | | Instagram | $1.20 | <$0.70 | | LinkedIn | $5.26 | <$3.00 | | TikTok | $1.00 | <$0.50 |
See references/platform-benchmarks.md for complete benchmark data.
bashpython scripts/calculate_metrics.py assets/sample_input.json
Calculates engagement rate, CTR, reach rate for each post and campaign totals.
bashpython scripts/analyze_performance.py assets/sample_input.json
Generates full performance analysis with ROI, benchmarks, and recommendations.
Output includes:
See assets/sample_input.json:
json{ "platform": "instagram", "total_spend": 500, "posts": [ { "post_id": "post_001", "content_type": "image", "likes": 342, "comments": 28, "shares": 15, "saves": 45, "reach": 5200, "impressions": 8500, "clicks": 120 } ] }
See assets/expected_output.json:
json{ "campaign_metrics": { "total_engagements": 1521, "avg_engagement_rate": 8.36, "ctr": 1.55 }, "roi_metrics": { "total_spend": 500.0, "cost_per_engagement": 0.33, "roi_percentage": 660.5 }, "insights": { "overall_health": "excellent", "benchmark_comparison": { "engagement_status": "excellent", "engagement_benchmark": "1.22%", "engagement_actual": "8.36%" } } }
The sample campaign shows:
references/platform-benchmarks.md contains:
| When you ask for... | You get... | |---------------------|------------| | "Social media audit" | Performance analysis across platforms with benchmarks | | "What's performing?" | Top content analysis with patterns and recommendations | | "Competitor social analysis" | Competitive social media comparison with gaps | | "Campaign ROI" | Full ROI calculation with engagement value estimates |
All output passes quality verification:
| Problem | Likely Cause | Solution | |---------|-------------|----------| | Engagement rate appears unrealistically high (>50%) | Reach value is too low relative to engagements, or reach/impressions data is swapped | Verify that reach represents unique users reached (not impressions). Engagement rate = (likes + comments + shares + saves) / reach. If using Instagram data from 2025+, note that Instagram shifted from "impressions" to "views" as primary metric -- ensure you are using the correct field | | Benchmark comparison shows "no_benchmark_available" | Platform name in input JSON does not match expected values | Use exact lowercase platform names: instagram, facebook, twitter, linkedin, tiktok. The analyzer matches against these exact strings | | ROI calculation shows negative despite good engagement | Engagement value estimates are too conservative for your industry | The default engagement value model uses $0.50/like, $2.00/comment, $5.00/share, $3.00/save, $1.50/click. Adjust these values in calculate_metrics.py for your specific vertical. B2B companies typically have higher per-engagement values than B2C | | TikTok metrics show low engagement compared to benchmarks | Using reach-based calculation on a platform where view-based metrics are standard | TikTok's 2026 benchmark engagement rate of 2.50-3.70% is calculated against views, not reach. Ensure your TikTok data uses video views in the reach field for accurate comparison. TikTok engagement rates rose 49% YoY in 2025 | | LinkedIn engagement appears lower than expected | Comparing against outdated benchmarks | LinkedIn's 2026 median engagement rate is approximately 3.85-6.1%, significantly higher than other platforms. Carousel/document posts earn the highest engagement (up to 21.77% median). If your rate is below 2%, focus on conversation-starting content rather than corporate announcements | | Instagram metrics declining despite consistent content quality | Algorithm and metric definition changes in 2025-2026 | Instagram shifted to "Views" as its primary metric across all formats (Reels, Stories, posts), replacing "Impressions" and "Plays." Carousel posts now earn the most engagement. Meta plans to replace reach with "Viewers" metric in Graph API by June 2026. Adapt your data collection accordingly | | Campaign analysis has too few posts for reliable insights | Small sample size produces unreliable averages | Minimum 10 posts recommended for meaningful analysis. The analyze_performance.py script flags campaigns with fewer than 10 posts. For statistical reliability, aim for 30+ posts per analysis period |
In Scope:
Out of Scope:
Platform API Changes (2025-2026):
| Integration | Purpose | How to Connect | |-------------|---------|----------------| | Meta Business Suite | Export Instagram and Facebook campaign data | Export post-level metrics (likes, comments, shares, reach, impressions, clicks) as JSON for calculate_metrics.py and analyze_performance.py. Note: "Views" is replacing "Impressions" in 2026 | | LinkedIn Campaign Manager | Export LinkedIn ad and organic performance data | Export engagement metrics per post. LinkedIn's native analytics now includes "Viewer" demographics and AI search visibility data | | TikTok Business Center | Export TikTok campaign performance data | Export video-level metrics. Use video views as the reach equivalent for engagement rate calculation | | Google Analytics 4 (GA4) | Track social traffic and conversions on your website | Connect social campaign UTM parameters to GA4 to measure downstream conversions. Use campaign-analytics skill for full attribution | | campaign-analytics skill | Cross-channel ROI comparison | Feed social media ROI data into campaign_roi_calculator.py alongside other channels for unified portfolio analysis | | content-creator skill | Content optimization based on performance data | Use top-performing post analysis to inform content strategy. Apply brand_voice_analyzer.py to ensure social content matches brand voice | | marketing-demand-acquisition skill | Social as demand gen channel | Integrate social performance data into demand gen channel mix evaluation. Use CAC data from social alongside other acquisition channels |
Type: Python library (imported, not CLI)
Classes:
SocialMediaMetricsCalculator(campaign_data: Dict)Constructor Input: {"platform": "instagram", "total_spend": 500, "posts": [{"post_id": "str", "content_type": "str", "likes": int, "comments": int, "shares": int, "saves": int, "reach": int, "impressions": int, "clicks": int}]}
Key Methods:
| Method | Parameters | Returns | |--------|-----------|---------| | calculate_engagement_rate() | post: Dict (likes, comments, shares, saves, reach) | Engagement rate as percentage (float). Formula: (likes + comments + shares + saves) / reach 100 | | calculate_ctr() | clicks: int, impressions: int | CTR as percentage (float) | | calculate_campaign_metrics() | None (uses constructor data) | Dict with platform, total_posts, total_engagements, total_reach, total_impressions, total_clicks, avg_engagement_rate, ctr | | calculate_roi_metrics() | None (uses constructor data) | Dict with total_spend, cost_per_engagement, cost_per_click, estimated_value (at $2.50/engagement default), roi_percentage | | identify_top_posts() | metric: str = 'engagement_rate', limit: int = 5 | Sorted list of top posts by specified metric. Supported metrics: engagement_rate, likes, comments, shares, clicks | | analyze_all() | None | Combined dict of campaign_metrics, roi_metrics, and top_posts |
Type: Python library (imported, not CLI)
Classes:
PerformanceAnalyzer(campaign_metrics: Dict, roi_metrics: Dict)Built-in Benchmarks: Engagement rate and CTR benchmarks for facebook, instagram, twitter, linkedin, tiktok.
Key Methods:
| Method | Parameters | Returns | |--------|-----------|---------| | benchmark_performance() | None | Dict with engagement_status, engagement_benchmark, engagement_actual, ctr_status, ctr_benchmark, ctr_actual. Status values: excellent (>=1.5x benchmark), good (>=benchmark), below_average | | generate_recommendations() | None | List of actionable recommendation strings based on engagement rate, CTR, CPC, ROI, and post volume thresholds | | generate_insights() | None | Dict with overall_health (excellent/good/needs_improvement), benchmark_comparison, recommendations, key_strengths, areas_for_improvement |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→fail | 2,347 | 4,736 | +102% | 1 | 1 | 0% | 309 | 5,450 | +1664% | 0 | 0 | — |
case-01 | fail→pass | 25,910 | 24,041 | -7% | 1 | 1 | 0% | 5,668 | 10,280 | +81% | 0 | 0 | — |
case-02 | fail→pass | 17,583 | 22,844 | +30% | 1 | 1 | 0% | 3,436 | 9,357 | +172% | 0 | 0 | — |
case-03 | fail→pass | 17,806 | 20,257 | +14% | 1 | 1 | 0% | 3,513 | 8,774 | +150% | 0 | 0 | — |
case-04 | fail→fail | 16,380 | 34,423 | +110% | 1 | 1 | 0% | 3,152 | 9,932 | +215% | 0 | 0 | — |
case-06 | fail→fail | 25,344 | 21,653 | -15% | 1 | 1 | 0% | 3,990 | 8,227 | +106% | 0 | 0 | — |
case-07 | pass→pass | 9,184 | 3,637 | -60% | 1 | 1 | 0% | 1,466 | 5,382 | +267% | 0 | 0 | — |
case-08 | pass→pass | 5,393 | 5,734 | +6% | 1 | 1 | 0% | 1,062 | 5,860 | +452% | 0 | 0 | — |
case-09 | pass→pass | 7,947 | 5,255 | -34% | 1 | 1 | 0% | 1,524 | 5,638 | +270% | 0 | 0 | — |
case-10 | fail→pass | 11,596 | 5,055 | -56% | 1 | 1 | 0% | 1,690 | 5,756 | +241% | 0 | 0 | — |
case-11 | pass→pass | 3,939 | 2,821 | -28% | 1 | 1 | 0% | 546 | 5,214 | +855% | 0 | 0 | — |
case-12 | fail→pass | 8,201 | 8,511 | +4% | 1 | 1 | 0% | 1,327 | 6,410 | +383% | 0 | 0 | — |
case-13 | pass→pass | 2,137 | 6,306 | +195% | 1 | 1 | 0% | 377 | 5,926 | +1472% | 0 | 0 | — |
case-14 | pass→pass | 2,336 | 6,438 | +176% | 1 | 1 | 0% | 440 | 5,815 | +1222% | 0 | 0 | — |
case-15 | pass→pass | 4,548 | 4,246 | -7% | 1 | 1 | 0% | 749 | 5,588 | +646% | 0 | 0 | — |
case-16 | pass→pass | 3,952 | 3,358 | -15% | 1 | 1 | 0% | 648 | 5,327 | +722% | 0 | 0 | — |
case-17 | fail→pass | 9,740 | 3,083 | -68% | 1 | 1 | 0% | 1,634 | 5,308 | +225% | 0 | 0 | — |
case-18 | fail→pass | 9,291 | 3,093 | -67% | 1 | 1 | 0% | 1,530 | 5,313 | +247% | 0 | 0 | — |
case-19 | fail→fail | 14,644 | 26,731 | +83% | 1 | 1 | 0% | 2,546 | 7,696 | +202% | 0 | 0 | — |
case-20 | pass→pass | 9,867 | 11,574 | +17% | 1 | 1 | 0% | 1,619 | 6,782 | +319% | 0 | 0 | — |
case-21 | pass→pass | 8,466 | 9,306 | +10% | 1 | 1 | 0% | 1,320 | 6,208 | +370% | 0 | 0 | — |
case-22 | fail→pass | 11,098 | 7,980 | -28% | 1 | 1 | 0% | 2,108 | 6,087 | +189% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +36 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.