S

social-media-analyzer

Verified

by alirezarezvani · Updated Apr 16, 2026

claude-opus-4-6
2.9Kin2.5Kout
$0.222m 58s

Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use for analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards.

social-mediaanalyticsmarketingroiengagementbenchmarking

See It In Action

1 turns·claude
The project codebase is in your current working directory. Explore the files to understand the code before making changes. marketing dropped insta, linkedin + tiktok csvs for the launch posts — need one readout before this afternoon with bad rows flagged, roi, benchmarks, and best/worst posts

Now let me run both analysis scripts to get the full readout.

Here's your consolidated launch campaign readout:


🚀 Launch Campaign Readout — April 14, 2026

Data Quality: 9 Bad Rows Flagged (out of 24 total)

Post IDPlatformIssue
ig_launch_005InstagramReach = 0 (story with no reach tracked)
ig_launch_006InstagramNegative comments (-4)
ig_launch_007InstagramBad date format (2026/03/16 — slashes instead of dashes)
li_launch_005LinkedInTypo in platform (linkdin)
li_launch_006LinkedInMissing reach (empty field)
li_launch_007LinkedInNegative clicks (-15)
tt_launch_005TikTokNegative shares (-40)
tt_launch_006TikTokReach = 0 (all engagement metrics are 0 too — likely a dead/draft post)
tt_launch_007TikTokBad date (2026-13-18 — month 13 doesn't exist)

⚠️ 37.5% of rows are invalid. Marketing needs to fix these CSVs — the numbers below are based on the 15 clean posts only.


ROI Summary (15 valid posts, $3,005 total spend)

MetricValue
Estimated Value Generated$33,405
ROI+1,011.6%
Cost Per Engagement (CPE)$0.14
Cost Per Click (CPC)$0.55
CPM$7.26

ROI is excellent — the campaign is generating ~$11 in estimated value for every $1 spent.


Platform Benchmark Comparison

PlatformEng. Ratevs. Avg BenchmarkRatingCTRCTR Rating
Instagram7.91%+6.69pp above 1.22% avg🟢 Excellent1.50%🟢 Excellent
LinkedIn6.65%+4.65pp above 2.00% avg🟢 Excellent1.65%🟡 Good
TikTok10.60%+4.64pp above 5.96% avg🟡 Good1.20%🟢 Excellent

All three platforms are beating their average benchmarks by wide margins. Instagram and LinkedIn engagement rated Excellent; TikTok is Good (needs >15% to hit Excellent on that platform's higher bar). CPC of $0.55 beats Instagram's $1.20 benchmark and TikTok's $1.00 benchmark.


Top 3 Posts (by engagement rate)

RankPostPlatformTypeEng. Rate
🥇tt_launch_008TikTokCreator Collab11.16%
🥈tt_launch_003TikTokTrend Remix10.87%
🥉tt_launch_001TikTokShort Video10.73%

Pattern: TikTok swept the top 3. Creator collabs and trend remixes drove the highest engagement — native-feeling content wins.

Bottom 3 Posts

RankPostPlatformTypeEng. Rate
⬇️li_launch_004LinkedInPoll4.22%
⬇️ig_launch_003InstagramStatic Image5.70%
⬇️li_launch_002LinkedInText5.89%

Pattern: Low-effort formats (polls, plain text, static images) underperformed across the board — consistent with platform benchmark tendencies.


Recommendations

  1. Fix the 9 bad rows immediately — the invalid data (typos, negative values, bad dates, zero reach) needs to go back to marketing for correction before any final spend decisions. Re-running after fixes could shift the numbers.
  2. Scale budget on TikTok creator collabs and trend remixes — they're the clear top performers and ROI is already excellent.
  3. Drop or rework static images and plain text posts — they're dragging down the averages. Swap for carousels (Instagram) and documents/video (LinkedIn).
  4. LinkedIn CTR is "Good" but not "Excellent" — test stronger CTAs or link placements to push past the 2% threshold.
Claude Sonnet 4.6

External Tools

ToolType
python3binary

Permissions

ScopeDescription
filesystem:read
process:spawn

SKILL.md

Social Media Analyzer

Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks.


Table of Contents


Analysis Workflow

Analyze social media campaign performance:

  1. Validate input data completeness (reach > 0, dates valid)
  2. Calculate engagement metrics per post
  3. Aggregate campaign-level metrics
  4. Calculate ROI if ad spend provided
  5. Compare against platform benchmarks
  6. Identify top and bottom performers
  7. Generate recommendations
  8. 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:

  1. Sum total engagements across posts
  2. Calculate cost per engagement (CPE)
  3. Calculate cost per click (CPC) if clicks available
  4. Estimate engagement value using benchmark rates
  5. Calculate ROI percentage
  6. 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%
LinkedIn2.0%3-5%>5%
TikTok5.96%8-15%>15%

CTR by Platform

PlatformAverageGoodExcellent
Instagram0.22%0.5-1%>1%
Facebook0.90%1.5-2.5%>2.5%
LinkedIn0.44%1-2%>2%
TikTok0.30%0.5-1%>1%

CPC by Platform

PlatformAverageGood
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.


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

Platform Benchmarks

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 verification:

  • Self-verify: source attribution, assumption audit, confidence scoring
  • Output format: Bottom Line → What (with confidence) → Why → How to Act
  • Results only. Every finding tagged: 🟢 verified, 🟡 medium, 🔴 assumed.

Related Skills

  • social-content: For creating social posts. Use this skill for analyzing performance.
  • campaign-analytics: For cross-channel analytics including social.
  • content-strategy: For planning social content themes.
  • marketing-context: Provides audience context for better analysis.

FAQ

What does social-media-analyzer do?

Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use for analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards.

When should I use social-media-analyzer?

Use it when you need a repeatable workflow that produces text response.

What does social-media-analyzer output?

In the evaluated run it produced text response.

How do I install or invoke social-media-analyzer?

npx skills add https://github.com/alirezarezvani/claude-skills --skill social-media-analyzer

Which agents does social-media-analyzer support?

Claude Code

What tools, channels, or permissions does social-media-analyzer need?

It uses python3; channels commonly include text; permissions include filesystem:read, process:spawn.

Is social-media-analyzer safe to install?

Static analysis marked this skill as low risk; review side effects and permissions before enabling it.

How is social-media-analyzer different from an MCP or plugin?

A skill packages instructions and workflow conventions; tools, MCP servers, and plugins are dependencies the skill may call during execution.

Does social-media-analyzer outperform not using a skill?

About social-media-analyzer

When to use social-media-analyzer

You have campaign or post-level social metrics and want engagement rates and ROI calculated. You want to compare Instagram, Facebook, LinkedIn, TikTok, or Twitter/X performance against benchmarks. You need ranked top and bottom performing posts with recommendations.

When social-media-analyzer is not the right choice

You need the agent to fetch live analytics directly from social platforms or ad accounts. You need content creation or publishing rather than performance analysis.

What it produces

Produces text response.

Install

npx skills add https://github.com/alirezarezvani/claude-skills --skill social-media-analyzer

Invoke: Ask Claude Code to use social-media-analyzer for the task.