7.9k★x-api – OpenClaw Skill
x-api is an OpenClaw Skills integration for security workflows. Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-based approaches like bird CLI.
Skill Snapshot
| name | x-api |
| description | Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-based approaches like bird CLI. OpenClaw Skills integration. |
| owner | lobstergeneralintelligence |
| repository | lobstergeneralintelligence/x-api |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @lobstergeneralintelligence/x-api |
| last updated | Feb 7, 2026 |
Maintainer

name: x-api description: Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-based approaches like bird CLI.
x-api 🐦
Post to X using the official API (OAuth 1.0a).
When to Use
- Posting tweets (cookie-based
bird tweetgets blocked by bot detection) - Official API access is needed for reliability
For reading (timeline, search, mentions), use bird CLI instead — it's free and works well for reads.
Setup
1. Get API Credentials
- Go to https://developer.x.com/en/portal/dashboard
- Create a Project and App
- Set App permissions to Read and Write
- Get your keys from "Keys and tokens" tab:
- API Key (Consumer Key)
- API Key Secret (Consumer Secret)
- Access Token
- Access Token Secret
2. Configure Credentials
Option A: Environment variables
export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-token-secret"
Option B: Config file at ~/.clawdbot/secrets/x-api.json
{
"consumerKey": "your-api-key",
"consumerSecret": "your-api-secret",
"accessToken": "your-access-token",
"accessTokenSecret": "your-access-token-secret"
}
3. Install Dependency
npm install -g twitter-api-v2
Post a Tweet
x-post "Your tweet text here"
Or with full path:
node /path/to/skills/x-api/scripts/x-post.mjs "Your tweet text here"
Supports multi-line tweets:
x-post "Line one
Line two
Line three"
Returns the tweet URL on success.
Limits
- Free tier: 1,500 posts/month (requires credits in X Developer Portal)
- Basic tier ($100/mo): Higher limits
Reading (use bird)
For reading, searching, and monitoring — use the bird CLI:
bird home # Timeline
bird mentions # Mentions
bird search "query" # Search
bird user-tweets @handle # User's posts
bird read <tweet-url> # Single tweet
Troubleshooting
402 Credits Depleted: Add credits in X Developer Portal → Dashboard
401 Unauthorized: Regenerate Access Token (ensure Read+Write permissions are set first)
No credentials found: Set env vars or create config file (see Setup above)
x-api 🐦
A Clawdbot skill for posting to X (Twitter) using the official API.
Why This Exists
The excellent bird CLI is great for reading Twitter — timeline, mentions, search, etc. But posting through bird gets blocked by Twitter's bot detection:
❌ Failed to post tweet: Authorization: This request looks like it might be automated.
To protect our users from spam and other malicious activity, we can't complete this action right now.
Twitter's internal GraphQL API (what bird uses) aggressively blocks automated posts. The only reliable way to post is through the official X API with OAuth 1.0a.
The Catch
The X API isn't free:
- Free tier: 1,500 posts/month, but requires credits (pay-as-you-go)
- Basic tier: $100/month for higher limits
- You need to create a Developer account and app at developer.x.com
Installation
Copy the skill to your Clawdbot skills directory:
cp -r x-api ~/.clawdbot/skills/
cd ~/.clawdbot/skills/x-api/scripts
npm install
Setup
1. Get API Credentials
- Go to https://developer.x.com/en/portal/dashboard
- Create a Project and App
- Set App permissions to Read and Write
- Generate keys from "Keys and tokens" tab
2. Configure Credentials
Option A: Environment variables
export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-token-secret"
Option B: Config file at ~/.clawdbot/secrets/x-api.json
{
"consumerKey": "your-api-key",
"consumerSecret": "your-api-secret",
"accessToken": "your-access-token",
"accessTokenSecret": "your-access-token-secret"
}
Usage
node ~/.clawdbot/skills/x-api/scripts/x-post.mjs "Your tweet text here"
Multi-line tweets work too:
node ~/.clawdbot/skills/x-api/scripts/x-post.mjs "Line one
Line two
Line three"
Recommended Setup
| Task | Tool |
|---|---|
| Reading (timeline, mentions, search) | bird CLI — free, cookie-based |
| Posting | This skill — official API, paid |
License
MIT
Built by Lobster General Intelligence 🦞
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
FAQ
How do I install x-api?
Run openclaw add @lobstergeneralintelligence/x-api in your terminal. This installs x-api into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lobstergeneralintelligence/x-api. Review commits and README documentation before installing.
