by mguozhen
Reddit & X auto-reply bot — browser-based, Claude AI generated replies for Solvea/VOC.ai
# Add to your Claude Code skills
git clone https://github.com/mguozhen/social-botAutomatically finds and replies to relevant Reddit and X/Twitter posts about ecommerce, Amazon FBA, and AI customer service. Also builds Reddit account karma and tracks potential customer leads.
social reply bot # run both platforms
social reply bot x only # X/Twitter only
social reply bot reddit only # Reddit only
social reply bot warmup # build Reddit karma (8 comments)
social reply bot warmup 15 # warmup with custom target
social reply bot leads # show potential customers found
social reply bot stats # today's stats
social reply bot dashboard # open web dashboard
curl -fsSL https://raw.githubusercontent.com/mguozhen/social-bot/main/install.sh | bash
browse CLI: npm install -g @browserbasehq/browse-cliANTHROPIC_API_KEY in .envSocial Reply Bot searches Reddit and X/Twitter for posts relevant to your product, then uses Claude AI to generate genuine, helpful replies that naturally mention your brand. No API keys for Reddit or X required — it uses browser automation to act like a real user.
Not spam. The AI evaluates every post for relevance first. If a post isn't a good fit, it skips it. When it does reply, it sounds like an experienced practitioner sharing real insight — because that's what the prompt engineers it to be.
Currently configured for two products:
But it's fully configurable for any product/niche via config.json.
| Feature | Description | |---------|-------------| | Dual Platform | Reddit (subreddit search) + X/Twitter (keyword search) | | AI-Generated Replies | Claude crafts genuine, on-topic responses — not templates | | Smart Filtering | Two-layer filter: keyword match first, then AI relevance check | | Browser Automation | No platform API keys needed — uses real browser sessions | | Reddit Warmup | Karma-building mode for new accounts (safe subreddits, no product mentions) | | Lead Tracking | Every replied post scored 1-10 for customer potential | | Web Dashboard | Real-time Flask dashboard showing daily progress | | Deduplication | SQLite-backed — never replies to the same post twice | | Rate Limiting | Configurable delays (Reddit: 10min, X: 5min between replies) | | | macOS LaunchAgent runs at 10:05 AM automatically |
No comments yet. Be the first to share your thoughts!
social reply bot leadsEdit ~/social-bot/config.json to set your subreddits, X search queries, product descriptions, and daily targets.
Keyword Search (Reddit subreddits + X queries)
↓
Two-Layer Relevance Filter
├─ Layer 1: Keyword match (zero API cost)
└─ Layer 2: Claude AI judges if post is worth replying to
↓
Claude generates reply as "experienced seller sharing real insight"
↓
Browser automation posts the reply
↓
SQLite logs it → Dashboard displays it → Lead scored
The core principle: Every reply must provide genuine value. The AI is prompted as a "seller with 5 years of experience" who naturally mentions tools they use — not as a marketer pushing a product. Posts that don't fit get skipped, not force-fitted.
The web dashboard tracks daily X posts, Reddit comments, product mentions, and historical totals.
The bot found a competitor's tweet about customer support automation and replied with a genuine insight that naturally positioned Solvea as an alternative. No "Great product!" fluff — real technical substance.
On r/ecommerce, a user discussed WooCommerce chatbot inventory sync issues. The bot shared specific technical experience (event-triggered vs. scheduled sync), earning genuine upvotes and discussion.
curl -fsSL https://raw.githubusercontent.com/mguozhen/social-bot/main/install.sh | bash
This will:
~/social-botanthropic, flask)browse CLI.env setupgit clone https://github.com/mguozhen/social-bot.git ~/social-bot
cd ~/social-bot
pip3 install -r requirements.txt
cp .env.template .env
# Edit .env with your ANTHROPIC_API_KEY
| Requirement | How to Get It |
|------------|---------------|
| Python 3.9+ | Pre-installed on macOS |
| browse CLI | npm install -g @anthropic-ai/browse-cli |
| Anthropic API Key | console.anthropic.com |
| Reddit account | Log in once in the browse-controlled Chrome |
| X/Twitter account | Log in once in the browse-controlled Chrome |
No Reddit API key or Twitter API key required. The bot uses browser sessions, not platform APIs.
Once installed as a skill, just tell Claude:
social reply bot # run both platforms
social reply bot x only # X/Twitter only
social reply bot reddit only # Reddit only
social reply bot warmup # build Reddit karma (8 comments)
social reply bot warmup 15 # warmup with custom target
social reply bot leads # show potential customers found
social reply bot stats # today's stats
social reply bot dashboard # open web dashboard
python3 run_daily.py # run both platforms
python3 run_daily.py --x-only # X only
python3 run_daily.py --reddit-only # Reddit only
python3 warmup_reddit.py # karma building mode
Edit config.json to customize for your product:
{
"x": {
"username": "@YourAccount",
"daily_target": 20,
"min_delay_seconds": 300,
"search_queries": [
"your product keyword 1",
"your product keyword 2"
]
},
"reddit": {
"username": "your_reddit_user",
"daily_target": 10,
"min_delay_seconds": 600,
"subreddits": ["YourTargetSubreddit", "AnotherOne"]
},
"products": {
"YourProduct": {
"description": "What your product does (AI uses this to craft mentions)",
"trigger_keywords": ["keyword1", "keyword2"]
}
},
"reply_style": {
"tone": "knowledgeable practitioner sharing experience",
"max_length_x": 260,
"max_length_reddit": 400,
"rules": [
"Lead with genuine insight about the post",
"Mention product as 'what we use/built' — not as an ad",
"Skip if not relevant — never force a mention"
]
}
}
| Variable | Required | Description |
|----------|----------|-------------|
| ANTHROPIC_API_KEY | Yes | Claude API key for reply generation |
| BROWSERBASE_API_KEY | No | Optional: persistent browser sessions across reboots |
| BROWSERBASE_PROJECT_ID | No | Optional: pairs with Browserbase key |
social-bot/
├── bot/
│ ├── ai_engine.py # Claude AI: relevance filter + reply generation
│ ├── browser.py # Browser automation via browse CLI
│ ├── db.py # SQLite: dedup, history, lead scoring
│ ├── reddit_bot.py # Reddit: search subreddits, post comments
│ └── x_bot.py # X/Twitter: search queries, post replies
├── dashboard/
│ ├── app.py # Flask web dashboard
│ └── templates/ # Dashboard HTML
├── docs/
│ ├── screenshot_dashboard.png
│ ├── screenshot_reddit_reply.png
│ └── screenshot_x_reply.png
├── launchd/ # macOS LaunchAgent plist
├── config.json # Platform targets, keywords, products
├── run_daily.py # Main entry point (scheduled daily)
├── warmup_reddit.py # Reddit karma builder
├── install.sh # One-line installer
├── setup.sh # Manual setup helper
├── SKILL.md # Claude Code / Agent Skills definition
└── .env.template # Credential template
# Layer 1: Fast keyword match (zero API cost)
def detect_product(text: str) -> Optional[str]:
# Returns matching product name or None
# Layer 2: Claude AI relevance check
# If Layer 1 matches, Claude decides:
# - Is this post genuinely relevant?
# - Can we add real value with a reply?
# - SKIP if forcing a mention would feel unnatural
| Platform | Delay Between Replies | Daily Cap | Deduplication | |----------|----------------------|-----------|---------------| | Reddit | 10 minutes | 10 posts | SQLite (URL-based) | | X/Twitter | 5 minutes | 20 posts | SQLite (URL-based) |
New Reddit accounts need karma before posting in restricted subreddits. The warmup mode:
p