返回顶部
c

clawbird利爪鸟

X/Twitter integration — post, reply, search, like, follow, DMs, and mentions via the official X API v2

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
735
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

clawbird

Clawbird — X/Twitter 工具

您可以通过官方 X API v2 访问 13 个与 X(Twitter)交互的工具。所有工具均返回包含结果和预估 API 成本的 JSON 数据。

认证与凭证

本插件使用 OAuth 1.0a 用户上下文 进行写操作(发帖、点赞、关注、私信),并可选择使用 Bearer Token 进行只读操作(搜索、用户查询)。

凭证来源: 您必须在 X 开发者平台 生成凭证:

  1. 1. 在 developer.x.com 创建项目和应用
  2. 生成 OAuth 1.0a 密钥:API Key、API Secret、Access Token、Access Token Secret
  3. 可选:生成用于只读操作的 Bearer Token

凭证提供方式: 凭证在运行时通过 OpenClaw 插件配置系统(pluginConfig)传递给插件。插件从不直接读取配置文件。备用方案:环境变量 XAPIKEY、XAPISECRET、XACCESSTOKEN、XACCESSSECRET、XBEARERTOKEN。

凭证不会硬编码或捆绑。 如果缺少凭证,插件将返回明确的错误信息。

外部端点

所有网络请求仅发送至官方 X API v2。不联系任何其他主机。

端点方法工具发送数据
https://api.x.com/2/tweetsPOSTxposttweet、xpostthread、xreplytweet推文文本、回复元数据
https://api.x.com/2/tweets/:id
GET | xgettweet | 推文 ID |
| https://api.x.com/2/tweets/search/recent | GET | xsearchtweets | 搜索查询字符串 |
| https://api.x.com/2/users/me | GET | xliketweet、xgetmentions、xfollowuser | (仅认证头) |
| https://api.x.com/2/users/by/username/:username | GET | xgetuserprofile、xsenddm、xfollow_user | 用户名 |
| https://api.x.com/2/users/:id/likes | POST | xliketweet | 推文 ID |
| https://api.x.com/2/users/:id/mentions | GET | xgetmentions | 用户 ID、分页参数 |
| https://api.x.com/2/users/:id/following | POST | xfollowuser | 目标用户 ID |
| https://api.x.com/2/dmconversations/with/:id/messages | POST | xsend_dm | 消息文本、接收者 ID |
| https://api.x.com/2/dmconversations/with/:id/dmevents | GET | xgetdms(筛选) | 参与者 ID |
| https://api.x.com/2/dmevents | GET | xget_dms(全部) | 分页参数 |

安全与隐私

  • - 网络访问: 仅 api.x.com(官方 X API)。不联系任何其他域名。
  • 本地文件访问: 在工作目录中写入一个会话范围的 clawbird-interactions.jsonl 文件,记录变更操作(发帖、点赞、关注、私信),以便代理避免重复工作。除声明的环境变量外,不读取或写入任何其他文件。
  • 凭证处理: OAuth 令牌在运行时从插件配置或环境变量中读取,并通过签名的 HTTP 头传递给 X API。它们永远不会被记录、缓存到磁盘或传输给任何第三方。
  • 发送至 X 的数据: 仅限您在工具参数中明确提供的数据(推文文本、搜索查询、用户名、消息文本)。不会收集或发送任何额外的用户数据。
  • 从 X 接收的数据: 推文内容、用户资料、私信消息以及 X API 返回的互动指标。这些数据以 JSON 格式返回给代理,不会存储。

信任声明

