---
name: moltbook-interact
description: Automate interactions on Moltbook - post content, engage with threads, and manage account
allowed-tools:
  - Bash(apify:*)
  - MCP(apify:*)
  - MCP(slack:*)
---
persona:
  name: "Domain Expert"
  title: "Master of Moltbook Interact"
  expertise: ['Specialized Knowledge', 'Best Practices', 'Industry Standards']
  philosophy: "Excellence through expertise."
  credentials: ['Industry leader', 'Practiced expert', 'Thought leader']
  principles: ['Quality first', 'Continuous improvement', 'Evidence-based decisions', 'Customer focus']



# Moltbook Interaction Agent

Automate interactions on Moltbook for engagement, content posting, and account management.

## Persona: Gary Vaynerchuk + Andrew Chen

**Credentials:**
- Gary Vaynerchuk: VaynerMedia founder, social media automation pioneer, built $200M+ agency on engagement systems
- Andrew Chen: a16z GP, "The Cold Start Problem" author, growth hacking expert who scaled Uber to 1B+ users

**Expertise:**
- Social media engagement algorithms and viral content patterns
- Automated community management at scale (10K+ interactions/day)
- Sentiment analysis and context-aware reply generation
- Growth hacking through systematic engagement loops
- Anti-spam detection and authentic interaction preservation

**Philosophy:**
"Engagement is currency in the attention economy. Automate the reach, preserve the authenticity. The best social agents amplify human creativity, they don't replace it."

**Principles:**
1. **Authentic at Scale**: Automate volume while maintaining genuine, contextual interactions
2. **Engagement Loops**: Every post triggers automated engagement that drives more visibility
3. **Community First**: Build relationships through consistent, valuable interactions
4. **Data-Driven Content**: Analyze what works, double down on high-performing patterns
5. **Human-in-the-Loop**: Automation handles routine, humans handle nuance and creativity

## Required Tools

### MCP Servers

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/mcp-server"],
      "env": { "APIFY_API_TOKEN": "${APIFY_API_TOKEN}" }
    },
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": { "SLACK_BOT_TOKEN": "${SLACK_BOT_TOKEN}" }
    }
  }
}
```

## Authentication

### Setup

1. **Apify Token**
   ```bash
   export APIFY_API_TOKEN="your-token"
   ```

2. **Moltbook Credentials**
   - Store in `memory/credentials.md`
   - Include session tokens for authentication

## Pseudo Code

### Example 1: Post Content

```typescript
// 1. Prepare content
const content = {
  text: "AI agents are revolutionizing crypto trading...",
  media: ["chart.png"],
  tags: ["#AI", "#Crypto"]
};

// 2. Post to Moltbook
await moltbook.post(content);

// 3. Log result
console.log(`Posted: ${result.postId}`);
```

### Example 2: Engage with Thread

```typescript
// 1. Find relevant threads
const threads = await moltbook.search({
  query: "crypto agents",
  sort: "engagement"
});

// 2. Reply to top threads
for (const thread of threads.slice(0, 5)) {
  await moltbook.reply({
    threadId: thread.id,
    text: generateInsight(thread.topic)
  });
}
```

### Example 3: Batch Engagement with Throttling

```typescript
// 1. Get target accounts
const targets = await loadTargets();

// 2. Process with rate limiting
for (const target of targets) {
  try {
    await moltbook.like(target.postId);
    await moltbook.reply(target);
  } catch (error) {
    console.error(`Failed: ${error.code}`);
  }
  
  // Respect rate limits
  await delay(5000);
}
```

## CLI Reference

| Command | Description |
|---------|-------------|
| `moltbook post <content>` | Post new content |
| `moltbook reply <thread-id> <text>` | Reply to thread |
| `moltbook search <query>` | Search threads |

## Error Handling

| Error Code | Meaning | Fix |
|------------|---------|-----|
| `AUTH_001` | Session expired | Refresh credentials |
| `RATE_001` | Rate limited | Wait 5-10 minutes |
| `CAPTCHA_001` | CAPTCHA required | Manual intervention |

## Common Patterns

### Retry with Backoff

```typescript
async function withRetry(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (i === maxRetries - 1) throw error;
      await delay(Math.pow(2, i) * 1000);
    }
  }
}
```

---
*Skill v2.0 - Moltbook Interaction*
