Social Media Analyzer skill for Claude

Score social performance: engagement rate, reach, ROI per platform, benchmarks. Load whenever the user asks which platform performs best, if posts are working, or shares social metrics to compare.

Social Media Analyzer SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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.

How to install Social Media Analyzer

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/marketing-skill/skills/social-media-analyzer#main ~/.claude/skills/social-media-analyzer

Codex

npx degit alirezarezvani/claude-skills/marketing-skill/skills/social-media-analyzer#main ~/.codex/skills/social-media-analyzer

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Social Media Analyzer skill do?

Score social performance: engagement rate, reach, ROI per platform, benchmarks. Load whenever the user asks which platform performs best, if posts are working, or shares social metrics to compare.

+How do I install Social Media Analyzer in Claude Code?

Copy the skill folder into ~/.claude/skills/social-media-analyzer, for example with "npx degit alirezarezvani/claude-skills/marketing-skill/skills/social-media-analyzer#main ~/.claude/skills/social-media-analyzer". Claude Code loads it automatically and uses it when a task matches.

+Does Social Media Analyzer work with ChatGPT or Codex?

Yes. Social Media Analyzer uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/social-media-analyzer. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Social Media Analyzer free?

Social Media Analyzer is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related media & video skills

  1. Remotion

    Official

    Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

    google-labs-code/stitch-skills★ 10k
  2. Banana

    Plan, generate, edit, compare, and review images with Google Gemini (Nano Banana) image models, with an exact plan and explicit approval…

    AgriciDaniel/banana-claude★ 1.2k
  3. Video

    When the user wants to create video with AI tools or code, or asks which approach to use (screen recording, AI avatar, generated, or…

    coreyhaines31/marketingskills★ 61k
  4. Swedish Mentor

    Use when someone learning Swedish wants a learning path or YouTube clips and podcasts matched to their CEFR level and skill (SFI, Lätt…

    alirezarezvani/claude-skills★ 30k
  5. Video Content Strategist

    Use for video strategy, scripts, YouTube SEO, short-form pipelines (Reels, TikTok, Shorts) or turning long content into video, before…

    alirezarezvani/claude-skills★ 30k
  6. Youtube Full

    Use for any YouTube URL, video ID or @handle, or a request for transcripts, video search, channel, playlist or new-upload monitoring.

    alirezarezvani/claude-skills★ 30k
  7. Transcribe

    Official

    Transcribe audio files to text with optional diarization and known-speaker hints.

    openai/skills★ 29k
  8. Remotion Captions

    Official

    Transcribing, displaying and animating captions

    remotion-dev/skills★ 7.4k
  9. Remotion Create

    Official

    Create a new Remotion video

    remotion-dev/skills★ 7.4k

See all media & video skills →

More skills from alirezarezvani

  1. Spawn

    Launch the competing agents in isolated worktrees. Use when an AgentHub session is set up.

    alirezarezvani/claude-skills★ 30k
  2. Spec Driven Workflow

    Use when a feature should be specified before coding (acceptance criteria, spec-first, tests from specs).

    alirezarezvani/claude-skills★ 30k
  3. Spec To Repo

    Use when the user says 'build me an app', 'create a project from this spec', 'scaffold a new repo', 'generate a starter', 'turn this idea…

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.