PromptShop

Social Media Analyzer

It's designed for social media managers and marketers who need to understand campaign effectiveness and optimize their strategies based on data-driven insights.

Install

npx promptshop add social-media-analyzer

Details

What This Skill Does

This skill analyzes social media campaign performance by calculating engagement metrics, ROI, and comparing results against platform benchmarks. It's designed for social media managers and marketers who need to understand campaign effectiveness and optimize their strategies based on data-driven insights.

When to Use

  • Analyze engagement rate of social media posts.
  • Calculate ROI of social media campaigns.
  • Compare campaign performance across platforms.
  • Identify top and bottom performing content.
  • Validate social media data completeness.
  • Generate recommendations for campaign improvement.

Key Features

Calculates engagement rate using likes, comments, shares, and reach. Computes ROI based on ad spend and campaign results. Validates input data for completeness and accuracy. Compares performance against platform benchmarks. Identifies top and bottom performing posts. Provides a structured analysis workflow.

Manual Installation

Manual installation## Table of Contents

Analysis Workflow

Engagement Metrics ROI Calculation Platform Benchmarks Tools Examples

Analysis Workflow

Analyze social media campaign performance:

Validate input data completeness (reach > 0, dates valid) Calculate engagement metrics per post Aggregate campaign-level metrics Calculate ROI if ad spend provided Compare against platform benchmarks Identify top and bottom performers Generate recommendations Validation: Engagement rate < 100%, ROI matches spend data

Input Requirements

FieldRequiredDescription
platformYesinstagram, facebook, twitter, linkedin, tiktok
posts[]YesArray of post data
posts[].likesYesLike/reaction count
posts[].commentsYesComment count
posts[].reachYesUnique users reached
posts[].impressionsNoTotal views
posts[].sharesNoShare/retweet count
posts[].savesNoSave/bookmark count
posts[].clicksNoLink clicks
total_spendNoAd spend (for ROI)

Data Validation Checks

Before analysis, verify:

[ ] Reach > 0 for all posts (avoid division by zero) [ ] Engagement counts are non-negative [ ] Date range is valid (start < end) [ ] Platform is recognized [ ] Spend > 0 if ROI requested

Engagement Metrics

Engagement Rate Calculation

Engagement Rate = (Likes + Comments + Shares + Saves) / Reach × 100

Metric Definitions

MetricFormulaInterpretation
Engagement RateEngagements / Reach × 100Audience interaction level
CTRClicks / Impressions × 100Content click appeal
Reach RateReach / Followers × 100Content distribution
Virality RateShares / Impressions × 100Share-worthiness
Save RateSaves / Reach × 100Content value

Performance Categories

RatingEngagement RateAction
Excellent> 6%Scale and replicate
Good3-6%Optimize and expand
Average1-3%Test improvements
Poor< 1%Analyze and pivot

ROI Calculation

Calculate return on ad spend:

Sum total engagements across posts Calculate cost per engagement (CPE) Calculate cost per click (CPC) if clicks available Estimate engagement value using benchmark rates Calculate ROI percentage Validation: ROI = (Value - Spend) / Spend × 100

ROI Formulas

MetricFormula
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

Engagement Value Estimates

ActionValueRationale
Like$0.50Brand awareness
Comment$2.00Active engagement
Share$5.00Amplification
Save$3.00Intent signal
Click$1.50Traffic value

ROI Interpretation

ROI %RatingRecommendation
> 500%ExcellentScale budget significantly
200-500%GoodIncrease budget moderately
100-200%AcceptableOptimize before scaling
0-100%Break-evenReview targeting and creative
< 0%NegativePause and restructure

Platform Benchmarks

Engagement Rate by Platform

PlatformAverageGoodExcellent
Instagram1.22%3-6%>6%
Facebook0.07%0.5-1%>1%
Twitter/X0.05%0.1-0.5%>0.5%
Linked In2.0%3-5%>5%
Tik Tok5.96%8-15%>15%

CTR by Platform

PlatformAverageGoodExcellent
Instagram0.22%0.5-1%>1%
Facebook0.90%1.5-2.5%>2.5%
Linked In0.44%1-2%>2%
Tik Tok0.30%0.5-1%>1%

CPC by Platform

PlatformAverageGood
Facebook$0.97<$0.50
Instagram$1.20<$0.70
Linked In$5.26<$3.00
Tik Tok$1.00<$0.50

See references/platform-benchmarks.md for complete benchmark data.

Tools

Calculate Metrics

python scripts/calculate_metrics.py assets/sample_input.json

Calculates engagement rate, CTR, reach rate for each post and campaign totals.

Analyze Performance

python scripts/analyze_performance.py assets/sample_input.json

Generates full performance analysis with ROI, benchmarks, and recommendations.

Output includes: Campaign-level metrics Post-by-post breakdown Benchmark comparisons Top performers ranked Actionable recommendations

Examples

Sample Input

See assets/sample_input.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 } ] }

Sample Output

See assets/expected_output.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%" } } }

Interpretation

The sample campaign shows: Engagement rate 8.36% vs 1.22% benchmark = Excellent (6.8x above average) CTR 1.55% vs 0.22% benchmark = Excellent (7x above average) ROI 660% = Outstanding return on $500 spend Recommendation: Scale budget, replicate successful elements

Reference Documentation

references/platform-benchmarks.md contains:

Engagement rate benchmarks by platform and industry CTR benchmarks for organic and paid content Cost benchmarks (CPC, CPM, CPE) Content type performance by platform Optimal posting times and frequency ROI calculation formulas

Proactive Triggers

  • Engagement rate below platform average → Content isn't resonating.
  • Analyze top performers for patterns.
  • Follower growth stalled → Content distribution or frequency issue.
  • Audit posting patterns. High impressions, low engagement → Reach without resonance. Content quality issue.
  • Competitor outperforming significantly → Content gap.
  • Analyze their successful posts.

Output Artifacts

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

Communication

All output passes quality