闲社服务运行正常AI智能体自动化平台
a

自动推文

技能标识:auto-tweet

Post, search, like, retweet, bookmark, and manage a Twitter/X account via a local twikit-based API server on port 19816. Use when the user asks to tweet, search tweets, check timeline, like/retweet posts, or manage their X account. Replaces openclaw-x with fully auditable open-source Python code.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

自动推文

自动推文代理 — OpenClaw 技能

通过 twikit 实现安全、开源的 Twitter/X 自动化。
用完全可审计的 Python 代码替代 openclaw-x。

概述

该技能允许您通过自然语言控制 Twitter/X 账户。
本地 API 运行在 http://localhost:19816,并封装了开源
twikit 库(4.1K+ ⭐,MIT 许可证)。

无闭源二进制文件。无 Cookie 窃取风险。完全透明。

前提条件

必须运行 Auto-Tweet 服务器:
bash
cd ~/.openclaw/skills/auto-tweet
python main.py

可用操作

发布推文

bash curl -X POST http://localhost:19816/tweet \ -H Content-Type: application/json \ -d {text: 来自 OpenClaw 的问候!}

发布带媒体的推文

bash curl -X POST http://localhost:19816/tweet \ -H Content-Type: application/json \ -d {text: 看看这个!, media_paths: [/path/to/image.jpg]}

回复推文

bash curl -X POST http://localhost:19816/tweet \ -H Content-Type: application/json \ -d {text: 好观点!, replyto: TWEETID}

引用推文

bash curl -X POST http://localhost:19816/tweet \ -H Content-Type: application/json \ -d {text: 这太棒了!, quoteurl: https://x.com/user/status/TWEETID}

搜索推文

bash curl http://localhost:19816/search?q=AI+Agent&type=Latest&count=10

搜索用户

bash curl http://localhost:19816/search/users?q=openai&count=5

获取时间线(为你推荐)

bash curl http://localhost:19816/timeline?count=20

获取时间线(关注)

bash curl http://localhost:19816/timeline/following?count=20

点赞推文

bash curl -X POST http://localhost:19816/like \ -H Content-Type: application/json \ -d {tweetid: TWEETID}

取消点赞推文

bash curl -X POST http://localhost:19816/unlike \ -H Content-Type: application/json \ -d {tweetid: TWEETID}

转发

bash curl -X POST http://localhost:19816/retweet \ -H Content-Type: application/json \ -d {tweetid: TWEETID}

取消转发

bash curl -X POST http://localhost:19816/unretweet \ -H Content-Type: application/json \ -d {tweetid: TWEETID}

收藏推文

bash curl -X POST http://localhost:19816/bookmark \ -H Content-Type: application/json \ -d {tweetid: TWEETID}

获取收藏

bash curl http://localhost:19816/bookmarks?count=20

获取用户资料

bash curl http://localhost:19816/user/elonmusk

获取用户推文

bash curl http://localhost:19816/user/elonmusk/tweets?type=Tweets&count=10

获取特定推文

bash curl http://localhost:19816/tweet/TWEET_ID

删除推文

bash curl -X DELETE http://localhost:19816/tweet/TWEET_ID

获取热门话题

bash curl http://localhost:19816/trends?category=trending

发送私信

bash curl -X POST http://localhost:19816/dm \ -H Content-Type: application/json \ -d {userid: USERID, text: 你好!}

关注 / 取消关注

bash curl -X POST http://localhost:19816/follow/USER_ID curl -X POST http://localhost:19816/unfollow/USER_ID

获取通知

bash curl http://localhost:19816/notifications?type=Mentions&count=20

定时推文

bash curl -X POST http://localhost:19816/schedule \ -H Content-Type: application/json \ -d {text: 定时推文!, scheduled_at: 1735689600}

检查频率限制

bash curl http://localhost:19816/rate_limits

健康检查

bash curl http://localhost:19816/

频率限制(内置安全机制)

限制默认值目的
API 调用/小时30防止每小时突发
API 调用/天
200 | 匹配正常使用 | | 推文/天 | 20 | 保守发布 |

所有限制可在 config.json 中配置。

错误处理

所有端点返回标准 HTTP 状态码:

  • - 200 — 成功
  • 400 — 错误请求(无效参数)
  • 401 — 会话过期(重启服务器)
  • 403 — 账户问题(已暂停/锁定)
  • 409 — 重复推文
  • 429 — 超出频率限制
  • 500 — Twitter API 错误

安全说明

  • - 服务器仅绑定到 127.0.0.1(本地主机)— 无外部访问
  • 凭据保存在本地 config.json 中
  • Cookie 本地保存在 cookies.json 中
  • 所有代码均为开源 Python — 完全可审计
  • 无遥测,无外部回调
  • 频率限制器防止意外过度使用

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 auto-tweet-1776097993 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 auto-tweet-1776097993 技能

通过命令行安装

skillhub install auto-tweet-1776097993

下载

⬇ 下载 auto-tweet v1.0.0(免费)

文件大小: 11.39 KB | 发布时间: 2026-4-14 11:53

v1.0.0 最新 2026-4-14 11:53
Twitter/X automation skill via twikit - tweet, search, like, retweet, manage timeline
返回顶部