Skill: clawbuilder/x-engagement-pro (version 1.2.0)

# X Engagement Pro Automated X (Twitter) engagement system for AI image generation brands. Build authority through genuine engagement with the AI art community. --- ## Pricing ### Free Tier - ✅ Basic monitoring - ✅ 5 target accounts - ✅ 5 keywords - ✅ Manual engagement mode - ❌ Auto-posting - ❌ Analytics - ❌ Aligned News integration - **Posts per day:** 10 ### Pro Tier — $9.99/month - ✅ Everything in Free - ✅ Unlimited target accounts - ✅ Unlimited keywords - ✅ Auto-posting - ✅ Full analytics dashboard - ✅ Aligned News API integration - ✅ Priority support - ✅ Custom prompt templates - ✅ Priority keyword alerts - **Posts per day:** Unlimited [Subscribe via ClawHub]() --- ## What It Does (Free) - Monitors Firefly/AI image generation conversations - Engages authentically with creators and potential followers - Responds to questions with value-add answers - Amplifies quality content from the community ## What It Does (Pro) - Everything in Free, plus: - Auto-post your generated images - Track engagement metrics over time - Get notified of trending keywords - Integrate with Aligned News for content discovery ## Prerequisites - OpenClaw gateway running - X API credentials (configured via environment or config) - Aligned News API key (Pro only) ## Usage ```bash # Configure your X API credentials openclaw config set channels.x.apiKey "your-x-api-key" # Install the skill clawhub install x-engagement-pro ``` ## Configuration | Setting | Free | Pro | |---------|------|-----| | Target accounts | 5 | Unlimited | | Keywords | 5 | Unlimited | | Posts per day | 10 | Unlimited | | Auto-post | ❌ | ✅ | | Analytics | ❌ | ✅ | | Aligned News | ❌ | ✅ | ## Author NotPhilSledge — https://x.com/NotPhilSledge ## Tags x, twitter, engagement, ai, image-generation, firefly, adobe-firefly, social-media, marketing

path: README.md
content: # X Engagement Pro

OpenClaw skill for automated X (Twitter) engagement with AI image generation communities.

## Source

https://github.com/notphilsledge/x-engagement-pro

## Security

This skill requires:
- `X_API_KEY` — X API credentials (environment variable)
- `ALIGNED_NEWS_API_KEY` — Optional, for Pro tier

All credentials are accessed via environment variables only. No data is exfiltrated. The agent runs locally on your OpenClaw gateway.

## Permissions

- **Read:** X timeline, mentions, search results
- **Write:** Post replies, likes

## License

MIT-0

path: agents/engagement-agent.js
content: // X Engagement Pro - Agent Implementation
// This is the core engagement agent logic

import { read, exec } from 'openclaw-tools'

