| name | social-monitoring |
| description | Monitor Twitter accounts (151 tracked), detect mentions, analyze engagement, and identify interaction opportunities. Use when tracking Twitter activity, monitoring mentions, analyzing social metrics, or managing social media presence. |
| allowed-tools | Read, Write, Bash(python:*) |
| model | claude-sonnet-4-20250514 |
Social Monitoring
Comprehensive Twitter monitoring system tracking 151 accounts across 6 ecosystems with intelligent interaction prioritization.
Overview
Monitor and analyze Twitter activity to:
- Track 151 key accounts across Codatta, Base, x402, AI/Data, Crypto, and Milady ecosystems
- Detect mentions in real-time
- Identify interaction opportunities with priority scoring
- Analyze engagement metrics (likes, retweets, replies)
- Automate monitoring with scheduled checks
Quick Start
1. Configure Twitter API
export TWITTER_API_KEY="your_api_key"
export TWITTER_API_SECRET="your_api_secret"
export TWITTER_ACCESS_TOKEN="your_access_token"
export TWITTER_ACCESS_SECRET="your_access_secret"
2. Run Monitor
from src.twitter_monitor import TwitterMonitor
monitor = TwitterMonitor()
mentions = monitor.check_mentions()
activity = monitor.monitor_account("@codatta_io")
opportunities = monitor.find_opportunities()
Account Matrix
151 Tracked Accounts (6 Categories)
| Category | Count | Priority | Auto-Interact |
|---|
| Must Interact | 4 | 100 | Always |
| Base Ecosystem | 25 | 85-90 | High |
| x402/8004 Community | 30 | 80-85 | High |
| AI/Data Industry | 20 | 70-80 | Medium |
| Crypto KOLs | 30 | 60-75 | Medium |
| Milady Community | 42 | 50-70 | Low-Medium |
Must Interact (Priority 100)
Always respond within 1 hour:
{
"must_interact": [
{"handle": "@codatta_io", "priority": 100, "role": "company"},
{"handle": "@drtwo101", "priority": 100, "role": "founder"},
{"handle": "@qiw", "priority": 100, "role": "founder"},
{"handle": "@ddcrying", "priority": 100, "role": "team"}
]
}
Base Ecosystem (Priority 85-90)
Respond to 70-80% of relevant posts:
- @base - Base official account (90)
- @jesseb_base - Jesse (Base founder) (90)
- @buildonbase - Base developer account (85)
- @0xwitchy - Witchy.eth (85)
- @zksync - zkSync (85)
- Plus 20 more Base builders...
x402/8004 Community (Priority 80-85)
Respond to 60-70% of relevant posts:
- Community members holding x402 token
- Active in x402 ecosystem discussions
- Codatta early adopters
AI/Data Industry (Priority 70-80)
Monitor for opportunities to discuss data ownership:
- @sama - Sam Altman (80)
- @ylecun - Yann LeCun (80)
- @karpathy - Andrej Karpathy (75)
- @AnthropicAI - Anthropic (75)
- AI researchers and companies
Crypto KOLs (Priority 60-75)
Engage on relevant topics:
- Major crypto influencers
- DeFi builders
- Web3 thought leaders
Milady Community (Priority 50-70)
Selective engagement:
- Fellow Milady holders
- Milady culture creators
- Remilio/Charlotte community
Monitoring Features
1. Mention Detection
monitor = TwitterMonitor()
mentions = monitor.check_mentions(
since_id="last_checked_id"
)
[
{
"id": "1234567890",
"author": "@someone",
"text": "@jessie what do you think about...",
"created_at": "2026-01-07T10:30:00Z",
"metrics": {"likes": 10, "retweets": 2}
}
]
2. Account Monitoring
activity = monitor.monitor_account(
handle="@codatta_io",
hours=24
)
3. Keyword Tracking
tweets = monitor.track_keywords(
keywords=["data ownership", "AI ethics", "x402"],
hours=24
)
4. Interaction Opportunities
opportunities = monitor.find_opportunities(
min_priority=70,
max_results=20
)
Interaction Rules
Priority Scoring Algorithm
def calculate_priority(tweet):
"""Calculate interaction priority (0-100)"""
score = 0
score += account_priority[tweet.author]
if "@jessie" in tweet.text:
score += 50
if has_codatta_keywords(tweet.text):
score += 20
elif has_base_keywords(tweet.text):
score += 15
elif has_data_keywords(tweet.text):
score += 10
if tweet.likes > 500:
score += 15
elif tweet.likes > 100:
score += 10
elif tweet.likes > 50:
score += 5
if hours_ago(tweet) < 1:
score += 10
elif hours_ago(tweet) < 6:
score += 5
return min(score, 100)
Interaction Decision Tree
Is it from Must Interact account? โ YES (100%) โ Reply
โ
Is it an @mention? โ YES (100%) โ Reply
โ
Priority score > 80? โ YES (70-80%) โ Reply
โ
Priority score 60-80? โ YES (40-60%) โ Maybe reply
โ
Priority score < 60? โ NO (10-20%) โ Monitor only
Usage Examples
Example 1: Daily Monitoring Routine
from src.twitter_monitor import TwitterMonitor
monitor = TwitterMonitor()
def morning_check():
print("Checking mentions...")
mentions = monitor.check_mentions()
print("Checking must-interact accounts...")
for account in ["@codatta_io", "@drtwo101", "@qiw"]:
activity = monitor.monitor_account(account, hours=24)
print(f"{account}: {len(activity)} new tweets")
print("Finding opportunities...")
opportunities = monitor.find_opportunities(min_priority=70)
print(f"Found {len(opportunities)} high-priority opportunities")
return {
"mentions": mentions,
"opportunities": opportunities
}
results = morning_check()
Example 2: Real-Time Mention Response
def monitor_mentions_realtime():
"""Check for mentions every 5 minutes"""
while True:
mentions = monitor.check_mentions()
for mention in mentions:
print(f"New mention from {mention['author']}")
from skills.twitter_content_ai.src.content_generator import ContentGenerator
generator = ContentGenerator()
reply = generator.generate_reply(
original_tweet=mention['text'],
author=mention['author']
)
print(f"Suggested reply: {reply}")
time.sleep(300)
Example 3: Ecosystem Tracking
def track_base_ecosystem():
"""Monitor all Base ecosystem accounts"""
base_accounts = monitor.get_accounts_by_category("base_ecosystem")
activity_report = {}
for account in base_accounts:
tweets = monitor.monitor_account(account['handle'], hours=24)
high_engagement = [
t for t in tweets
if t['metrics']['likes'] > 100
]
activity_report[account['handle']] = {
"total_tweets": len(tweets),
"high_engagement": len(high_engagement),
"top_tweet": max(tweets, key=lambda t: t['metrics']['likes'])
}
return activity_report
Analytics Features
Engagement Metrics
metrics = monitor.get_engagement_metrics(
accounts=["@codatta_io", "@base"],
days=7
)
{
"@codatta_io": {
"avg_likes": 50,
"avg_retweets": 10,
"total_tweets": 15,
"growth": "+5%"
},
"@base": {
"avg_likes": 500,
"avg_retweets": 100,
"total_tweets": 20,
"growth": "+10%"
}
}
Trending Topics
trending = monitor.find_trending_topics(
category="base_ecosystem",
hours=24
)
{
"topics": [
{"topic": "onchain summer", "mentions": 15},
{"topic": "base builders", "mentions": 12}
]
}
Interaction History
history = monitor.get_interaction_history(days=7)
{
"total_interactions": 45,
"by_category": {
"must_interact": 10,
"base_ecosystem": 15,
"x402_community": 10,
"ai_data": 5,
"crypto_kols": 3,
"milady": 2
},
"avg_response_time": "2.5 hours"
}
Configuration
Account Configuration File
Located in: config/accounts.json
{
"must_interact": [
{
"handle": "@codatta_io",
"priority": 100,
"role": "company",
"auto_interact": true,
"notification": "instant"
}
],
"base_ecosystem": [
{
"handle": "@base",
"priority": 90,
"role": "platform",
"auto_interact": false,
"keywords": ["onchain", "base", "builders"]
}
]
}
Monitoring Settings
monitoring:
check_interval: 300
mention_priority: 100
min_interaction_priority: 70
max_daily_interactions: 30
rate_limits:
tweets_per_hour: 50
api_calls_per_hour: 500
notifications:
email: true
webhook: true
lark: true
Automation
Scheduled Monitoring
from apscheduler.schedulers.background import BackgroundScheduler
scheduler = BackgroundScheduler()
scheduler.add_job(
func=monitor.check_mentions,
trigger="interval",
minutes=5
)
scheduler.add_job(
func=monitor.generate_daily_report,
trigger="cron",
hour=9,
minute=0
)
scheduler.start()
Alert System
monitor.set_alert(
event="mention_from_must_interact",
action="send_notification",
channels=["lark", "email"]
)
monitor.set_alert(
event="viral_tweet_about_codatta",
condition=lambda t: t['likes'] > 1000,
action="send_notification"
)
Twitter Client Integration
Basic Twitter Operations
from src.twitter_client import TwitterClient
client = TwitterClient()
user = client.get_user("@codatta_io")
tweets = client.get_user_tweets(
user_id=user['id'],
max_results=10
)
results = client.search_tweets(
query="data ownership",
max_results=20
)
client.post_tweet("gm from monitoring system ๐")
client.reply_to_tweet(
tweet_id="1234567890",
text="Great point about data ownership!"
)
Rate Limit Handling
try:
tweets = client.get_user_tweets(user_id, max_results=100)
except RateLimitError as e:
print(f"Rate limited. Reset at: {e.reset_time}")
Dashboard (Optional)
dashboard = monitor.generate_dashboard()
dashboard.save("monitor_dashboard.html")
Best Practices
- Check mentions frequently - Every 5-15 minutes for must-interact accounts
- Prioritize quality over quantity - Better to have 10 meaningful interactions than 50 generic ones
- Track engagement patterns - Learn when your audience is most active
- Update account lists regularly - Add new important accounts, remove inactive ones
- Monitor competitor activity - Learn from successful accounts in your space
- Set reasonable limits - Don't over-interact (max 30-40 per day)
- Use analytics - Review weekly metrics to improve strategy
Troubleshooting
Rate limits exceeded:
monitor = TwitterMonitor(rate_limit_buffer=0.8)
Missing mentions:
monitor.set_check_interval(minutes=3)
Too many notifications:
monitor.set_min_notify_priority(90)
Related Documentation
Related Skills
Cost: Twitter API v2 is free for basic tier (500k tweets/month)