Post to X (Twitter) using the OpenTweet API. Create tweets, schedule posts, publish threads, upload media, access analytics, and manage your X content autono...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install opentweet-x-poster或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install opentweet-x-poster⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/opentweet-x-poster/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: x-poster description: Post to X (Twitter) using the OpenTweet API. Create tweets, schedule posts, publish threads, upload media, access analytics, and manage your X content autonomously. version: 1.1.3 homepage: https://opentweet.io/features/openclaw-twitter-posting user-invocable: true metadata: {"openclaw":{"requires":{"env":["OPENTWEET_API_KEY"]},"primaryEnv":"OPENTWEET_API_KEY"}} ---
You can post to X (Twitter) using the OpenTweet REST API. All requests go to https://opentweet.io with the user's API key.
Every request needs this header:
Authorization: Bearer $OPENTWEET_API_KEY
Content-Type: application/json
For file uploads, use Content-Type: multipart/form-data instead.
ALWAYS verify the connection first:
GET https://opentweet.io/api/v1/me
This returns subscription status, daily post limits, and post counts. Check subscription.has_access is true and limits.remaining_posts_today > 0 before scheduling or publishing.
POST https://opentweet.io/api/v1/posts
Body: { "text": "Your tweet text" }
Optionally add "scheduled_date": "2026-03-01T10:00:00Z" to schedule it (requires active subscription, date must be in the future).
POST https://opentweet.io/api/v1/posts
Body: { "text": "Hello from the API!", "publish_now": true }
Creates the post AND publishes to X in one request. Cannot combine with scheduled_date or bulk posts. Response includes status: "posted", x_post_id, and url (the real X post URL) on success.
POST https://opentweet.io/api/v1/posts
Body: {
"text": "Check out this screenshot!",
"media_urls": ["https://url-from-upload-endpoint"]
}
Upload media first via POST /api/v1/upload, then pass the returned URL(s) in media_urls.
POST https://opentweet.io/api/v1/posts
Body: {
"text": "First tweet of the thread",
"is_thread": true,
"thread_tweets": ["Second tweet", "Third tweet"]
}
POST https://opentweet.io/api/v1/posts
Body: {
"text": "Thread intro with image",
"is_thread": true,
"thread_tweets": ["Second tweet", "Third tweet"],
"media_urls": ["https://intro-image-url"],
"thread_media": [["https://img-for-tweet-2"], []]
}
thread_media is an array of arrays. Each inner array contains media URLs for the corresponding tweet in thread_tweets. Use [] for tweets with no media.
POST https://opentweet.io/api/v1/posts
Body: {
"text": "Shared with the community!",
"community_id": "1234567890",
"share_with_followers": true
}
POST https://opentweet.io/api/v1/posts
Body: {
"posts": [
{ "text": "Tweet 1", "scheduled_date": "2026-03-01T10:00:00Z" },
{ "text": "Tweet 2", "scheduled_date": "2026-03-01T14:00:00Z" }
]
}
POST https://opentweet.io/api/v1/posts/{id}/schedule
Body: { "scheduled_date": "2026-03-01T10:00:00Z" }
The date must be in the future. Use ISO 8601 format.
POST https://opentweet.io/api/v1/posts/{id}/publish
No body needed. Posts to X right now. Response includes status: "posted", x_post_id, and url (the real X post URL).
POST https://opentweet.io/api/v1/posts/batch-schedule
Body: {
"schedules": [
{ "post_id": "id1", "scheduled_date": "2026-03-02T09:00:00Z" },
{ "post_id": "id2", "scheduled_date": "2026-03-03T14:00:00Z" }
],
"community_id": "optional-community-id",
"share_with_followers": true
}
GET https://opentweet.io/api/v1/posts?status=scheduled&page=1&limit=20
Status options: scheduled, posted, draft, failed
GET https://opentweet.io/api/v1/posts/{id}
PUT https://opentweet.io/api/v1/posts/{id}
Body: { "text": "Updated text", "media_urls": ["https://..."], "scheduled_date": "2026-03-01T10:00:00Z" }
All fields optional. Cannot update already-published posts. Set scheduled_date to null to unschedule (convert back to draft).
DELETE https://opentweet.io/api/v1/posts/{id}
POST https://opentweet.io/api/v1/upload
Content-Type: multipart/form-data
Body: [email protected]
Returns: { "url": "https://..." }
Supported formats: JPG, PNG, GIF, WebP (max 5MB), MP4, MOV (max 20MB).
Workflow: Upload first, then use the returned URL in media_urls or thread_media when creating/updating posts.
GET https://opentweet.io/api/v1/analytics/overview
Returns posting stats (total posts, publishing rate, active days, avg posts/week, most active day/hour, threads, media posts), streaks (current, longest), trends (this week vs last, this month vs last, best month), category breakdown, and recent activity (daily counts for last 7 and 30 days).
GET https://opentweet.io/api/v1/analytics/tweets?period=30
Returns per-tweet engagement: likes, retweets, replies, quotes, impressions, bookmarks, engagement rate. Also includes top/worst performers, content type stats, engagement timeline, and best hours/days. Period: 7-365 days or "all".
GET https://opentweet.io/api/v1/analytics/followers?days=30
Returns follower snapshots over time, current count, net growth, and growth percentage. Days: 7-365 or "all".
GET https://opentweet.io/api/v1/analytics/best-times
Analyzes your publishing patterns to find optimal hours and days. Requires at least 3 published posts.
GET https://opentweet.io/api/v1/analytics/growth
Returns daily/weekly/monthly growth rates, growth acceleration, milestone predictions (estimated dates to reach follower milestones), and posting-activity-to-growth correlation.
First: verify your connection works:
GET /api/v1/me — check authenticated is true, subscription.has_access is truePost a tweet right now (two steps):
GET /api/v1/me — check limits.can_post is truePOST /api/v1/posts with textPOST /api/v1/posts/{id}/publishPost a tweet right now (one step):
GET /api/v1/me — check limits.can_post is truePOST /api/v1/posts with { "text": "...", "publish_now": true }Post a tweet with an image:
GET /api/v1/me — check limitsPOST /api/v1/upload with the image file — get back a URLPOST /api/v1/posts with { "text": "...", "media_urls": [""] } POST /api/v1/posts/{id}/publishSchedule a tweet:
GET /api/v1/me — check limits.remaining_posts_today > 0POST /api/v1/posts with text and scheduled_date (done in one step)Schedule a week of content:
GET /api/v1/me — check remaining limitPOST /api/v1/posts with "posts": [...] array, each with a scheduled_dateCreate a thread with media:
POST /api/v1/upload for each filePOST /api/v1/posts with is_thread, thread_tweets, media_urls (for first tweet), and thread_media (for subsequent tweets)Batch schedule existing drafts:
POST /api/v1/posts with "posts": [...] (no scheduled_date)POST /api/v1/posts/batch-schedule with post IDs and datesCheck analytics before posting:
GET /api/v1/analytics/best-times — find optimal posting hoursGET /api/v1/analytics/overview — check posting streaks and trends...
安装 OpenTweet X Poster 后,可以对 AI 说这些话来触发它
Help me get started with OpenTweet X Poster
Explains what OpenTweet X Poster does, walks through the setup, and runs a quick demo based on your current project
Use OpenTweet X Poster to post to X (Twitter) using the OpenTweet API
Invokes OpenTweet X Poster with the right parameters and returns the result directly in the conversation
What can I do with OpenTweet X Poster in my marketing & growth workflow?
Lists the top use cases for OpenTweet X Poster, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/opentweet-x-poster/ 目录(个人级,所有项目可用),或 .claude/skills/opentweet-x-poster/(项目级)。重启 AI 客户端后,用 /opentweet-x-poster 主动调用,或让 AI 根据上下文自动发现并使用。
OpenTweet X Poster 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
OpenTweet X Poster 可免费安装使用。请查阅仓库了解许可证信息。
Post to X (Twitter) using the OpenTweet API. Create tweets, schedule posts, publish threads, upload media, access analytics, and manage your X content autono...
OpenTweet X Poster 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using OpenTweet X Poster
Identifies repetitive steps in your workflow and sets up OpenTweet X Poster to handle them automatically