Bytesagain X Manager
by @loutai0307-prog
Manage X (Twitter) account: auto-post AI-generated tweets, monitor brand mentions, auto-like relevant posts, and send Telegram approval requests for replies.
clawhub install bytesagain-x-managerπ About This Skill
name: "BytesAgain X Manager" description: "Manage X (Twitter) account: auto-post AI-generated tweets, monitor brand mentions, auto-like relevant posts, and send Telegram approval requests for replies." version: "1.5.0" author: "BytesAgain" tags: ["twitter", "x", "social-media", "automation", "ai-content", "engagement"] credentials: - name: X_API_KEY description: X (Twitter) API Key from developer.x.com required: true - name: X_API_SECRET description: X API Key Secret required: true - name: X_ACCESS_TOKEN description: X Access Token (account-specific, Read+Write) required: true - name: X_ACCESS_TOKEN_SECRET description: X Access Token Secret required: true - name: X_USER_ID description: Your X account user ID (numeric) required: true - name: XAI_API_KEY description: xAI API key for tweet draft generation via Grok required: true - name: TG_TOKEN description: Telegram bot token for approval notifications required: true - name: TG_CHAT description: Telegram chat ID to receive notifications required: true
BytesAgain X Manager
Manage your X (Twitter) account with automated posting, monitoring, and engagement. Generates tweet drafts via xAI, validates content before posting, and routes mention replies through human approval.
Setup
This skill requires the following environment variables to be configured before use:
| Variable | Required | Description |
|----------|----------|-------------|
| X_API_KEY | β
| X API Key from developer.x.com (Read+Write app) |
| X_API_SECRET | β
| X API Key Secret |
| X_ACCESS_TOKEN | β
| X Access Token (account-specific) |
| X_ACCESS_TOKEN_SECRET | β
| X Access Token Secret |
| X_USER_ID | β
| Your X account numeric user ID |
| XAI_API_KEY | β
| xAI API key for Grok tweet generation |
| TG_TOKEN | β
| Telegram bot token for approval notifications |
| TG_CHAT | β
| Telegram chat ID to receive notifications |
No credentials are stored or transmitted by this skill. All values are read from environment variables at runtime only.
What This Skill Owns
What This Skill Does Not Cover
Commands
draft
Generate 3 tweet drafts for the day using xAI trend analysis. Saves to/tmp/x-drafts-YYYY-MM-DD.json.
bash scripts/script.sh draft
post
Post a tweet from today's saved drafts. Use--index to select which draft (0=first, 1=second, 2=third).
bash scripts/script.sh post --index 0
bash scripts/script.sh post --index 1
bash scripts/script.sh post --index 2
monitor
Run brand and competitor monitoring report. Tracks @bytesagain mentions, @openclaw activity, and AI skill trends. Sends Telegram report with Chinese summary.bash scripts/script.sh monitor
like
Auto-like recent tweets matching AI agent / skill keywords. Skips own tweets and already-liked posts.bash scripts/script.sh like
scan-mentions
Scan recent @bytesagain mentions, draft replies via xAI, and send Telegram approval requests to operator.bash scripts/script.sh scan-mentions
send-reply
Send a pre-approved reply to one or more tweets. Multiple IDs are staggered 30β90 seconds apart to appear natural.bash scripts/script.sh send-reply
bash scripts/script.sh send-reply
status
Show pending approval queue and today's saved drafts.bash scripts/script.sh status
Approval Workflow
1. scan-mentions detects new @bytesagain mentions
2. xAI drafts a reply for each mention
3. Telegram message sent to operator: original tweet + draft reply + tweet ID
4. Operator replies ε \send-reply to post the approved reply
Validation Rules (pre-post checks)
All tweets are validated before posting:
| Check | Result | |-------|--------| | Link in tweet body | β Blocked (X penalizes -40%) | | More than 2 hashtags | β Blocked | | Specific large numbers (e.g. 10000, 500K) | β Blocked (may be inaccurate) | | Banned words (guaranteed, make moneyβ¦) | β Blocked | | No question mark | β οΈ Warning only | | Tweet under 50 characters | β οΈ Warning only |
Blocked tweets trigger a Telegram notification with the reason. Fallback preset templates are used if xAI times out.
Recommended Cron Schedule
30 8 * * * monitor # Daily brand report
0 9 * * * draft # Generate daily drafts (1 xAI call/day)
0 9,13,17,21 * * * like # Auto-like 4x daily
5 10 * * * post --index 0 # Post tweet #1
5 15 * * * post --index 1 # Post tweet #2
5 20 * * * post --index 2 # Post tweet #3
0 */2 * * * scan-mentions # Check mentions every 2 hours
State Files
| File | Purpose |
|------|---------|
| /tmp/x-drafts-YYYY-MM-DD.json | Daily tweet drafts |
| /tmp/x-liked-ids.json | Dedup: already-liked IDs (last 500) |
| /tmp/x-seen-mentions.json | Dedup: processed mention IDs (last 200) |
| /tmp/x-pending-replies.json | Pending approval queue |
Requirements
requests β HTTP clientrequests-oauthlib β OAuth 1.0a for X APIpip install requests requests-oauthlib
References
Evals
Trigger boundary test cases: evals/trigger_cases.json β 12 cases (6 positive + 6 negative)Feedback
https://bytesagain.com/feedback/ Powered by BytesAgain | bytesagain.comβοΈ Configuration
This skill requires the following environment variables to be configured before use:
| Variable | Required | Description |
|----------|----------|-------------|
| X_API_KEY | β
| X API Key from developer.x.com (Read+Write app) |
| X_API_SECRET | β
| X API Key Secret |
| X_ACCESS_TOKEN | β
| X Access Token (account-specific) |
| X_ACCESS_TOKEN_SECRET | β
| X Access Token Secret |
| X_USER_ID | β
| Your X account numeric user ID |
| XAI_API_KEY | β
| xAI API key for Grok tweet generation |
| TG_TOKEN | β
| Telegram bot token for approval notifications |
| TG_CHAT | β
| Telegram chat ID to receive notifications |
No credentials are stored or transmitted by this skill. All values are read from environment variables at runtime only.