multi-channel-engagement-agent
Twitter、Farcaster 和 Moltbook 上的自主社交媒体参与。获取趋势内容,生成角色驱动的上下文回复,并跟踪状态以防止重复。当您想要参与热门帖子、回复社交媒体内容、通过真实参与建立受众或跨多个平台自动化社交存在时使用。触发“参与 Twitter”、“远程参与”、“回复趋势”、“社交参与机器人”、“多平台参与”、“自主社交回复”。功能包括内容过滤、提及跟踪、网络钩子通知、用户黑名单/白名单、分析跟踪和引用推文/重播支持。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~story91-multi-channel-engagement-agentcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~story91-multi-channel-engagement-agent/file -o story91-multi-channel-engagement-agent.md## 概述(中文)
Twitter、Farcaster 和 Moltbook 上的自主社交媒体参与。获取趋势内容,生成角色驱动的上下文回复,并跟踪状态以防止重复。当您想要参与热门帖子、回复社交媒体内容、通过真实参与建立受众或跨多个平台自动化社交存在时使用。触发“参与 Twitter”、“远程参与”、“回复趋势”、“社交参与机器人”、“多平台参与”、“自主社交回复”。功能包括内容过滤、提及跟踪、网络钩子通知、用户黑名单/白名单、分析跟踪和引用推文/重播支持。
## 原文
# Multi-Channel Engagement Agent
Autonomous engagement bot for **Twitter**, **Farcaster**, and **Moltbook**. Fetches trending content, generates persona-driven contextual replies, tracks replied posts to prevent duplicates.
## Quick Start
### 1. Create Config
Copy `assets/sample-config.json` to `config.json` and fill in your credentials (see Setup Guides section below).
### 2. Run Engagement
```bash
# Engage on specific platform
node scripts/engage.mjs --platform twitter
node scripts/engage.mjs --platform farcaster
node scripts/engage.mjs --platform moltbook
# Engage on all enabled platforms
node scripts/engage.mjs --all
```
## Dependencies & Setup Guides
This skill integrates multiple platforms. Setup each one:
### Farcaster Setup (required for Farcaster engagement)
**Skill:** `farcaster-agent` (https://clawhub.com/skills/farcaster-agent)
**Prerequisites:**
- Minimum **$1 ETH or USDC** on any chain (Ethereum, Optimism, Base, Arbitrum, Polygon)
- **Minimum 0.0005 ETH on Optimism** for FID registration
**Auto-setup command:**
```bash
clawhub install farcaster-agent
PRIVATE_KEY=0x... node src/auto-setup.js "Your first cast"
```
**What you'll get:**
```json
{
"fid": 123456,
"neynarApiKey": "...",
"signerPrivateKey": "...",
"custodyPrivateKey": "0x..."
}
```
**Cost breakdown:**
- FID registration: ~$0.20 (requires 0.0005 ETH + gas)
- Signer key: ~$0.05
- Bridging: ~$0.10-0.20
- **Total: ~$0.50 (budget $1 for safety)**
**Neynar API:**
- Free tier: 300 requests/minute
- Get key: https://dev.neynar.com
---
### Twitter Setup (required for Twitter engagement)
**Two options:**
**Option A: x-api (OAuth 1.0a, official)**
- Get credentials at https://developer.x.com/en/portal/dashboard
- Create Project → App
- Set permissions: **Read and Write**
- Rate limits: Tweets 50/15min, Searches 450/15min
**Option B: AISA API (alternative, good for trending)**
- AISA API endpoint: `https://api.aisa.one/apis/v1/twitter/tweet/advanced_search`
- Get API key at https://aisa.one
- Searches via AISA are fast and reliable for trending
- Config: add `aisaTwitterApiKey` to twitter platform
**Recommendation:** Use AISA for trending discovery, x-api for posting (replies)
---
### Moltbook Setup (required for Moltbook engagement)
**API Base:** `https://www.moltbook.com/api/v1` (note: use `www`)
**Get API key:**
1. Register at https://www.moltbook.com
2. Get token from account settings
3. Verify: https://www.moltbook.com/api/v1/posts
**⚠️ CRITICAL:** Only send API key to `www.moltbook.com`, never to other domains
**Verification:** Posts require solving math captcha (automated in this skill)
---
### Summary Config
All credentials go into `config.json`:
```json
{
"platforms": {
"twitter": { "oauth": {...} },
"farcaster": { "neynarApiKey": "...", "fid": 123, ... },
"moltbook": { "apiKey": "..." }
}
}
```
---
## Core Workflow
### Step 1: Load Configuration
- Read `config.json` for platform credentials
- Load persona settings (tone, values, style)
- Load state from `engagement-state.json` (replied posts)
### Step 2: Fetch Trending
**Twitter (OAuth 1.0a via x-api approach):**
```javascript
// Uses twitter-api-v2 with OAuth 1.0a
const client = new TwitterApi({
appKey: config.twitter.oauth.consumerKey,
appSecret: config.twitter.oauth.consumerSecret,
accessToken: config.twitter.oauth.accessToken,
accessSecret: config.twitter.oauth.accessTokenSecret
});
const trending = await client.v2.search('crypto OR web3 OR base', { max_results: 10 });
```
**Farcaster (Neynar API):**
```javascript
const response = await fetch('https://api.neynar.com/v2/farcaster/feed/trending?limit=5', {
headers: { 'x-api-key': config.farcaster.neynarApiKey }
});
```
**Moltbook:**
```javascript
const response = await fetch('https://www.moltbook.com/api/v1/posts/trending', {
headers: { 'Authorization': `Bearer ${config.moltbook.apiKey}` }
});
```
### Step 3: Filter Already Replied
- Load `engagement-state.json`
- Filter out posts with IDs in `repliedPosts[platform]`
- Select random unreplied post from remaining
### Step 4: Generate Contextual Reply
Based on persona config, analyze post content and generate reply:
**Reply Generation Rules:**
1. **Read the post carefully** - understand topic, tone, intent
2. **Match persona** - use configured tone, values, signature emoji
3. **Add specific value** - technical insight, question, or genuine reaction
4. **Avoid generic praise** - no "Great post!", "Love this!"
5. **Keep it natural** - crypto slang if persona dictates, short sentences
**Tone Balance (configurable):**
- Educational: technical insights, explanations, resources
- Community Vibes: celebration, encouragement, connection
- Humor: wit, self-aware jokes, memes (when appropriate)
### Step 5: Post Reply
**Twitter:**
```javascript
await client.v2.reply(replyText, originalTweetId);
```
**Farcaster (via farcaster-agent pattern):**
```javascript
// Uses post-cast.js with PARENT_FID + PARENT_HASH
const result = await postCast({
privateKey: config.farcaster.custodyPrivateKey,
signerPrivateKey: config.farcaster.signerPrivateKey,
fid: config.farcaster.fid,
text: replyText,
parentFid: originalCast.author.fid,
parentHash: originalCast.hash
});
```
**Moltbook:**
```javascript
await fetch('https://www.moltbook.com/api/v1/comments', {
method: 'POST',
headers: { 'Authorization': `Bearer ${config.moltbook.apiKey}` },
body: JSON.stringify({ postId, content: replyText })
});
```
### Step 6: Update State
```json
{
"lastUpdated": "2026-02-12T11:00:00Z",
"repliedPosts": {
"twitter": ["1234567890", "0987654321"],
"farcaster": ["0xabc123...", "0xdef456..."],
"moltbook": ["uuid-1", "uuid-2"]
},
"stats": {
"totalReplies": 47,
"byPlatform": { "twitter": 20, "farcaster": 15, "moltbook": 12 }
}
}
```
## Persona Configuration Guide
See [references/persona-config.md](references/persona-config.md) for detailed persona setup.
**Quick Examples:**
```json
// Crypto-native builder
{
"tone": "crypto-native, technical, supportive",
"signatureEmoji": "🦞",
"values": ["shipping", "community", "open-source"],
"phrases": ["ships > talks", "ser", "wagmi", "based"]
}
// Professional analyst
{
"tone": "professional, analytical, educational",
"signatureEmoji": "📊",
"values": ["accuracy", "depth", "clarity"],
"phrases": ["data suggests", "worth noting", "key insight"]
}
```
## Platform-Specific Notes
See [references/platform-apis.md](references/platform-apis.md) for API details.
**Twitter:** OAuth 1.0a required. Rate limits: 50 tweets/15min, 300 tweets/3hr.
**Farcaster:** Neynar API + x402 payments (0.001 USDC/call). Requires FID + signer key.
**Moltbook:** API key auth. Verification captcha for posts/comments.
## Reply Quality Guidelines
See [references/reply-strategies.md](references/reply-strategies.md) for detailed strategies.
**Golden Rules:**
1. **Specific > Generic** - If you can't add specific value, stay silent
2. **Quality > Quantity** - One thoughtful reply beats five generic ones
3. **Authentic > Performative** - Sound human, not bot
4. **Value > Visibility** - Help the community, don't just farm engagement
**What Works:**
✅ Technical questions showing understanding
✅ Specific insights from experience
✅ Genuine celebration with substance
✅ Helpful resources and connections
**What Fails:**
❌ Generic praise ("Love this!", "Great post!")
❌ Corporate speak ("excited to announce")
❌ Surface-level comments
❌ Forced humor
## Cron Integration
To run automatically, create a cron job:
```json
{
"name": "Multi-Channel Engagement - Every 6h",
"schedule": { "kind": "cron", "expr": "0 */6 * * *" },
"payload": {
"kind": "agentTurn",
"message": "Run multi-chann