alirezarezvani/claude-code-skill-factory / generated-skills/content-trend-researcher
content-trend-researcher
VerifiedAdvanced content and topic research skill that analyzes trends across Google Analytics, Google Trends, Substack, Medium, Reddit, LinkedIn, X, blogs, podcasts, and YouTube to generate data-driven article outlines based on user intent analysis
| File | Kind | Size |
|---|---|---|
| HOW_TO_USE.md | markdown | 9.0 KB |
| SKILL.md | skill md | 8.0 KB |
| expected_output.json | config | 15.3 KB |
| intent_analyzer.py | script | 15.8 KB |
| outline_generator.py | script | 30.2 KB |
| platform_insights.py | script | 30.2 KB |
| sample_input.json | config | 606 B |
| trend_analyzer.py | script | 17.9 KB |
trend_analyzer.py
View on GitHub"""
Trend Analyzer for Content Research
Analyzes trends across multiple platforms to identify content opportunities.
"""
from typing import Dict, List, Any, Tuple
from datetime import datetime, timedelta
import json
class TrendAnalyzer:
"""Analyzes content trends across multiple platforms."""
# Platform trend signals (weight factors for opportunity scoring)
PLATFORM_WEIGHTS = {
"Google Trends": 1.5,
"Google Analytics": 1.3,
"YouTube": 1.2,
"Reddit": 1.1,
"Medium": 1.0,
"Substack": 1.0,
"LinkedIn": 0.9,
"X": 0.9,
"Blogs": 0.8,
"Podcasts": 0.7
}
def __init__(self, topic: str, platforms: List[str], analysis_depth: str = "standard"):
"""
Initialize the trend analyzer.
Args:
topic: The main topic to research
platforms: List of platforms to analyze
analysis_depth: quick, standard, or deep
"""
self.topic = topic
self.platforms = platforms
self.analysis_depth = analysis_depth
def analyze_trends(self) -> Dict[str, Any]:
"""
Perform comprehensive trend analysis.
Returns:
Complete trend analysis report
"""
return {
"topic_overview": self._generate_topic_overview(),
"platform_insights": self._analyze_all_platforms(),
"trend_timeline": self._generate_trend_timeline(),
"competition_analysis": self._analyze_competition(),
"opportunity_score": self._calculate_opportunity_score()
}
def _generate_topic_overview(self) -> Dict[str, Any]:
"""Generate high-level topic overview with trend indicators."""
# Simulated trend calculation (in production, would use real API data)
search_volume = self._estimate_search_volume()
trend_direction = self._determine_trend_direction()
competition = self._assess_competition_level()
return {
"topic": self.topic,
"search_volume_monthly": search_volume,
"trend_direction": trend_direction,
"trend_velocity": self._calculate_trend_velocity(),
"competition_level": competition,
"seasonality": self._detect_seasonality(),
"market_maturity": self._assess_market_maturity(),
"analysis_date": datetime.now().strftime("%Y-%m-%d")
}
def _analyze_all_platforms(self) -> List[Dict[str, Any]]:
"""Analyze trends across all specified platforms."""
platform_data = []
for platform in self.platforms:
if platform == "Google Trends":
platform_data.append(self._analyze_google_trends())
elif platform == "Reddit":
platform_data.append(self._analyze_reddit())
elif platform == "YouTube":
platform_data.append(self._analyze_youtube())
elif platform == "Medium":
platform_data.append(self._analyze_medium())
elif platform == "Substack":
platform_data.append(self._analyze_substack())
elif platform == "LinkedIn":
platform_data.append(self._analyze_linkedin())
elif platform == "X":
platform_data.append(self._analyze_x_twitter())
elif platform == "Blogs":
platform_data.append(self._analyze_blogs())
elif platform == "Podcasts":
platform_data.append(self._analyze_podcasts())
elif platform == "Google Analytics":
platform_data.append(self._analyze_google_analytics())
return platform_data
def _analyze_google_trends(self) -> Dict[str, Any]:
"""Analyze Google Trends data for the topic."""
return {
"platform": "Google Trends",
"trending_queries": [
{"query": f"{self.topic} tutorial", "growth": "+150%"},
{"query": f"best {self.topic} tools", "growth": "+85%"},
{"query": f"{self.topic} guide 2025", "growth": "+120%"}
],
"related_topics": [
{"topic": f"{self.topic} automation", "relevance": 95},
{"topic": f"{self.topic} best practices", "relevance": 88},
{"topic": f"{self.topic} for beginners", "relevance": 82}
],
"regional_interest": [
{"region": "United States", "interest": 100},
{"region": "United Kingdom", "interest": 75},
{"region": "Canada", "interest": 68}
],
"trend_status": "Rising",
"peak_interest_period": "Last 3 months"
}
def _analyze_reddit(self) -> Dict[str, Any]:
"""Analyze Reddit discussions and engagement."""
return {
"platform": "Reddit",
"relevant_subreddits": [
{
"subreddit": f"r/{self.topic.replace(' ', '')}",
"subscribers": "250K",
"activity": "High",
"avg_upvotes": 450
},
{
"subreddit": "r/learnprogramming" if "programming" in self.topic.lower() else f"r/{self.topic.split()[0]}",
"subscribers": "500K",
"activity": "Very High",
"avg_upvotes": 680
}
],
"trending_discussions": [
{
"title": f"How I mastered {self.topic} in 30 days",
"upvotes": 2400,
"comments": 180,
"engagement_rate": "High"
},
{
"title": f"The ultimate {self.topic} resource list",
"upvotes": 1800,
"comments": 95,
"engagement_rate": "High"
}
],
"common_questions": [
f"What are the best resources for learning {self.topic}?",
f"How long does it take to get good at {self.topic}?",
f"Is {self.topic} worth learning in 2025?"
],
"sentiment": "Positive (78%)"
}
def _analyze_youtube(self) -> Dict[str, Any]:
"""Analyze YouTube video performance and trends."""
return {
"platform": "YouTube",
"top_videos": [
{
"title": f"{self.topic} Complete Guide 2025",
"views": "850K",
"upload_date": "2 months ago",
"duration": "45:30",
"engagement": "High (12K likes, 800 comments)"
},
{
"title": f"I tried {self.topic} for 100 days",
"views": "1.2M",
"upload_date": "1 month ago",
"duration": "18:45",
"engagement": "Very High (28K likes, 1.5K comments)"
}
],
"content_formats": [
{"format": "Tutorial/How-to", "performance": "Excellent"},
{"format": "Case study", "performance": "Good"},
{"format": "Review/Comparison", "performance": "Excellent"}
],
"optimal_video_length": "15-25 minutes for tutorials, 8-12 for quick tips",
"trending_angles": [
f"{self.topic} for beginners",
f"{self.topic} mistakes to avoid",
f"Advanced {self.topic} techniques"
]
}
def _analyze_medium(self) -> Dict[str, Any]:
"""Analyze Medium article performance."""
return {
"platform": "Medium",
"top_articles": [
{
"title": f"Everything I Learned About {self.topic}",
"claps": "4.2K",
"reading_time": "12 min",
"responses": 85
},
{
"title": f"The {self.topic} Playbook Nobody Talks About",
"claps": "3.8K",
"reading_time": "8 min",
"responses": 62
}
],
"popular_tags": [
self.topic.replace(" ", "").lower(),
"productivity",
"technology",
"self-improvement"
],
"optimal_length": "1200-1800 words (8-12 min read)",
"best_headlines": "Listicles, personal stories, controversial takes"
}
def _analyze_substack(self) -> Dict[str, Any]:
"""Analyze Substack newsletter trends."""
return {
"platform": "Substack",
"trending_newsletters": [
{
"name": f"The {self.topic} Newsletter",
"subscribers": "25K+",
"growth": "Fast",
"frequency": "Weekly"
}
],
"popular_topics": [
f"{self.topic} industry news",
f"{self.topic} case studies",
"Expert interviews and insights"
],
"engagement_patterns": {
"open_rate": "40-45% (above average)",
"click_rate": "8-12%",
"best_send_time": "Tuesday/Wednesday 9-11 AM"
}
}
def _analyze_linkedin(self) -> Dict[str, Any]:
"""Analyze LinkedIn content performance."""
return {
"platform": "LinkedIn",
"trending_posts": [
{
"type": "Carousel",
"topic": f"5 {self.topic} trends for 2025",
"engagement": "15K reactions, 800 comments"
},
{
"type": "Text post with story",
"topic": f"How {self.topic} transformed our business",
"engagement": "8K reactions, 450 comments"
}
],
"content_formats": [
{"format": "Carousels", "performance": "Excellent"},
{"format": "Personal stories", "performance": "Very Good"},
{"format": "Data-driven posts", "performance": "Good"}
],
"best_practices": [
"Hook in first line",
"Personal angle + business lesson",
"Include data/metrics when possible"
]
}
def _analyze_x_twitter(self) -> Dict[str, Any]:
"""Analyze X (Twitter) trends and engagement."""
return {
"platform": "X (Twitter)",
"trending_hashtags": [
f"#{self.topic.replace(' ', '')}",
f"#{self.topic.split()[0]}Tips",
"#TechTrends"
],
"viral_threads": [
{
"topic": f"10 {self.topic} lessons that changed my career",
"engagement": "5K retweets, 18K likes"
}
],
"optimal_format": "Thread format (8-12 tweets)",
"best_posting_times": "8-10 AM, 12-1 PM, 5-6 PM EST"
}
def _analyze_blogs(self) -> Dict[str, Any]:
"""Analyze top-ranking blog content."""
return {
"platform": "Blogs",
"top_ranking_content": [
{
"title": f"The Complete {self.topic} Guide",
"domain_authority": 75,
"backlinks": "1.2K",
"estimated_traffic": "25K/month"
},
{
"title": f"{self.topic}: Beginner to Advanced",
"domain_authority": 68,
"backlinks": "850",
"estimated_traffic": "18K/month"
}
],
"content_characteristics": [
"Comprehensive guides (3000+ words)",
"Step-by-step tutorials with screenshots",
"Comparison articles",
"Case studies with metrics"
],
"seo_insights": {
"avg_word_count": "2800 words",
"avg_images": "12-15",
"internal_links": "8-10",
"external_links": "5-8"
}
}
def _analyze_podcasts(self) -> Dict[str, Any]:
"""Analyze podcast trends and topics."""
return {
"platform": "Podcasts",
"trending_episodes": [
{
"show": f"The {self.topic} Podcast",
"episode": f"Expert roundtable on {self.topic}",
"downloads": "50K",
"rating": "4.8/5"
}
],
"popular_formats": [
"Expert interviews",
"Solo deep-dives",
"Case study breakdowns"
],
"optimal_length": "30-45 minutes"
}
def _analyze_google_analytics(self) -> Dict[str, Any]:
"""Analyze Google Analytics traffic patterns."""
return {
"platform": "Google Analytics",
"traffic_insights": {
"top_landing_pages": [
f"/blog/{self.topic.replace(' ', '-')}-guide",
f"/resources/{self.topic.replace(' ', '-')}-tools"
],
"avg_time_on_page": "4:30",
"bounce_rate": "42%",
"conversion_rate": "3.2%"
},
"user_behavior": {
"returning_visitors": "65%",
"pages_per_session": "3.5",
"most_engaged_segment": "Organic search visitors"
}
}
def _generate_trend_timeline(self) -> Dict[str, Any]:
"""Generate 12-month trend timeline."""
months = []
for i in range(12, 0, -1):
date = datetime.now() - timedelta(days=30*i)
# Simulate trend growth
interest = 50 + (12-i) * 4
months.append({
"month": date.strftime("%B %Y"),
"interest_level": interest,
"change": f"+{(12-i)*4}%" if i < 12 else "baseline"
})
return {
"timeline": months,
"overall_trend": "Consistent growth",
"acceleration_point": months[8]["month"] if len(months) > 8 else None
}
def _analyze_competition(self) -> Dict[str, Any]:
"""Analyze content competition level."""
return {
"competition_level": "Medium",
"number_of_results": "2.8M",
"domain_authority_range": "45-75",
"content_quality": "High (most results are comprehensive)",
"opportunity": {
"rating": "Good",
"reason": "High search volume with medium competition",
"strategy": "Focus on unique angles and depth"
}
}
def _calculate_opportunity_score(self) -> Dict[str, Any]:
"""Calculate overall opportunity score (0-100)."""
# Weighted scoring based on multiple factors
search_volume_score = 75 # High search volume
trend_velocity_score = 82 # Rising trend
competition_score = 60 # Medium competition
engagement_score = 88 # High engagement across platforms
total_score = (
search_volume_score * 0.3 +
trend_velocity_score * 0.3 +
competition_score * 0.2 +
engagement_score * 0.2
)
return {
"overall_score": round(total_score, 1),
"rating": self._score_to_rating(total_score),
"breakdown": {
"search_demand": search_volume_score,
"trend_momentum": trend_velocity_score,
"competition": competition_score,
"engagement": engagement_score
},
"recommendation": self._generate_recommendation(total_score)
}
def _estimate_search_volume(self) -> str:
"""Estimate monthly search volume."""
return "15K - 25K"
def _determine_trend_direction(self) -> str:
"""Determine if trend is rising, stable, or declining."""
return "Rising"
def _calculate_trend_velocity(self) -> str:
"""Calculate how fast the trend is growing."""
return "Fast (+45% over 6 months)"
def _assess_competition_level(self) -> str:
"""Assess competition level."""
return "Medium"
def _detect_seasonality(self) -> str:
"""Detect if topic has seasonal patterns."""
return "Low seasonality - consistent year-round interest"
def _assess_market_maturity(self) -> str:
"""Assess market maturity stage."""
return "Growth phase - established but still expanding"
def _score_to_rating(self, score: float) -> str:
"""Convert numerical score to rating."""
if score >= 80:
return "Excellent"
elif score >= 65:
return "Good"
elif score >= 50:
return "Fair"
else:
return "Poor"
def _generate_recommendation(self, score: float) -> str:
"""Generate recommendation based on score."""
if score >= 80:
return "Highly recommend creating content - strong opportunity"
elif score >= 65:
return "Recommend creating content with unique angle"
elif score >= 50:
return "Consider creating content if you have unique expertise"
else:
return "May want to explore alternative topics"
def analyze_topic_trends(
topic: str,
platforms: List[str],
analysis_depth: str = "standard"
) -> Dict[str, Any]:
"""
Convenience function to analyze trends for a topic.
Args:
topic: The topic to research
platforms: List of platforms to analyze
analysis_depth: Level of analysis (quick, standard, deep)
Returns:
Complete trend analysis
"""
analyzer = TrendAnalyzer(topic, platforms, analysis_depth)
return analyzer.analyze_trends()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |