重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
x-twitter-api by tato418/x-twitter-api
npx skills add https://github.com/tato418/x-twitter-api --skill x-twitter-api使用已认证用户自身开发者凭证(OAuth 1.0a,按使用付费)的 X (Twitter) API v2 技能。所有命令都通过单一入口点执行:node x.js <command> [flags]。每个命令都有其自己的文档文件,其中包含标志和行为的完整参考。
[!SETUP] 首次使用前,请检查 ./node_modules 是否存在。如果它不存在,请运行 npm install。然后检查 ./dist/x.js 是否存在。如果它不存在,请运行 npm run build。切勿 cd 进入技能目录;使用相对路径或 --prefix 来定位它,而无需更改您的工作目录。
[!COMMANDS]
核心功能:
a) me — 获取已认证用户自身的账户数据(个人资料、指标、验证状态)。@docs/me.md。
b) search — 按查询搜索帖子(最近 7 天或完整存档)。@docs/search.md。
c) get — 按 ID 检索一个或多个帖子。@docs/get.md。
d) — 创建推文、回复或引用推文。@docs/post.md。
e) — 删除由已认证用户拥有的帖子。@docs/delete.md。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
postdelete互动功能:
f) like — 按推文 ID 点赞帖子。@docs/like.md。
g) unlike — 取消对帖子的点赞。@docs/like.md。
h) repost — 转发(转推)帖子。@docs/repost.md。
i) unrepost — 移除转发。@docs/repost.md。
社交功能:
j) user — 通过用户名或 ID 查找用户。@docs/user.md。
k) follow — 通过用户名或 ID 关注用户。@docs/follow.md。
l) unfollow — 取消关注用户。@docs/follow.md。
m) followers — 列出用户的关注者。@docs/followers.md。
n) following — 列出用户关注的账户。@docs/followers.md。
信息流:
o) timeline — 您的主页时间线(倒序)。@docs/timeline.md。
p) mentions — 提及您的帖子。@docs/mentions.md。
书签:
q) bookmark — 收藏帖子。@docs/bookmark.md。
r) unbookmark — 移除收藏。@docs/bookmark.md。
s) bookmarks — 列出您的收藏。@docs/bookmark.md。
管理:
t) mute — 屏蔽用户。@docs/mute.md。
u) unmute — 取消屏蔽用户。@docs/mute.md。
v) muted — 列出已屏蔽的账户。@docs/mute.md。
w) blocked — 列出已拉黑的账户。@docs/blocked.md。
x) hide-reply — 隐藏对您帖子的回复。@docs/hide-reply.md。
分析:
y) likers — 点赞帖子的用户。@docs/likers.md。
z) reposters — 转发帖子的用户。@docs/reposters.md。
aa) quotes — 帖子的引用推文。@docs/quotes.md。
ab) count — 统计一段时间内匹配查询的帖子数量。@docs/count.md。
ac) reposts-of-me — 他人对您帖子的转发。@docs/reposts-of-me.md。
发现:
ad) search-users — 按查询搜索用户。@docs/search-users.md。
ae) trending — 热门话题(全球或个人化)。@docs/trending.md。
[!PARAMETERS]
核心功能:
me: 无参数search: query:string, [max_results?:number, since?:date, until?:date]get: id:string | ids:string[]post: text:string, [reply_to?:string, quote_id?:string]delete: id:string互动功能:
like: id:stringunlike: id:stringrepost: id:stringunrepost: id:string社交功能:
user: user:string, [expansions?:string, tweet_fields?:string, user_fields?:string]follow: user:stringunfollow: user:stringfollowers: [user?:string, max_results?:number, pagination_token?:string]following: [user?:string, max_results?:number, pagination_token?:string]信息流:
timeline: [max_results?:number, pagination_token?:string]mentions: [max_results?:number, pagination_token?:string]书签:
bookmark: id:stringunbookmark: id:stringbookmarks: [max_results?:number, pagination_token?:string]管理:
mute: user:stringunmute: user:stringmuted: [max_results?:number, pagination_token?:string]blocked: [max_results?:number, pagination_token?:string]hide-reply: id:string分析:
likers: id:string, [max_results?:number, pagination_token?:string]reposters: id:string, [max_results?:number, pagination_token?:string]quotes: id:string, [max_results?:number, pagination_token?:string]count: query:string, [granularity?:string, start_time?:date, end_time?:date]reposts-of-me: [max_results?:number, pagination_token?:string]发现:
search-users: query:string, [max_results?:number]trending: [woeid?:number][!OUTPUT]
所有命令返回具有标准结构的 JSON:
{
"success": boolean,
"data": object | array | string,
"error": string | null
}
示例:
{"success": true, "data": {...}, "error": null}{"success": true, "data": [...], "error": null}{"success": false, "data": null, "error": "Error description"}[!ERRORS]
标准错误代码:
400 - 错误请求:参数无效或请求格式错误401 - 未授权:凭证无效或已过期403 - 禁止访问:访问被拒绝或权限不足404 - 未找到:资源不存在429 - 请求过多:超出速率限制500 - 内部服务器错误:X API 服务器错误502 - 网关错误:X API 不可用503 - 服务不可用:X API 过载错误处理:
retry-after 头部[!RATE-LIMITS]
X API v2 速率限制(OAuth 1.0a):
最佳实践:
[!CREDENTIALS]
需要四个 OAuth 1.0a 变量:X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET。它们从第一个提供它们的来源解析:
a) 当前工作目录下的 .env.local 文件
b) 当前工作目录下的 .env 文件
c) 插件目录下的 .env.local 文件
d) 插件目录下的 .env 文件
f) 环境变量
从 X 开发者控制台(应用 > 密钥和令牌)获取它们。
安全注意事项:
.env 文件每周安装数
139
仓库
首次出现
2026年2月5日
安全审计
安装于
opencode126
gemini-cli123
codex123
github-copilot121
cursor117
openclaw116
X (Twitter) API v2 skill using the authenticated user's own developer credentials (OAuth 1.0a, pay-per-use). All commands go through a single entry point: node x.js <command> [flags]. Each command has its its own doc file with the full reference for flags and behavior.
[!SETUP] Before first use, check whether ./node_modules exists. If it does NOT exist, run npm install. Then check whether ./dist/x.js exists. If it does NOT exist, run npm run build. NEVER cd into the skill directory; use relative paths or --prefix to target it without changing your working directory.
[!COMMANDS]
Core: a) me — authenticated user's own account data (profile, metrics, verification). @docs/me.md. b) search — search posts by query (last 7 days or full archive). @docs/search.md. c) get — retrieve one or more posts by ID. @docs/get.md. d) post — create a tweet, reply, or quote tweet. @docs/post.md. e) delete — delete a post owned by the authenticated user. @docs/delete.md.
Engagement: f) like — like a post by tweet ID. @docs/like.md. g) unlike — remove a like from a post. @docs/like.md. h) repost — repost (retweet) a post. @docs/repost.md. i) unrepost — remove a repost. @docs/repost.md.
Social: j) user — look up user(s) by username or ID. @docs/user.md. k) follow — follow a user by username or ID. @docs/follow.md. l) unfollow — unfollow a user. @docs/follow.md. m) followers — list a user's followers. @docs/followers.md. n) following — list accounts a user follows. @docs/followers.md.
Feed: o) timeline — your home timeline (reverse chronological). @docs/timeline.md. p) mentions — posts that mention you. @docs/mentions.md.
Bookmarks: q) bookmark — bookmark a post. @docs/bookmark.md. r) unbookmark — remove a bookmark. @docs/bookmark.md. s) bookmarks — list your bookmarks. @docs/bookmark.md.
Moderation: t) mute — mute a user. @docs/mute.md. u) unmute — unmute a user. @docs/mute.md. v) muted — list muted accounts. @docs/mute.md. w) blocked — list blocked accounts. @docs/blocked.md. x) hide-reply — hide a reply to your post. @docs/hide-reply.md.
Analytics: y) likers — users who liked a post. @docs/likers.md. z) reposters — users who reposted a post. @docs/reposters.md. aa) quotes — quote tweets of a post. @docs/quotes.md. ab) count — count posts matching a query over time. @docs/count.md. ac) reposts-of-me — reposts of your posts by others. @docs/reposts-of-me.md.
Discovery: ad) search-users — search users by query. @docs/search-users.md. ae) trending — trending topics (worldwide or personalized). @docs/trending.md.
[!PARAMETERS]
Core:
me: No parameterssearch: query:string, [max_results?:number, since?:date, until?:date]get: id:string | ids:string[]post: text:string, [reply_to?:string, quote_id?:string]delete: id:stringEngagement:
like: id:stringunlike: id:stringrepost: id:stringunrepost: id:stringSocial:
user: user:string, [expansions?:string, tweet_fields?:string, user_fields?:string]follow: user:stringunfollow: user:stringfollowers: [user?:string, max_results?:number, pagination_token?:string]following: [user?:string, max_results?:number, pagination_token?:string]Feed:
timeline: [max_results?:number, pagination_token?:string]mentions: [max_results?:number, pagination_token?:string]Bookmarks:
bookmark: id:stringunbookmark: id:stringbookmarks: [max_results?:number, pagination_token?:string]Moderation:
mute: user:stringunmute: user:stringmuted: [max_results?:number, pagination_token?:string]blocked: [max_results?:number, pagination_token?:string]hide-reply: id:stringAnalytics:
likers: id:string, [max_results?:number, pagination_token?:string]reposters: id:string, [max_results?:number, pagination_token?:string]quotes: id:string, [max_results?:number, pagination_token?:string]count: query:string, [granularity?:string, start_time?:date, end_time?:date]reposts-of-me: [max_results?:number, pagination_token?:string]Discovery:
search-users: query:string, [max_results?:number]trending: [woeid?:number][!OUTPUT]
All commands return JSON with standard structure:
{
"success": boolean,
"data": object | array | string,
"error": string | null
}
Examples:
{"success": true, "data": {...}, "error": null}{"success": true, "data": [...], "error": null}{"success": false, "data": null, "error": "Error description"}[!ERRORS]
Standard error codes:
400 - Bad Request: Invalid parameters or malformed request401 - Unauthorized: Invalid or expired credentials403 - Forbidden: Access denied or insufficient permissions404 - Not Found: Resource does not exist429 - Too Many Requests: Rate limit exceeded500 - Internal Server Error: X API server error502 - Bad Gateway: X API unavailable503 - Service Unavailable: X API overloadedError handling:
retry-after header[!RATE-LIMITS]
X API v2 rate limits (OAuth 1.0a):
Best practices:
[!CREDENTIALS]
Four OAuth 1.0a variables are REQUIRED: X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET. They resolve from the first source that provides them:
a) .env.local in cwd b) .env in cwd c) .env.local in the plugin directory d) .env in the plugin directory f) Environment variables
Obtain them from the X Developer Console (Apps > Keys and tokens).
Security notes:
.env files for local developmentWeekly Installs
139
Repository
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode126
gemini-cli123
codex123
github-copilot121
cursor117
openclaw116
Lark Contact CLI 工具:高效搜索与获取飞书用户信息,提升团队协作效率
44,400 周安装
video-understand:离线视频理解工具,使用FFmpeg提取帧+Whisper转录,无需API密钥
940 周安装
技术债务管理工具 - 系统识别、分类、优先级排序与修复计划 | 开发效率提升
908 周安装
Graft 框架:一次定义,同时提供 HTTP 和 MCP 服务的 API 开发与代理工具
916 周安装
Stock Monitor Pro - 全功能智能股票监控预警系统,支持7大规则与分级预警
938 周安装
macOS Seatbelt沙盒配置生成工具 - 最小权限应用程序隔离与安全分析
976 周安装
Nuxt 4 模式指南:SSR、混合渲染、路由规则与数据获取最佳实践
1,000 周安装