Clawbird 是一个通过 npm 分发的技能——运行时代码通过 npm i -g @xonder/clawbird 安装,不捆绑在 ClawHub 技能存档中。以下安全属性可通过审计源代码进行验证:

  • - 源代码: https://github.com/xonder/clawbird(MIT 许可证)
  • npm: https://www.npmjs.com/package/@xonder/clawbird
  • 除 api.x.com 外不发起任何网络请求来源:src/client.ts
  • 读取和写入一个本地文件(clawbird-interactions.jsonl)用于会话交互日志记录——无其他文件系统访问(来源:src/interaction-log.ts
  • 除官方 @xdevplatform/xdk SDK 和 @sinclair/typebox 外无任何传递依赖
  • 包含全面的测试套件(200+ 测试),可通过 npm test 验证

由于此技能在运行时从 npm 安装代码,请在授予凭证前审查源代码或锁定特定版本(npm i -g @xonder/clawbird@1.1.0)。

写操作与自主使用

以下工具会修改您 X 账户的远程状态

工具操作可逆?
xposttweet发布推文手动删除
xpostthread
发布多条推文 | 手动删除 |
| xreplytweet | 回复推文 | 手动删除 |
| xliketweet | 点赞推文 | 手动取消点赞 |
| xfollowuser | 关注用户 | 手动取消关注 |
| xsenddm | 发送私信 | 无法撤回 |

建议: 如果自主运行,建议通过配置代理级工具策略,在写操作前要求用户明确确认。只读工具(xgettweet、xsearchtweets、xgetuserprofile、xgetmentions、xgetdms、xgetcostsummary)可安全用于自主使用。

可用工具

发布

xposttweet — 发布单条推文。

  • - text(必填):推文内容(最多 280 字符)
  • 返回:{ id, text, url, estimatedCost }

xpostthread — 发布多条推文组成的帖子。

  • - tweets(必填):推文文本数组(按顺序发布,每条回复上一条)
  • 返回:{ threadId, tweetCount, tweets: [{ id, text, url }], estimatedCost }

xreplytweet — 回复现有推文。

  • - tweetId(必填):推文 ID 或完整 URL(例如 https://x.com/user/status/123456)
  • text(必填):回复内容(最多 280 字符)
  • 返回:{ id, text, url, inReplyTo, estimatedCost }

互动

xliketweet — 点赞推文。

  • - tweetId(必填):推文 ID 或完整 URL
  • 返回:{ liked, tweetId, estimatedCost }

社交

xfollowuser — 关注用户。

  • - username(必填):要关注的用户名(带或不带 @)
  • 返回:{ following, user: { id, username }, estimatedCost }

研究

xgettweet — 通过 ID 或 URL 获取单条推文。

  • - tweetId(必填):推文 ID 或完整 URL(例如 https://x.com/user/status/123456)
  • 返回:{ id, text, authorId, createdAt, metrics, conversationId, lang, url, author: { id, name, username, verified, profileImageUrl }, estimatedCost }

xsearchtweets — 搜索近期推文(最近 7 天)。

  • - query(必填):搜索查询——支持 X 运算符,如 from:user、#hashtag、exact phrase、-exclude、lang:en
  • maxResults(可选):10–100,默认 10
  • 返回:{ query, resultCount, tweets: [{ id, text, authorId, createdAt, metrics, url }], estimatedCost }

xgetuser_profile — 获取用户资料。

  • - username(必填):用户名,带或不带 @
  • 返回:{ id, name, username, description, followersCount, followingCount, tweetCount, verified, profileImageUrl, url, createdAt, location,

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawbird-1776419970 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawbird-1776419970 技能

通过命令行安装

skillhub install clawbird-1776419970

下载

⬇ 下载 clawbird v1.0.3(免费)

文件大小: 4.4 KB | 发布时间: 2026-4-17 18:10

v1.0.3 最新 2026-4-17 18:10
**Security and trust section updated for clarity on credentials, installation, and review.**

- Clarified credential injection: credentials must be provided via OpenClaw plugin config at runtime; no direct config file reads.
- Updated trust statement to specify runtime npm installation, linking to source and npm, and suggesting source audit/pinning for security.
- Stated test coverage now at 200+ tests.
- Emphasized no bundled code—runtime code is installed from npm, not included in skill archive.
- Minor rewording of security and configuration sections for accuracy and transparency.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部