twitter-openclaw:自动化 X 和 Twitter 工作流 - Openclaw 技能库
什么是 twitter-openclaw?
twitter-openclaw 是一款专门设计的集成工具,旨在赋予 AI 智能体访问 Twitter/X 生态系统的完整权限。通过利用 twclaw 命令行工具,该技能允许智能体执行复杂的社交媒体操作,从通过搜索进行情绪分析到通过点赞和转发进行积极的社区互动。作为 Openclaw 技能生态系统的核心组件,它提供了一种结构化方式来弥合大语言模型(LLM)与实时社交数据之间的差距。
该工具专为需要自动化社交媒体监控或内容分发且无需人工干预的开发者构建。它处理了 Twitter API 的复杂性,包括分页和身份验证,提供了一个完美契合自动化 AI 工作流的简洁接口。将此工具集成到您的 Openclaw 技能集合中,可确保您的智能体紧跟全球对话的脉搏。
下载入口:https://github.com/openclaw/skills/tree/main/skills/annettemekuro30/x-twitter安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install x-twitter
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 x-twitter。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
twitter-openclaw 应用场景
- 通过搜索特定关键词或提及来自动化品牌监控。
- 总结长信息流,用于研究和知识管理。
- 调度并发布自动化更新或富媒体公告。
- 追踪特定地理区域的热门话题,进行市场分析。
- 通过点赞或回复相关的用户互动来管理社区参与度。
- 该技能使用 Bearer Token 以及用于写入权限的可选 API 密钥对 Twitter API 进行身份验证。
- AI 智能体根据用户请求调用特定的 twclaw 命令(例如搜索、阅读或发布)。
- 该工具从 Twitter/X 获取数据,并将其格式化为人类可读的文本或机器可读的 JSON。
- 对于发布推文或转发等互动操作,该技能遵循安全协议,在执行前确认操作。
- 结果返回给智能体,由其进行总结、分析或呈现给用户。
twitter-openclaw 配置指南
要开始使用此技能,请安装 twclaw 软件包并配置环境变量:
npm install -g twclaw
export TWITTER_BEARER_TOKEN='your_bearer_token'
# 可选:用于写入权限
export TWITTER_API_KEY='your_key'
export TWITTER_API_SECRET='your_secret'
twclaw auth-check
twitter-openclaw 数据架构与分类体系
该技能组织从 Twitter/X 检索到的数据,以确保 AI 智能体能够有效地解析和展示。下表描述了标准元数据结构:
| 属性 | 描述 |
|---|---|
| 作者/句柄 | 发布内容的用户的标识符 |
| 内容 | 推文的全文,包括线索上下文 |
| 互动 | 点赞、转发和回复的实时计数 |
| 时间戳 | 用于时间线和线索排序的时间数据 |
| JSON Schema | 可通过 --json 标志获取完整的原始元数据,用于程序化处理 |
name: twitter-openclaw
description: Interact with Twitter/X — read tweets, search, post, like, retweet, and manage your timeline.
user-invocable: true
metadata: {"openclaw":{"emoji":"????","skillKey":"twitter-openclaw","primaryEnv":"TWITTER_BEARER_TOKEN","requires":{"bins":["twclaw"],"env":["TWITTER_BEARER_TOKEN"]},"install":[{"id":"npm","kind":"node","package":"twclaw","bins":["twclaw"],"label":"Install twclaw (npm)"}]}}
twitter-openclaw ????
Interact with Twitter/X posts, timelines, and users from OpenClaw.
Authentication
Requires a Twitter API Bearer Token set as TWITTER_BEARER_TOKEN.
Optionally set TWITTER_API_KEY and TWITTER_API_SECRET for write operations (post, like, retweet).
Run twclaw auth-check to verify credentials.
Commands
Reading
twclaw read <tweet-url-or-id> # Read a single tweet with full metadata
twclaw thread <tweet-url-or-id> # Read full conversation thread
twclaw replies <tweet-url-or-id> -n 20 # List replies to a tweet
twclaw user <@handle> # Show user profile info
twclaw user-tweets <@handle> -n 20 # User's recent tweets
Timelines
twclaw home -n 20 # Home timeline
twclaw mentions -n 10 # Your mentions
twclaw likes <@handle> -n 10 # User's liked tweets
Search
twclaw search "query" -n 10 # Search tweets
twclaw search "from:elonmusk AI" -n 5 # Search with operators
twclaw search "#trending" --recent # Recent tweets only
twclaw search "query" --popular # Popular tweets only
Trending
twclaw trending # Trending topics worldwide
twclaw trending --woeid 23424977 # Trending in specific location
Posting
twclaw tweet "hello world" # Post a tweet
twclaw reply <tweet-url-or-id> "great thread!" # Reply to a tweet
twclaw quote <tweet-url-or-id> "interesting take" # Quote tweet
twclaw tweet "look at this" --media image.png # Tweet with media
Engagement
twclaw like <tweet-url-or-id> # Like a tweet
twclaw unlike <tweet-url-or-id> # Unlike a tweet
twclaw retweet <tweet-url-or-id> # Retweet
twclaw unretweet <tweet-url-or-id> # Undo retweet
twclaw bookmark <tweet-url-or-id> # Bookmark a tweet
twclaw unbookmark <tweet-url-or-id> # Remove bookmark
Following
twclaw follow <@handle> # Follow user
twclaw unfollow <@handle> # Unfollow user
twclaw followers <@handle> -n 20 # List followers
twclaw following <@handle> -n 20 # List following
Lists
twclaw lists # Your lists
twclaw list-timeline <list-id> -n 20 # Tweets from a list
twclaw list-add <list-id> <@handle> # Add user to list
twclaw list-remove <list-id> <@handle> # Remove user from list
Output Options
--json # JSON output
--plain # Plain text, no formatting
--no-color # Disable ANSI colors
-n <count> # Number of results (default: 10)
--cursor <val> # Pagination cursor for next page
--all # Fetch all pages (use with caution)
Guidelines for OpenClaw
- When reading tweets, always show: author, handle, text, timestamp, engagement counts.
- For threads, present tweets in chronological order.
- When searching, summarize results concisely with key metrics.
- Before posting/liking/retweeting, confirm the action with the user.
- Rate limits apply — space out bulk operations.
- Use
--jsonwhen you need to process output programmatically.
Troubleshooting
401 Unauthorized
Check that TWITTER_BEARER_TOKEN is set and valid.
429 Rate Limited
Wait and retry. Twitter API has strict rate limits per 15-minute window.
TL;DR: Read, search, post, and engage on Twitter/X. Always confirm before write actions.
-
08.08
超自然行动组遇到蛤蟆如何应对
-
08.08
烟雨江湖步惊云天赋武学如何介绍
-
08.08
如何选择无畏契约港服账号交易平台
-
08.08
寂静岭f拜殿回忆谜题如何解
-
08.08
microsoft/xclip-base-patch16-zero-shot-X-CLIP (base-sized model) ...
-
08.08
吉星派对礼物大作战帕露南如何打
-
-
-
- 9年出了6部《生化危机》 卡普空神作IP火力全开
- 08.08
-
- 米达斯核心玩法解析 涡流机制与全能配装攻略
- 08.08
-
- 无悔华夏安史之乱回纥攻略
- 08.08
-
-
-
下载
- |
-
-
下载
- 《行尸走肉第一章》免安装中文汉化硬盘版下载
- 单机|436 MB
- 一款以动作冒险为主题的游戏
-
-
下载
- 《街头霸王X铁拳》免安装中文汉化硬盘版下载
- 单机|111MB
- 一款非常好玩的格斗游戏
-
-
下载
- |
-
-
下载
- 《暗黑破坏神3》免安装繁体中文正式版下载
- 单机|7630 MB
- 一款以角色扮演为主题的游戏
-
-
下载
- 《马克思佩恩3》免安装硬盘版下载
- 单机|27033 MB
- 一款以第三人称射击为主题的游戏