用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/javimosch/open-claw-skills --skill x-oauth-api命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | x-oauth-api |
| description | Post to X (Twitter) using the official OAuth 1.0a API. Free tier compatible. |
| metadata | {"openclaw":{"requires":{"env":"[Truncated]"}}} |
Post to X (formerly Twitter) using the official X API with OAuth 1.0a authentication.
This skill provides direct access to X API v2 for posting tweets, managing threads, and monitoring mentions. No proxy or third-party service required — uses your X API credentials directly.
Use when:
Store these environment variables (from your X Developer Account):
X_API_KEY # Consumer Key (API Key)
X_API_SECRET # Consumer Secret
X_ACCESS_TOKEN # Access Token
X_ACCESS_TOKEN_SECRET # Access Token Secret
X_USER_ID # Optional: Your numeric user ID (speeds up mentions)
Free tier supports:
x me)Requires Basic+ tier:
# Post a simple tweet
x post "Hello from X API"
# Post a thread
x thread "First tweet" "Second tweet" "Third tweet"
# Check mentions
x mentions --limit 10
# Search recent tweets
x search "AI agents" --limit 5
x post <text>Post a single tweet.
Options:
--reply-to <tweet-id> - Reply to a specific tweet--quote <tweet-id> - Quote tweet--media <file> - Attach image/videoExample:
x post "Check this out" --media image.jpg
x thread <tweet1> <tweet2> ...Post a tweet thread.
Example:
x thread \
"Thread about AI" \
"Here's what I learned" \
"Most important takeaway"
x mentions [options]Get recent mentions of your account.
Options:
--limit <n> - Number of mentions (default: 10, max: 100)--since <tweet-id> - Only mentions after this ID--format json - Output as JSONNote: Requires X_USER_ID env var OR will fetch it automatically (slower).
x search <query> [options]Search recent tweets.
Options:
--limit <n> - Number of results (default: 10, max: 100)--format json - Output as JSONx delete <tweet-id>Delete a tweet.
x meShow current account info (name, username, follower counts, user ID).
X API v2 has rate limits per endpoint:
| Endpoint | Limit | Window |
|---|---|---|
| POST /2/tweets | 200 | 15 min (Free tier) |
| GET /2/tweets/search/recent | 100 | 15 min (Free tier) |
| GET /2/users/:id/mentions | 100 | 15 min (Free tier) |
Rate limits vary by access tier. See X API documentation for details.
OAuth 1.0a is handled transparently. Just provide your credentials via environment variables. The skill will sign all requests automatically.
x post "Check out this screenshot" --media screenshot.png
x post "Great point!" --reply-to 1234567890123456789
x thread \
"Just launched x-oauth-api skill" \
"It lets you post to X directly from your agent" \
"No proxies, direct OAuth 1.0a authentication"
# Find interesting tweets
x search "agent framework"
# Reply to one
x post "Have you tried this?" --reply-to 1234567890123456789
"Unauthorized" error
"Rate limit exceeded"
"This endpoint requires a paid X API tier"
Tweet not posting
Free. X API is free for basic usage. Check your app's rate limits in X Developer Portal.
For X API issues, see: https://developer.twitter.com/en/docs/twitter-api