# X Posting

> Post tweets, read mentions, reply, like, retweet, and search on X/Twitter using the official v2 API. Self-contained Python script included — no external packages to install.

- Skill: `mb3rgel-ui/x-posting` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add mb3rgel-ui/x-posting`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mb3rgel-ui/x-posting/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: mb3rgel-ui (https://skillmd.com/u/mb3rgel-ui)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mb3rgel-ui/x-posting

---


# X/Twitter — xpost CLI

All X/Twitter interactions go through the bundled `xpost` script.

## Setup

1. **Install the script:**
```bash
cp "/Users/bergel/Claude code/skills/x-posting/scripts/xpost" ~/bin/xpost
chmod +x ~/bin/xpost

# Add to PATH (add to your .zshrc for persistence)
export PATH="$HOME/bin:$PATH"
```

2. **Store your X API keys** at `~/.config/x-api/keys.env`:
```
X_API_KEY=...
X_API_SECRET=...
X_ACCESS_TOKEN=...
X_ACCESS_TOKEN_SECRET=...
X_USER_ID=...
```

Get these from https://developer.x.com/en/portal/dashboard (Basic tier: $200/mo).

3. **No external dependencies.** The script is pure Python 3 (uses only stdlib). No `pip install`, no `npm install`.

## Commands

```bash
# Post a tweet
xpost post "Your tweet text here"

# Reply to a tweet
xpost reply <tweet_id> "Your reply text"

# Quote tweet
xpost quote <tweet_id> "Your quote text"

# Get mentions
xpost mentions [--count 20]

# Search recent tweets
xpost search "query string" [--count 10]

# Like a tweet
xpost like <tweet_id>

# Retweet
xpost retweet <tweet_id>

# Delete a tweet
xpost delete <tweet_id>

# Get a single tweet
xpost get <tweet_id>

# Home timeline
xpost home [--count 20]

# User timeline
xpost timeline <username> [--count 10]
```

## Output
All commands output JSON by default. Use `--pretty` for formatted output or `--text` for plain text summary.

## Rate Limits (Basic Tier)
- POST tweets: 100/15min, 10,000/24hrs
- GET mentions: 300/15min
- GET timeline: 900/15min
- Search recent: 300/15min
- Likes: 50/15min, 1,000/24hrs

## Scheduling Tweets via Claude Code

Use the `/schedule` skill to schedule tweets at a specific time:

```
/schedule "Post this tweet via xpost: 'Your tweet text here'" at 2026-03-09T14:00:00
```

Or ask Claude Code to set up a recurring schedule:
```
"Schedule a daily tweet at 9am using xpost"
```

## Tips
- The script handles OAuth 1.0a HMAC-SHA1 signing automatically
- No browser automation needed — everything is API-based
- For engagement: reply to mentions promptly, quote-tweet interesting content with your take

