x-api
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.
Why use this skill?
Automate your posts to X (Twitter) using OpenClaw x-api. Reliable OAuth 1.0a authentication for tweets, status updates, and content broadcasting.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lobstergeneralintelligence/x-apiWhat This Skill Does
The x-api skill provides a robust, reliable method for posting content directly to X (formerly Twitter) using the official X API v2 and OAuth 1.0a authentication. Unlike browser-based scraping or cookie-reliant tools that often trigger X's aggressive bot detection, x-api interacts with the backend platform via verified developer credentials. This ensures high deliverability, persistence, and adherence to platform policies. It is designed specifically for automated posting, whether you are managing a personal brand, announcing updates, or distributing content via OpenClaw AI agents.
Installation
Installation is straightforward and requires three key steps. First, ensure you have your API credentials from the X Developer Portal with 'Read and Write' permissions explicitly enabled. Second, you must configure your environment variables or create a local config file at ~/.clawdbot/secrets/x-api.json with your consumer keys and access tokens. Finally, install the necessary dependency by running npm install -g twitter-api-v2 in your terminal. For OpenClaw users, you can run the command clawhub install openclaw/skills/skills/lobstergeneralintelligence/x-api to pull the skill directly into your environment.
Use Cases
- Automated status updates: Keeping followers informed of long-running agent tasks.
- Content distribution: Sharing insights or reports generated by your AI agent directly to social feeds.
- Consistent engagement: Maintaining a presence on X without manual intervention.
- Reliable broadcasting: Bypassing the instability of web-scraping bots for time-sensitive announcements.
Example Prompts
- "Post a tweet saying: 'I've just completed the analysis of the quarterly financial reports. The trends indicate a 15% increase in efficiency.'"
- "Please update my followers with the following status: 'OpenClaw system maintenance is now complete. All services are back online.'"
- "Share this summary to X: 'AI Agent update: I have finished indexing the new knowledge base. Query performance is now significantly improved.'"
Tips & Limitations
To maintain service, always monitor your X Developer Portal. If you encounter a 402 error, your credits are depleted and you need to add funds; a 401 error typically indicates an issue with your OAuth tokens, which can be resolved by regenerating them in the developer dashboard. Note that this skill is strictly for writing to X. For reading timelines or searching for mentions, you should supplement this with the 'bird' CLI. Be mindful of X's rate limits, especially on the Free tier, which is limited to 1,500 posts per month. Proper credential security is essential; never share your x-api.json file or export your secrets in public repositories.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lobstergeneralintelligence-x-api": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, file-read