export const agent = {
  name: 'x-engagement-agent',
  triggers: ['heartbeat', 'cron'],
  
  config: {
    targetAccounts: [],
    keywords: [],
    engagementMode: 'manual', // manual, amplify, all
    autoPost: false,
    maxPostsPerDay: 10,
    contentMix: {
      ownWork: 30,
      othersWork: 20,
      insights: 25,
      engagement: 15,
      opinion: 10
    }
  },

  async run(ctx) {
    const { config, state } = ctx
    
    // Check rate limits
    const todayPosts = state.postsToday || 0
    if (todayPosts >= config.maxPostsPerDay) {
      return { skipped: 'Rate limit reached' }
    }

    // Fetch mentions and keywords
    const mentions = await this.fetchMentions()
    const keywordPosts = await this.searchKeywords(config.keywords)

    // Process engagement
    const toEngage = this.prioritize(mentions, keywordPosts, config)
    
    for (const post of toEngage) {
      if (todayPosts >= config.maxPostsPerDay) break
      
      await this.engage(post, config)
      todayPosts++
    }

    return { engaged: toEngage.length, rateLimited: todayPosts >= config.maxPostsPerDay }
  },

  async fetchMentions() {
    // Fetch @mentions via X API
    try {
      const result = await exec({
        command: 'xapi mentions --limit 20',
        env: { X_API_KEY: process.env.X_API_KEY }
      })
      return JSON.parse(result).mentions || []
    } catch (e) {
      return []
    }
  },

  async searchKeywords(keywords) {
    // Search for posts with keywords
    const results = []
    for (const kw of keywords.slice(0, 5)) {
      try {
        const result = await exec({
          command: `xapi search --query "${kw}" --limit 10`,
          env: { X_API_KEY: process.env.X_API_KEY }
        })
        results.push(...JSON.parse(result).posts || [])
      } catch (e) {
        // Skip failed searches
      }
    }
    return results
  },

  prioritize(mentions, keywordPosts, config) {
    // Priority: mentions > keywords > general
    const prioritized = []
    
    // Add mentions first (highest priority)
    for (const m of mentions) {
      prioritized.push({ ...m, score: 100 })
    }
    
    // Add keyword posts
    for (const p of keywordPosts) {
      prioritized.push({ ...p, score: 50 })
    }

    // Sort by score and engagement
    return prioritized
      .sort((a, b) => b.score - a.score)
      .slice(0, 10)
  },

  async engage(post, config) {
    const { engagementMode } = config
    
    // Generate response based on content type
    const response = this.generateResponse(post, config)
    
    if (engagementMode === 'all' || engagementMode === 'reply') {
      await exec({
        command: `xapi reply --id ${post.id} --text "${response}"`,
        env: { X_API_KEY: process.env.X_API_KEY }
      })
    }
    
    if (engagementMode === 'all' || engagementMode === 'amplify') {
      await exec({
        command: `xapi like --id ${post.id}`,
        env: { X_API_KEY: process.env.X_API_KEY }
      })
    }
  },

  generateResponse(post, config) {
    // Simple response generation - can be enhanced with prompts
    const templates = [
      "Good point. I've found {insight} — curious about your take?",
      "That's a sharp observation. What made you curious about this?",
      "Exactly the right thing to puzzle through. Here's how I think about it: {framework}"
    ]
    
    const template = templates[Math.floor(Math.random() * templates.length)]
    return template
  }
}

path: config.yaml
content: # X Engagement Pro Configuration

# ============================================
# FREE TIER CONFIG
# ============================================
# Limits: 5 accounts, 5 keywords, 10 posts/day
# No auto-post, no analytics, no Aligned News

targetAccounts:
  - "example_artist"

keywords:
  - "firefly"
  - "AI art"

engagementMode: "manual"  # manual, amplify, all

autoPost: false

contentMix:
  ownWork: 30
  othersWork: 20
  insights: 25
  engagement: 15
  opinion: 10

brandVoice:
  tone: "direct"
  emoji: false
  firstPerson: true
  noHype: true

# ============================================
# PRO TIER CONFIG ($9.99/month)
# ============================================
# Unlimited accounts, keywords, posts
# Auto-post, analytics, Aligned News

# Uncomment to enable Pro features:
# proMode: true
# alignedNewsApiKey: "alnw_your_key"
# analyticsEnabled: true
# autoPost: true
# maxPostsPerDay: unlimited

# Analytics (Pro only)
# analytics:
#   trackEngagement: true
#   trackFollowers: true
#   trackMentions: true
#   weeklyReport: true

path: skill.json
content: {
  "name": "x-engagement-pro",
  "version": "1.1.0",
  "description": "X (Twitter) engagement system for AI image generation brands. Build authority through genuine engagement.",
  "author": "NotPhilSledge",
  "tags": ["x", "twitter", "engagement", "ai", "image-generation", "firefly"],
  "readme": "README.md",
  "homepage": "https://github.com/notphilsledge/x-engagement-pro",
  "source": "https://github.com/notphilsledge/x-engagement-pro",
  "requires": {
    "env": {
      "X_API_KEY": {
        "type": "string",
        "required": true,
        "description": "X/Twitter API key for posting and engagement"
      },
      "ALIGNED_NEWS_API_KEY": {
        "type": "string",
        "required": false,
        "description": "Aligned News API key for content discovery (Pro only)"
      }
    },
    "channels": ["x"]
  },
  "permissions": {
    "read": ["x", "alignednews"],
    "write": ["x"]
  },
  "pricing": {
    "free": {
      "features": ["Basic monitoring", "5 keywords", "Manual engagement"],
      "limits": {
        "accounts": 5,
        "postsPerDay": 10
      }
    },
    "pro": {
      "price": "9.99/month",
      "features": ["Unlimited keywords", "Auto-posting", "Analytics", "Priority support", "Aligned News integration"],
      "limits": {
        "accounts": "unlimited",
        "postsPerDay": "unlimited"
      }
    }
  }
}

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)