Social media campaign analysis and performance tracking
Social media analyzer

Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms.
--- name: "social-media-analyzer" description: Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use when analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards. Also use when the user mentions "social media audit," "engagement rate," or "which platform performs best." triggers: - analyze social media - calculate engagement rate - social media ROI - campaign performance - compare platforms - benchmark engagement - Instagram analytics - Facebook metrics - TikTok performance - LinkedIn engagement --- # Social Media Analyzer
Overview
Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks.
Manual install (npx, ZIP)
npx skills add alirezarezvani/claude-skills --skill social-media-analyzer -g -a claude-codemkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \
| tar -xz -C ~/.claude/skills --strip-components=3 claude-skills-19392f7a0826/marketing-skill/skills/social-media-analyzerNew-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/fc028282fd6f3e921c8b/social-media-analyzer.zip" -OutFile "$env:TEMP\social-media-analyzer.zip"; Expand-Archive "$env:TEMP\social-media-analyzer.zip" -DestinationPath "$HOME\.claude\skills" -ForceConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md8.4 KBHOW_TO_USE.md1.8 KBassets/2 files · 2.3 KBreferences/1 file · 5.9 KBscripts/2 files · 12.6 KB
Read the files here
alirezarezvani/
Show the full text310 lines
Social Media Analyzer
Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks.
Table of Contents
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
| 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) |
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
| 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 |
Performance Categories
| 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 |
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
| 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 |
Engagement Value Estimates
| 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 Interpretation
| 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 Benchmarks
Engagement Rate by Platform
| Platform | Average | Good | Excellent |
|---|---|---|---|
| 1.22% | 3-6% | >6% | |
| 0.07% | 0.5-1% | >1% | |
| Twitter/X | 0.05% | 0.1-0.5% | >0.5% |
| 2.0% | 3-5% | >5% | |
| TikTok | 5.96% | 8-15% | >15% |
CTR by Platform
| Platform | Average | Good | Excellent |
|---|---|---|---|
| 0.22% | 0.5-1% | >1% | |
| 0.90% | 1.5-2.5% | >2.5% | |
| 0.44% | 1-2% | >2% | |
| TikTok | 0.30% | 0.5-1% | >1% |
CPC by Platform
| Platform | Average | Good |
|---|---|---|
| $0.97 | <$0.50 | |
| $1.20 | <$0.70 | |
| $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.
| 1 | |
| 2 | name "social-media-analyzer" |
| 3 | description Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use when analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards. Also use when the user mentions "social media audit," "engagement rate," or "which platform performs best." |
| 4 | triggers |
| 5 | - analyze social media |
| 6 | - calculate engagement rate |
| 7 | - social media ROI |
| 8 | - campaign performance |
| 9 | - compare platforms |
| 10 | - benchmark engagement |
| 11 | - Instagram analytics |
| 12 | - Facebook metrics |
| 13 | - TikTok performance |
| 14 | - LinkedIn engagement |
| 15 | |
| 16 | |
| 17 | # Social Media Analyzer |
| 18 | |
| 19 | Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks. |
| 20 | |
| 21 | |
| 22 | |
| 23 | ## Table of Contents |
| 24 | |
| 25 | [Analysis Workflow] |
| 26 | [Engagement Metrics] |
| 27 | [ROI Calculation] |
| 28 | [Platform Benchmarks] |
| 29 | [Tools] |
| 30 | [Examples] |
| 31 | |
| 32 | |
| 33 | |
| 34 | ## Analysis Workflow |
| 35 | |
| 36 | Analyze social media campaign performance: |
| 37 | |
| 38 | Validate input data completeness (reach > 0, dates valid) |
| 39 | Calculate engagement metrics per post |
| 40 | Aggregate campaign-level metrics |
| 41 | Calculate ROI if ad spend provided |
| 42 | Compare against platform benchmarks |
| 43 | Identify top and bottom performers |
| 44 | Generate recommendations |
| 45 | **Validation:** Engagement rate < 100%, ROI matches spend data |
| 46 | |
| 47 | ### Input Requirements |
| 48 | |
| 49 | | Field | Required | Description | |
| 50 | |-------|----------|-------------| |
| 51 | | platform | Yes | instagram, facebook, twitter, linkedin, tiktok | |
| 52 | | posts[] | Yes | Array of post data | |
| 53 | | posts[].likes | Yes | Like/reaction count | |
| 54 | | posts[].comments | Yes | Comment count | |
| 55 | | posts[].reach | Yes | Unique users reached | |
| 56 | | posts[].impressions | No | Total views | |
| 57 | | posts[].shares | No | Share/retweet count | |
| 58 | | posts[].saves | No | Save/bookmark count | |
| 59 | | posts[].clicks | No | Link clicks | |
| 60 | | total_spend | No | Ad spend (for ROI) | |
| 61 | |
| 62 | ### Data Validation Checks |
| 63 | |
| 64 | Before analysis, verify: |
| 65 | |
| 66 | [ ] Reach > 0 for all posts (avoid division by zero) |
| 67 | [ ] Engagement counts are non-negative |
| 68 | [ ] Date range is valid (start < end) |
| 69 | [ ] Platform is recognized |
| 70 | [ ] Spend > 0 if ROI requested |
| 71 | |
| 72 | |
| 73 | |
| 74 | ## Engagement Metrics |
| 75 | |
| 76 | ### Engagement Rate Calculation |
| 77 | |
| 78 | |
| 79 | Engagement Rate = (Likes + Comments + Shares + Saves) / Reach × 100 |
| 80 | |
| 81 | |
| 82 | ### Metric Definitions |
| 83 | |
| 84 | | Metric | Formula | Interpretation | |
| 85 | |--------|---------|----------------| |
| 86 | | Engagement Rate | Engagements / Reach × 100 | Audience interaction level | |
| 87 | | CTR | Clicks / Impressions × 100 | Content click appeal | |
| 88 | | Reach Rate | Reach / Followers × 100 | Content distribution | |
| 89 | | Virality Rate | Shares / Impressions × 100 | Share-worthiness | |
| 90 | | Save Rate | Saves / Reach × 100 | Content value | |
| 91 | |
| 92 | ### Performance Categories |
| 93 | |
| 94 | | Rating | Engagement Rate | Action | |
| 95 | |--------|-----------------|--------| |
| 96 | | Excellent | > 6% | Scale and replicate | |
| 97 | | Good | 3-6% | Optimize and expand | |
| 98 | | Average | 1-3% | Test improvements | |
| 99 | | Poor | < 1% | Analyze and pivot | |
| 100 | |
| 101 | |
| 102 | |
| 103 | ## ROI Calculation |
| 104 | |
| 105 | Calculate return on ad spend: |
| 106 | |
| 107 | Sum total engagements across posts |
| 108 | Calculate cost per engagement (CPE) |
| 109 | Calculate cost per click (CPC) if clicks available |
| 110 | Estimate engagement value using benchmark rates |
| 111 | Calculate ROI percentage |
| 112 | **Validation:** ROI = (Value - Spend) / Spend × 100 |
| 113 | |
| 114 | ### ROI Formulas |
| 115 | |
| 116 | | Metric | Formula | |
| 117 | |--------|---------| |
| 118 | | Cost Per Engagement (CPE) | Total Spend / Total Engagements | |
| 119 | | Cost Per Click (CPC) | Total Spend / Total Clicks | |
| 120 | | Cost Per Thousand (CPM) | (Spend / Impressions) × 1000 | |
| 121 | | Return on Ad Spend (ROAS) | Revenue / Ad Spend | |
| 122 | |
| 123 | ### Engagement Value Estimates |
| 124 | |
| 125 | | Action | Value | Rationale | |
| 126 | |--------|-------|-----------| |
| 127 | | Like | $0.50 | Brand awareness | |
| 128 | | Comment | $2.00 | Active engagement | |
| 129 | | Share | $5.00 | Amplification | |
| 130 | | Save | $3.00 | Intent signal | |
| 131 | | Click | $1.50 | Traffic value | |
| 132 | |
| 133 | ### ROI Interpretation |
| 134 | |
| 135 | | ROI % | Rating | Recommendation | |
| 136 | |-------|--------|----------------| |
| 137 | | > 500% | Excellent | Scale budget significantly | |
| 138 | | 200-500% | Good | Increase budget moderately | |
| 139 | | 100-200% | Acceptable | Optimize before scaling | |
| 140 | | 0-100% | Break-even | Review targeting and creative | |
| 141 | | < 0% | Negative | Pause and restructure | |
| 142 | |
| 143 | |
| 144 | |
| 145 | ## Platform Benchmarks |
| 146 | |
| 147 | ### Engagement Rate by Platform |
| 148 | |
| 149 | | Platform | Average | Good | Excellent | |
| 150 | |----------|---------|------|-----------| |
| 151 | | Instagram | 1.22% | 3-6% | >6% | |
| 152 | | Facebook | 0.07% | 0.5-1% | >1% | |
| 153 | | Twitter/X | 0.05% | 0.1-0.5% | >0.5% | |
| 154 | | LinkedIn | 2.0% | 3-5% | >5% | |
| 155 | | TikTok | 5.96% | 8-15% | >15% | |
| 156 | |
| 157 | ### CTR by Platform |
| 158 | |
| 159 | | Platform | Average | Good | Excellent | |
| 160 | |----------|---------|------|-----------| |
| 161 | | Instagram | 0.22% | 0.5-1% | >1% | |
| 162 | | Facebook | 0.90% | 1.5-2.5% | >2.5% | |
| 163 | | LinkedIn | 0.44% | 1-2% | >2% | |
| 164 | | TikTok | 0.30% | 0.5-1% | >1% | |
| 165 | |
| 166 | ### CPC by Platform |
| 167 | |
| 168 | | Platform | Average | Good | |
| 169 | |----------|---------|------| |
| 170 | | Facebook | $0.97 | <$0.50 | |
| 171 | | Instagram | $1.20 | <$0.70 | |
| 172 | | LinkedIn | $5.26 | <$3.00 | |
| 173 | | TikTok | $1.00 | <$0.50 | |
| 174 | |
| 175 | See `references/platform-benchmarks.md` for complete benchmark data. |
| 176 | |
| 177 | |
| 178 | |
| 179 | ## Tools |
| 180 | |
| 181 | ### Calculate Metrics |
| 182 | |
| 183 | |
| 184 | python scripts/calculate_metrics.py assets/sample_input.json |
| 185 | |
| 186 | |
| 187 | Calculates engagement rate, CTR, reach rate for each post and campaign totals. |
| 188 | |
| 189 | ### Analyze Performance |
| 190 | |
| 191 | |
| 192 | python scripts/analyze_performance.py assets/sample_input.json |
| 193 | |
| 194 | |
| 195 | Generates full performance analysis with ROI, benchmarks, and recommendations. |
| 196 | |
| 197 | **Output includes:** |
| 198 | Campaign-level metrics |
| 199 | Post-by-post breakdown |
| 200 | Benchmark comparisons |
| 201 | Top performers ranked |
| 202 | Actionable recommendations |
| 203 | |
| 204 | |
| 205 | |
| 206 | ## Examples |
| 207 | |
| 208 | ### Sample Input |
| 209 | |
| 210 | See `assets/sample_input.json`: |
| 211 | |
| 212 | |
| 213 | { |
| 214 | "platform": "instagram", |
| 215 | "total_spend": 500, |
| 216 | "posts": [ |
| 217 | { |
| 218 | "post_id": "post_001", |
| 219 | "content_type": "image", |
| 220 | "likes": 342, |
| 221 | "comments": 28, |
| 222 | "shares": 15, |
| 223 | "saves": 45, |
| 224 | "reach": 5200, |
| 225 | "impressions": 8500, |
| 226 | "clicks": 120 |
| 227 | } |
| 228 | ] |
| 229 | } |
| 230 | |
| 231 | |
| 232 | ### Sample Output |
| 233 | |
| 234 | See `assets/expected_output.json`: |
| 235 | |
| 236 | |
| 237 | { |
| 238 | "campaign_metrics": { |
| 239 | "total_engagements": 1521, |
| 240 | "avg_engagement_rate": 8.36, |
| 241 | "ctr": 1.55 |
| 242 | }, |
| 243 | "roi_metrics": { |
| 244 | "total_spend": 500.0, |
| 245 | "cost_per_engagement": 0.33, |
| 246 | "roi_percentage": 660.5 |
| 247 | }, |
| 248 | "insights": { |
| 249 | "overall_health": "excellent", |
| 250 | "benchmark_comparison": { |
| 251 | "engagement_status": "excellent", |
| 252 | "engagement_benchmark": "1.22%", |
| 253 | "engagement_actual": "8.36%" |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | |
| 259 | ### Interpretation |
| 260 | |
| 261 | The sample campaign shows: |
| 262 | **Engagement rate 8.36%** vs 1.22% benchmark = Excellent (6.8x above average) |
| 263 | **CTR 1.55%** vs 0.22% benchmark = Excellent (7x above average) |
| 264 | **ROI 660%** = Outstanding return on $500 spend |
| 265 | **Recommendation:** Scale budget, replicate successful elements |
| 266 | |
| 267 | |
| 268 | |
| 269 | ## Reference Documentation |
| 270 | |
| 271 | ### Platform Benchmarks |
| 272 | |
| 273 | `references/platform-benchmarks.md` contains: |
| 274 | |
| 275 | Engagement rate benchmarks by platform and industry |
| 276 | CTR benchmarks for organic and paid content |
| 277 | Cost benchmarks (CPC, CPM, CPE) |
| 278 | Content type performance by platform |
| 279 | Optimal posting times and frequency |
| 280 | ROI calculation formulas |
| 281 | |
| 282 | ## Proactive Triggers |
| 283 | |
| 284 | **Engagement rate below platform average** → Content isn't resonating. Analyze top performers for patterns. |
| 285 | **Follower growth stalled** → Content distribution or frequency issue. Audit posting patterns. |
| 286 | **High impressions, low engagement** → Reach without resonance. Content quality issue. |
| 287 | **Competitor outperforming significantly** → Content gap. Analyze their successful posts. |
| 288 | |
| 289 | ## Output Artifacts |
| 290 | |
| 291 | | When you ask for... | You get... | |
| 292 | |---------------------|------------| |
| 293 | | "Social media audit" | Performance analysis across platforms with benchmarks | |
| 294 | | "What's performing?" | Top content analysis with patterns and recommendations | |
| 295 | | "Competitor social analysis" | Competitive social media comparison with gaps | |
| 296 | |
| 297 | ## Communication |
| 298 | |
| 299 | All output passes quality verification: |
| 300 | Self-verify: source attribution, assumption audit, confidence scoring |
| 301 | Output format: Bottom Line → What (with confidence) → Why → How to Act |
| 302 | Results only. Every finding tagged: 🟢 verified, 🟡 medium, 🔴 assumed. |
| 303 | |
| 304 | ## Related Skills |
| 305 | |
| 306 | **social-content**: For creating social posts. Use this skill for analyzing performance. |
| 307 | **campaign-analytics**: For cross-channel analytics including social. |
| 308 | **content-strategy**: For planning social content themes. |
| 309 | **marketing-context**: Provides audience context for better analysis. |
| 310 |
Details
- Updated
- Aug 30, 2026
- License
- MIT
- Stars on the repo
- ★ 26,349
- Checked
- Source
- alirezarezvani/claude-skills ↗
- Creator
- alirezarezvani · 363 listings
Similar skills
See all →
SkillGenerate a branded slide-by-slide LinkedIn carouselGemini carousel
SkillBuild a LinkedIn document postLi carousel
SkillDraft an Instagram caption with the hook in the first 125Instagram Caption Writer
SkillPlan an Instagram carousel slide by slide, up to 10 slidesInstagram Carousel Planner
SkillScore a LinkedIn post using real performance dataPost scorer
SkillVideo caption generatorMore from alirezarezvani
SkillResume a paused experiment/ar:ar-resume — Resume Experiment
SkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboard
SkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loop
SkillRun a single experiment iteration/ar:run — Single Experiment Iteration
SkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experiment
Skill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberation