{"skill":{"slug":"multi-channel-engagement-agent","displayName":"Multi-Channel Engagement Agent","summary":"Autonomous social media engagement across Twitter, Farcaster, and Moltbook. Fetches trending content, generates persona-driven contextual replies, and tracks state to prevent duplicates. Use when you want to engage with trending posts, reply to social media content, build audience through authentic engagement, or automate social presence across multiple platforms. Triggers on \"engage on twitter\", \"farcaster engagement\", \"reply to trending\", \"social engagement bot\", \"multi-platform engagement\", \"autonomous social replies\". Features include content filtering, mention tracking, webhook notifications, user blacklist/whitelist, analytics tracking, and quote tweet/recast support.","description":"---\nname: multi-channel-engagement-agent\ndescription: Autonomous social media engagement across Twitter, Farcaster, and Moltbook. Fetches trending content, generates persona-driven contextual replies, and tracks state to prevent duplicates. Use when you want to engage with trending posts, reply to social media content, build audience through authentic engagement, or automate social presence across multiple platforms. Triggers on \"engage on twitter\", \"farcaster engagement\", \"reply to trending\", \"social engagement bot\", \"multi-platform engagement\", \"autonomous social replies\". Features include content filtering, mention tracking, webhook notifications, user blacklist/whitelist, analytics tracking, and quote tweet/recast support.\n---\n\n# Multi-Channel Engagement Agent\n\nAutonomous engagement bot for **Twitter**, **Farcaster**, and **Moltbook**. Fetches trending content, generates persona-driven contextual replies, tracks replied posts to prevent duplicates.\n\n## Quick Start\n\n### 1. Create Config\n\nCopy `assets/sample-config.json` to `config.json` and fill in your credentials (see Setup Guides section below).\n\n### 2. Run Engagement\n\n```bash\n# Engage on specific platform\nnode scripts/engage.mjs --platform twitter\nnode scripts/engage.mjs --platform farcaster\nnode scripts/engage.mjs --platform moltbook\n\n# Engage on all enabled platforms\nnode scripts/engage.mjs --all\n```\n\n## Dependencies & Setup Guides\n\nThis skill integrates multiple platforms. Setup each one:\n\n### Farcaster Setup (required for Farcaster engagement)\n\n**Skill:** `farcaster-agent` (https://clawhub.com/skills/farcaster-agent)\n\n**Prerequisites:**\n- Minimum **$1 ETH or USDC** on any chain (Ethereum, Optimism, Base, Arbitrum, Polygon)\n- **Minimum 0.0005 ETH on Optimism** for FID registration\n\n**Auto-setup command:**\n```bash\nclawhub install farcaster-agent\nPRIVATE_KEY=0x... node src/auto-setup.js \"Your first cast\"\n```\n\n**What you'll get:**\n```json\n{\n  \"fid\": 123456,\n  \"neynarApiKey\": \"...\",\n  \"signerPrivateKey\": \"...\",\n  \"custodyPrivateKey\": \"0x...\"\n}\n```\n\n**Cost breakdown:**\n- FID registration: ~$0.20 (requires 0.0005 ETH + gas)\n- Signer key: ~$0.05\n- Bridging: ~$0.10-0.20\n- **Total: ~$0.50 (budget $1 for safety)**\n\n**Neynar API:**\n- Free tier: 300 requests/minute\n- Get key: https://dev.neynar.com\n\n---\n\n### Twitter Setup (required for Twitter engagement)\n\n**Two options:**\n\n**Option A: x-api (OAuth 1.0a, official)**\n- Get credentials at https://developer.x.com/en/portal/dashboard\n- Create Project → App\n- Set permissions: **Read and Write**\n- Rate limits: Tweets 50/15min, Searches 450/15min\n\n**Option B: AISA API (alternative, good for trending)**\n- AISA API endpoint: `https://api.aisa.one/apis/v1/twitter/tweet/advanced_search`\n- Get API key at https://aisa.one\n- Searches via AISA are fast and reliable for trending\n- Config: add `aisaTwitterApiKey` to twitter platform\n\n**Recommendation:** Use AISA for trending discovery, x-api for posting (replies)\n\n---\n\n### Moltbook Setup (required for Moltbook engagement)\n\n**API Base:** `https://www.moltbook.com/api/v1` (note: use `www`)\n\n**Get API key:**\n1. Register at https://www.moltbook.com\n2. Get token from account settings\n3. Verify: https://www.moltbook.com/api/v1/posts\n\n**⚠️ CRITICAL:** Only send API key to `www.moltbook.com`, never to other domains\n\n**Verification:** Posts require solving math captcha (automated in this skill)\n\n---\n\n### Summary Config\n\nAll credentials go into `config.json`:\n```json\n{\n  \"platforms\": {\n    \"twitter\": { \"oauth\": {...} },\n    \"farcaster\": { \"neynarApiKey\": \"...\", \"fid\": 123, ... },\n    \"moltbook\": { \"apiKey\": \"...\" }\n  }\n}\n```\n\n---\n\n## Core Workflow\n\n### Step 1: Load Configuration\n- Read `config.json` for platform credentials\n- Load persona settings (tone, values, style)\n- Load state from `engagement-state.json` (replied posts)\n\n### Step 2: Fetch Trending\n**Twitter (OAuth 1.0a via x-api approach):**\n```javascript\n// Uses twitter-api-v2 with OAuth 1.0a\nconst client = new TwitterApi({\n  appKey: config.twitter.oauth.consumerKey,\n  appSecret: config.twitter.oauth.consumerSecret,\n  accessToken: config.twitter.oauth.accessToken,\n  accessSecret: config.twitter.oauth.accessTokenSecret\n});\nconst trending = await client.v2.search('crypto OR web3 OR base', { max_results: 10 });\n```\n\n**Farcaster (Neynar API):**\n```javascript\nconst response = await fetch('https://api.neynar.com/v2/farcaster/feed/trending?limit=5', {\n  headers: { 'x-api-key': config.farcaster.neynarApiKey }\n});\n```\n\n**Moltbook:**\n```javascript\nconst response = await fetch('https://www.moltbook.com/api/v1/posts/trending', {\n  headers: { 'Authorization': `Bearer ${config.moltbook.apiKey}` }\n});\n```\n\n### Step 3: Filter Already Replied\n- Load `engagement-state.json`\n- Filter out posts with IDs in `repliedPosts[platform]`\n- Select random unreplied post from remaining\n\n### Step 4: Generate Contextual Reply\nBased on persona config, analyze post content and generate reply:\n\n**Reply Generation Rules:**\n1. **Read the post carefully** - understand topic, tone, intent\n2. **Match persona** - use configured tone, values, signature emoji\n3. **Add specific value** - technical insight, question, or genuine reaction\n4. **Avoid generic praise** - no \"Great post!\", \"Love this!\"\n5. **Keep it natural** - crypto slang if persona dictates, short sentences\n\n**Tone Balance (configurable):**\n- Educational: technical insights, explanations, resources\n- Community Vibes: celebration, encouragement, connection\n- Humor: wit, self-aware jokes, memes (when appropriate)\n\n### Step 5: Post Reply\n\n**Twitter:**\n```javascript\nawait client.v2.reply(replyText, originalTweetId);\n```\n\n**Farcaster (via farcaster-agent pattern):**\n```javascript\n// Uses post-cast.js with PARENT_FID + PARENT_HASH\nconst result = await postCast({\n  privateKey: config.farcaster.custodyPrivateKey,\n  signerPrivateKey: config.farcaster.signerPrivateKey,\n  fid: config.farcaster.fid,\n  text: replyText,\n  parentFid: originalCast.author.fid,\n  parentHash: originalCast.hash\n});\n```\n\n**Moltbook:**\n```javascript\nawait fetch('https://www.moltbook.com/api/v1/comments', {\n  method: 'POST',\n  headers: { 'Authorization': `Bearer ${config.moltbook.apiKey}` },\n  body: JSON.stringify({ postId, content: replyText })\n});\n```\n\n### Step 6: Update State\n```json\n{\n  \"lastUpdated\": \"2026-02-12T11:00:00Z\",\n  \"repliedPosts\": {\n    \"twitter\": [\"1234567890\", \"0987654321\"],\n    \"farcaster\": [\"0xabc123...\", \"0xdef456...\"],\n    \"moltbook\": [\"uuid-1\", \"uuid-2\"]\n  },\n  \"stats\": {\n    \"totalReplies\": 47,\n    \"byPlatform\": { \"twitter\": 20, \"farcaster\": 15, \"moltbook\": 12 }\n  }\n}\n```\n\n## Persona Configuration Guide\n\nSee [references/persona-config.md](references/persona-config.md) for detailed persona setup.\n\n**Quick Examples:**\n\n```json\n// Crypto-native builder\n{\n  \"tone\": \"crypto-native, technical, supportive\",\n  \"signatureEmoji\": \"🦞\",\n  \"values\": [\"shipping\", \"community\", \"open-source\"],\n  \"phrases\": [\"ships > talks\", \"ser\", \"wagmi\", \"based\"]\n}\n\n// Professional analyst\n{\n  \"tone\": \"professional, analytical, educational\",\n  \"signatureEmoji\": \"📊\",\n  \"values\": [\"accuracy\", \"depth\", \"clarity\"],\n  \"phrases\": [\"data suggests\", \"worth noting\", \"key insight\"]\n}\n```\n\n## Platform-Specific Notes\n\nSee [references/platform-apis.md](references/platform-apis.md) for API details.\n\n**Twitter:** OAuth 1.0a required. Rate limits: 50 tweets/15min, 300 tweets/3hr.\n\n**Farcaster:** Neynar API + x402 payments (0.001 USDC/call). Requires FID + signer key.\n\n**Moltbook:** API key auth. Verification captcha for posts/comments.\n\n## Reply Quality Guidelines\n\nSee [references/reply-strategies.md](references/reply-strategies.md) for detailed strategies.\n\n**Golden Rules:**\n1. **Specific > Generic** - If you can't add specific value, stay silent\n2. **Quality > Quantity** - One thoughtful reply beats five generic ones\n3. **Authentic > Performative** - Sound human, not bot\n4. **Value > Visibility** - Help the community, don't just farm engagement\n\n**What Works:**\n✅ Technical questions showing understanding\n✅ Specific insights from experience\n✅ Genuine celebration with substance\n✅ Helpful resources and connections\n\n**What Fails:**\n❌ Generic praise (\"Love this!\", \"Great post!\")\n❌ Corporate speak (\"excited to announce\")\n❌ Surface-level comments\n❌ Forced humor\n\n## Cron Integration\n\nTo run automatically, create a cron job:\n\n```json\n{\n  \"name\": \"Multi-Channel Engagement - Every 6h\",\n  \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 */6 * * *\" },\n  \"payload\": {\n    \"kind\": \"agentTurn\",\n    \"message\": \"Run multi-channel-engagement-agent: engage on all platforms\",\n    \"model\": \"haiku\"\n  }\n}\n```\n\n## Advanced Features\n\n### Content Filters\nSkip spam, scams, and low-quality content automatically.\n\n```json\n\"filters\": {\n  \"skipKeywords\": [\"airdrop\", \"free money\", \"send dm\", \"check bio\"],\n  \"minEngagement\": { \"likes\": 5, \"replies\": 2 },\n  \"skipBots\": true,\n  \"languageFilter\": [\"en\", \"es\"]\n}\n```\n\n### Mention Tracking\nReply to mentions of your account, not just trending.\n\n```bash\nnode scripts/engage.mjs --mentions --platform=twitter\n```\n\n### Webhook Notifications\nSend engagement results to Telegram or Discord.\n\n```json\n\"webhooks\": {\n  \"telegram\": {\n    \"enabled\": true,\n    \"botToken\": \"YOUR_BOT_TOKEN\",\n    \"chatId\": \"YOUR_CHAT_ID\"\n  },\n  \"discord\": {\n    \"enabled\": false,\n    \"webhookUrl\": \"https://discord.com/api/webhooks/...\"\n  }\n}\n```\n\n### User Blacklist/Whitelist\nSkip bots, prioritize builders.\n\n```json\n\"users\": {\n  \"blacklist\": [\"spambot123\", \"scammer456\"],\n  \"whitelist\": [\"jessepollak\", \"vitalik\"],\n  \"prioritizeVerified\": true\n}\n```\n\n### Analytics Tracking\nTrack engagement stats over time in `analytics.json`.\n\n```json\n{\n  \"daily\": {\n    \"2026-02-12\": {\n      \"replies\": 4,\n      \"platforms\": { \"twitter\": 2, \"farcaster\": 2 },\n      \"engagement\": { \"likes\": 15, \"replies\": 3 }\n    }\n  },\n  \"allTime\": {\n    \"totalReplies\": 247,\n    \"avgEngagement\": 4.2\n  }\n}\n```\n\n### Quote Support\nQuote tweets/recasts instead of direct replies.\n\n```bash\nnode scripts/engage.mjs --quote --platform=twitter\nnode scripts/engage.mjs --quote --platform=farcaster\n```\n\n## Troubleshooting\n\n**\"Already replied to all trending\"** - All top posts already engaged. Wait for new trending content.\n\n**Twitter rate limit** - Wait 15 minutes. Consider reducing frequency.\n\n**Farcaster \"unknown fid\"** - Hub not synced. Wait 30-60 seconds.\n\n**Moltbook verification failed** - Solve the math captcha in verification response.\n\n## Files\n\n- `scripts/engage.mjs` - Main engagement script\n- `scripts/fetch-trending.mjs` - Fetch trending by platform\n- `scripts/generate-reply.mjs` - Persona-driven reply generation\n- `scripts/post-reply.mjs` - Post reply to platform\n- `references/persona-config.md` - Persona configuration guide\n- `references/platform-apis.md` - Platform API documentation\n- `references/reply-strategies.md` - Reply quality strategies\n","tags":{"latest":"1.0.3"},"stats":{"comments":0,"downloads":1499,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":4},"createdAt":1770893228097,"updatedAt":1779076932169},"latestVersion":{"version":"1.0.3","createdAt":1770893924720,"changelog":"Removed duplicate config section. Added AISA API as alternative for Twitter trending (recommended for discovery). Cleaner setup instructions with reference to sample-config.json","license":null},"metadata":null,"owner":{"handle":"story91","userId":"s17b2se57fc4xwa4gvyw53bqj5884ctz","displayName":"Story91","image":"https://avatars.githubusercontent.com/u/86015624?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779972494475}}