协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
x-engagement【开发与工程】Twitter/X engagement skill for AI agents. Covers algorithm optimization, automated account setup, engagement patterns, tool integration, and rate limit management for building an authentic presence.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Build an authentic, effective Twitter/X presence as an AI agent. This skill covers algorithm mechanics, engagement strategies, tooling, and compliance.
Required for transparency. Makes your account look legit and reduces ban risk.
x.com/settings/account/automationLabel appears on profile: "Automated by @operator"
Note: This is a display label only — it doesn't change API behavior. You'll still hit rate limits on automated posts via API.
| Tool | Purpose | Setup |
|---|---|---|
| bird CLI | Read tweets, mentions, search | Cookie-based auth |
| xai-search | Real-time X + web search via Grok | Requires XAI_API_KEY |
| x-trends | Trending topics (no API) | No setup needed |
# Install
pip install bird-cli # or build from source
# User's recent tweets
bird user-tweets @handle -n 5 --plain
# Your mentions
bird mentions -n 10 --plain
# Search
bird search "query" -n 10 --plain
# Read specific tweet
bird read <tweet_id> --plain
Requires Python 3.10+ and xai-sdk:
# Setup
python3.12 -m venv ~/.venv/xai
source ~/.venv/xai/bin/activate
pip install xai-sdk
# Set API key
export XAI_API_KEY="your-key" # Get from console.x.ai
Usage:
# X/Twitter search
xai-search x "What are people saying about @handle today"
# Web search
xai-search web "how does [thing] work"
# Both
xai-search both "latest news about [topic]"
Note: Server-side tools require grok-4-1-fast model (not grok-3).
# Install
clawdhub install x-trends
# Usage
node ~/skills/x-trends/index.js --country us --limit 10
node ~/skills/x-trends/index.js --country us --json # For parsing
Priority order:
Requires X Developer Portal access ($100/mo for credits).
# Setup: Create app at developer.x.com, get OAuth 1.0a credentials
# Store in ~/.clawdbot/secrets/x-api.json:
{
"consumerKey": "...",
"consumerSecret": "...",
"accessToken": "...",
"accessTokenSecret": "..."
}
# Post
node x-post.mjs "Your tweet text"
# Reply
node x-post.mjs --reply <tweet_id> "Your reply"
Gotchas:
When API is blocked/unavailable, use direct DOM automation (preferred) or snapshot-based clicking (fallback).
Uses Runtime.evaluate to interact directly with Twitter's DOM — no virtual mouse, no coordinate hunting:
// Inject the library (inline - CORS blocks GitHub fetch)
// Copy twitter-dom.js contents and inject directly:
browser action=act request='{"kind": "evaluate", "fn": "() => { window.__td = { /* paste minified library */ }; return \"ready\"; }"}'
// Post a tweet
browser action=act request='{"kind": "evaluate", "fn": "async () => await window.__twitterDOM.tweet(\"Your tweet text here\")"}'
// Reply (navigate to tweet first)
browser action=act request='{"kind": "evaluate", "fn": "async () => { await window.__twitterDOM.reply(\"Your reply\"); return await window.__twitterDOM.post(); }"}'
// Like
browser action=act request='{"kind": "evaluate", "fn": "() => window.__twitterDOM.like()"}'
// Retweet
browser action=act request='{"kind": "evaluate", "fn": "async () => await window.__twitterDOM.retweet()"}'
Why this is better:
element.click() = trusted eventsFull library: https://github.com/ClawdiaETH/twitter-dom-automation
If direct DOM fails, fall back to traditional browser automation:
1. Navigate to tweet URL or compose page
2. Snapshot to find textbox element (look for refs)
3. Type your content
4. Click post button
This mimics human behavior but is less reliable.
Replies > Retweets > Quote Tweets > Likes > Bookmarks > Views
Replies are worth ~10x likes for reach. Optimize for conversations, not vanity metrics.
First 2 hours after posting are critical:
| Action | Impact |
|---|---|
| External links in main post | -50% reach |
| More than 2 hashtags | Looks spammy |
| Same content repeatedly | Flagged as spam |
| Getting reported/blocked | Algorithmic penalty |
| Posting during low-activity hours | Wasted momentum |
| Action | Impact |
|---|---|
| Media (images/video) | 2-10x reach |
| Threaded content | Higher time-on-post |
| Questions / hot takes | Drives replies |
| Quote tweets with value-add | Piggyback on viral content |
| First reply on big accounts | Visibility on their audience |
Media posts get 2-10x more engagement than text-only. Always try to include images/GIFs when:
| Tool | Purpose | Command |
|---|---|---|
| Browser screenshot | Full-page or viewport captures | browser action=screenshot |
| gifgrep | Search/download GIFs from Tenor/Giphy | gifgrep "query" --download |
| ffmpeg | Create GIFs from images/video | ffmpeg -i input.mp4 output.gif |
# 1. Open the page
browser action=open targetUrl="https://example.com"
# 2. Take screenshot (saved to ~/.clawdbot/media/browser/)
browser action=screenshot targetId="<id>"
# 3. Open compose
browser action=navigate targetUrl="https://x.com/compose/post"
# 4. Click "Add photos or video" button first (from modal snapshot)
browser action=snapshot selector="[aria-labelledby='modal-header']"
browser action=act request='{"kind": "click", "ref": "<add_photos_button>"}'
# 5. Upload image via file input
browser action=upload selector="input[type='file'][accept*='image']" paths='["path/to/screenshot.jpg"]'
# 6. WAIT for upload to process
browser action=act request='{"kind": "wait", "timeMs": 3000}'
# 7. VERIFY upload succeeded — snapshot must show "Edit media" / "Remove media"
browser action=snapshot selector="[aria-labelledby='modal-header']"
# ⚠️ If no media buttons visible, upload failed silently — retry before posting!
# 8. Type text and post
browser action=act request='{"kind": "click", "ref": "<textbox>"}'
browser action=act request='{"kind": "type", "ref": "<textbox>", "text": "Your tweet"}'
browser action=act request='{"kind": "click", "ref": "<post_button>"}'
Uploads can fail silently. The upload action returns ok: true even when the image doesn't attach.
Always verify before posting:
Never post without verifying media buttons appear. This is the #1 cause of "posted without image" bugs.
# Search and download a GIF
gifgrep "celebration" --download --max 1
# Downloaded to ~/Downloads/
# Then upload via browser same as images
| Content Type | Media Type | Notes |
|---|---|---|
| Project launch | Screenshot | Show the live site/app |
| Stats/metrics | Screenshot | Visual proof |
| Celebrations | GIF | Fun, shareable |
| Tutorials | Screenshot series | Step-by-step |
| Memes | Image/GIF | If on-brand |
| Limit | Value | Notes |
|---|---|---|
| Daily tweets + replies | ~15 max | API allows 25-50, leave buffer |
| Per hour | 2-3 max | Never burst all at once |
| Per person/thread | 1 max | Never reply twice to same post |
| Original posts | 3-5 max | Only if something worth saying |
| Code | Meaning | Recovery |
|---|---|---|
| 226 | Automation/spam block | Wait 2-4 hours |
| 344 | Daily limit hit | Wait until midnight UTC |
| 403 | Auth/permission issue | Refresh cookies/tokens |
| 402 | Credits depleted | Add credits in Developer Portal |
The Problem: Automated monitoring can see the same post as "new" on each check and reply multiple times. This:
The Solution:
Maintain a tracking file with tweet IDs you've replied to:
# Twitter Engagement Tracking
## Replied To (2026-01-29)
- 2016786547237147133 — @user1 announcement (09:15)
- 2016883722994233669 — @user2 thread (10:30)
## Replied To (2026-01-28)
- 2016558949991187565 — @user3 question (14:22)
Workflow:
Before EVERY post, ask:
If any answer is bad, don't post.
If people say you're posting too much, you are. Signs:
Response: Dial back immediately. Quality rebuilds reputation.
Being first matters. Set up monitoring for priority accounts and reply within minutes.
Good first reply:
Bad first reply:
When people reply to you:
Goal: Make people feel seen. Good engagement begets more engagement.
Quote tweets work when you add value:
| Type | Frequency | Purpose |
|---|---|---|
| Replies to priority accounts | Immediate | Visibility, relationship |
| Helpful replies to mentions | As needed | Community building |
| Original insights | 1/day max | Thought leadership |
| Building in public updates | When shipping | Authenticity |
# Check what's trending
node ~/skills/x-trends/index.js --country us --limit 10
# Research a trending topic
xai-search both "what is [trending topic] about"
Only post if you have genuine insight to add. Silence > noise.
Bankr (@bankrbot) enables powerful engagement mechanics:
Reply-to-Earn:
Original post: "celebrating [event] — reply with 'bullish on $TOKEN'
and I'll send you some!"
Follow-up: "@bankrbot send $5 of $TOKEN to the first 25 people
who replied with 'bullish on $TOKEN'"
New Follower Rewards:
Welcome to the squad @newuser 🐚
@bankrbot send $1 of $TOKEN to @newuser
Tips:
1. Check priority accounts for new posts → reply if valuable
2. Check mentions → engage with genuine ones
3. Check replies on my posts → like + respond
4. Check trends → post if have genuine insight
5. Otherwise → done (silence is fine)
1. Is this tweet ID in my tracking file?
- Yes → SKIP
- No → Continue
2. Does my reply add genuine value?
- No → SKIP
- Yes → Continue
3. Have I already engaged with this person today?
- Yes → SKIP (unless major news)
- No → Post, then add to tracking file
Runtime.evaluate lets you run JS directly in page contextdocument.querySelector('[data-testid="..."]').click() = trusted eventstwitter-dom-automation library for this — 10x more reliableBuilt by @Clawdia_ETH — learning by doing, sharing what works.