Token导航 LogoToken导航

Agent Skill · 研究检索

twitter-cli(twitter CLI 搜索)

twitter-cli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

twitter-cli 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 15,480。

总安装 7,830周安装 323GitHub Stars 2,303下载 2,558核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:twitter-cli(twitter CLI 搜索)
来源仓库:https://github.com/jackwener/twitter-cli
仓库路径:skills/twitter-cli
安装命令:
npx skills add https://github.com/jackwener/twitter-cli --skill twitter-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jackwener/twitter-cli --skill twitter-cli

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。可结合来源仓库和原始 README 核验具体用法。

安装命令:npx skills add https://github.com/jackwener/twitter-cli --skill twitter-cli 安装前建议确认权限范围和是否会触发联网操作。

来源仓库内路径:skills/twitter-cli

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jackwener/twitter-cli --skill twitter-cli;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

twitter-cli 怎么安装?

在终端执行 npx skills add https://github.com/jackwener/twitter-cli --skill twitter-cli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

twitter-cli 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

twitter-cli 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

twitter-cli 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

twitter-cli 用的人多吗?

公开数据是累计安装 7,830 次,近一周安装 323 次,下载 2,558 次,GitHub 2,303 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

twitter-cli 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 2,303 星,维护活跃度相对可查。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
twitter-cli

twitter CLI 搜索 · 本页

7,8302,303接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

twitter-cli — Twitter/X CLI Tool

Binary: twitter Credentials: browser cookies (auto-extracted) or env vars

Setup

# Install (requires Python 3.8+)
uv tool install twitter-cli
# Or: pipx install twitter-cli

# Upgrade to latest (recommended to avoid API errors)
uv tool upgrade twitter-cli
# Or: pipx upgrade twitter-cli

Authentication

IMPORTANT FOR AGENTS: Before executing ANY twitter-cli command, you MUST first check if credentials exist. If not, you MUST proactively guide the user through the authentication process. Do NOT assume credentials are configured.

CRITICAL: Write operations (posting tweets, replying, quoting) REQUIRE full browser cookies. Only providing auth_token + ct0 via env vars may result in 226 error ("looks like automated behavior"). For best results, use browser cookie extraction.

Step 0: Check if already authenticated

twitter status --yaml >/dev/null && echo "AUTH_OK" || echo "AUTH_NEEDED"

If AUTH_OK, skip to Command Reference. If AUTH_NEEDED, proceed to guide the user:

Step 1: Guide user to authenticate

Method A: Browser cookie extraction (recommended)

Ensure user is logged into x.com in one of: Arc, Chrome, Edge, Firefox, Brave. twitter-cli auto-extracts cookies. All Chrome profiles are scanned automatically. To specify a profile: TWITTER_CHROME_PROFILE="Profile 2" twitter feed. To prioritize a specific browser: TWITTER_BROWSER=chrome twitter feed (supported: arc, chrome, edge, firefox, brave).

twitter whoami

Method B: Environment variables

export TWITTER_AUTH_TOKEN="<auth_token from browser>"
export TWITTER_CT0="<ct0 from browser>"
twitter whoami

Method C: Full cookie string (for cloud/remote agents)

Tell the user:

我需要你的 Twitter 登录凭证。请按以下步骤获取: 1. 用 Chrome/Edge/Firefox 打开 https://x.com(确保已登录) 2. 按 F12 打开开发者工具 → Network 标签 3. 在页面上刷新,点击任意 x.com 请求 4. 找到 Request Headers → Cookie: 这一行,右键 → 复制值 5. 把完整 Cookie 字符串发给我 ⚠️ Cookie 包含登录信息,请不要分享给其他人。

Then extract and set env vars:

FULL_COOKIE="<user's cookie string>"
export TWITTER_AUTH_TOKEN=$(echo "$FULL_COOKIE" | grep -oE 'auth_token=[a-f0-9]+' | cut -d= -f2)
export TWITTER_CT0=$(echo "$FULL_COOKIE" | grep -oE 'ct0=[a-f0-9]+' | cut -d= -f2)
twitter whoami

Step 2: Handle common auth issues

SymptomAgent action
No Twitter cookies foundGuide user to login to x.com in browser, or set env vars
Read works, write returns 226Full cookies missing — use browser cookie extraction instead of env vars
Cookie expired (401/403)Ask user to re-login to x.com and retry
User changed passwordAll old cookies invalidated — re-extract

Output Format

Default: Rich table (human-readable)

twitter feed                          # Pretty table output

YAML / JSON: structured output

Non-TTY stdout defaults to YAML automatically. Use OUTPUT=yaml|json|rich|auto to override.

twitter feed --yaml
twitter feed --json | jq '.[0].text'

All machine-readable output uses the envelope documented in SCHEMA.md. Tweet and user payloads now live under .data.

Full text: --full-text flag (rich tables only)

Use --full-text when the user wants complete post bodies in terminal tables. It affects rich table list views such as feed, bookmarks, search, user-posts, likes, list, and reply tables in tweet. It does not change --json, --yaml, or -c compact output.

twitter feed --full-text
twitter search "AI agent" --full-text
twitter user-posts elonmusk --max 20 --full-text
twitter tweet 1234567890 --full-text

Compact: -c flag (minimal tokens for LLM)

twitter -c feed --max 10              # Minimal fields, great for LLM context
twitter -c search "AI" --max 20       # ~80% fewer tokens than --json

Compact fields (per tweet): id, author (@handle), text (truncated 140 chars), likes, rts, time (short format)

Command Reference

Read Operations

twitter status                         # Quick auth check
twitter status --yaml                  # Structured auth status
twitter whoami                         # Current authenticated user
twitter whoami --yaml                  # YAML output
twitter whoami --json                  # JSON output
twitter user elonmusk                  # User profile
twitter user elonmusk --json           # JSON output
twitter feed                           # Home timeline (For You)
twitter feed -t following              # Following timeline
twitter feed --max 50                  # Limit count
twitter feed --full-text               # Show full post body in table
twitter feed --filter                  # Enable ranking filter
twitter feed --yaml > tweets.yaml      # Export as YAML
twitter feed --input tweets.json       # Read from local JSON file
twitter bookmarks                      # Bookmarked tweets
twitter bookmarks --full-text          # Full text in bookmarks table
twitter bookmarks --max 30 --yaml
twitter search "keyword"               # Search tweets
twitter search "AI agent" -t Latest --max 50
twitter search "AI agent" --full-text  # Full text in search results
twitter search "topic" -o results.json # Save to file
twitter tweet 1234567890               # Tweet detail + replies
twitter tweet 1234567890 --full-text   # Full text in reply table
twitter tweet https://x.com/user/status/12345  # Accepts URL
twitter show 2                         # Open tweet #2 from last feed/search list
twitter show 2 --full-text             # Full text in reply table
twitter show 2 --json                  # Structured output
twitter list 1539453138322673664       # List timeline
twitter list 1539453138322673664 --full-text
twitter user-posts elonmusk --max 20   # User's tweets
twitter user-posts elonmusk --full-text
twitter likes elonmusk --max 30        # User's likes (own only, see note)
twitter likes elonmusk --full-text
twitter followers elonmusk --max 50    # Followers
twitter following elonmusk --max 50    # Following

Write Operations

twitter post "Hello from twitter-cli!"              # Post tweet
twitter post "Hello!" --image photo.jpg              # Post with image
twitter post "Gallery" -i a.png -i b.jpg             # Up to 4 images
twitter reply 1234567890 "Great tweet!"              # Reply (standalone)
twitter reply 1234567890 "Nice!" -i pic.png          # Reply with image
twitter post "reply text" --reply-to 1234567890      # Reply (via post)
twitter quote 1234567890 "Interesting take"          # Quote-tweet
twitter quote 1234567890 "Look" -i chart.png         # Quote with image
twitter delete 1234567890                            # Delete tweet
twitter like 1234567890                              # Like
twitter unlike 1234567890                            # Unlike
twitter retweet 1234567890                           # Retweet
twitter unretweet 1234567890                         # Unretweet
twitter bookmark 1234567890                          # Bookmark
twitter unbookmark 1234567890                        # Unbookmark
twitter follow elonmusk                              # Follow user
twitter unfollow elonmusk                            # Unfollow user

Image upload notes:

  • Supported formats: JPEG, PNG, GIF, WebP
  • Max file size: 5 MB per image
  • Max 4 images per tweet
  • Use --image / -i (repeatable)

Agent Workflows

Post and verify

twitter post "My tweet text" 2>/dev/null
# Output includes tweet URL: 🔗 https://x.com/i/status/<id>

Post with images

# Single image
twitter post "Check this out!" --image /path/to/photo.jpg

# Multiple images
twitter post "Photo gallery" -i img1.png -i img2.jpg -i img3.webp

Reply to someone's latest tweet

TWEET_ID=$(twitter user-posts targetuser --max 1 --json | jq -r '.data[0].id')
twitter reply "$TWEET_ID" "Nice post!"

Create a thread

# Post first tweet, capture output for tweet ID
twitter post "Thread 1/3: First point"
# Note the tweet ID from output, then:
twitter reply <first_tweet_id> "2/3: Second point"
twitter reply <second_tweet_id> "3/3: Final point"

Quote-tweet with commentary

TWEET_ID=$(twitter search "interesting topic" --max 1 --json | jq -r '.data[0].id')
twitter quote "$TWEET_ID" "This is a great insight!"

Like all search results

twitter search "interesting topic" --max 5 --json | jq -r '.data[].id' | while read id; do
  twitter like "$id"
done

Get user info then follow

twitter user targethandle --json | jq '.data | {username, followers, bio}'
twitter follow targethandle

Find most popular tweets from a user

twitter user-posts elonmusk --max 20 --json | jq '.data | sort_by(.metrics.likes) | reverse | .[:3] | .[] | {id, text: .text[:80], likes: .metrics.likes}'

Check follower relationship

MY_NAME=$(twitter whoami --json | jq -r '.data.user.username')
twitter followers "$MY_NAME" --max 200 --json | jq -r '.data[].username' | grep -q "targetuser" && echo "Yes" || echo "No"

Daily reading workflow

# Compact mode for token-efficient LLM context
twitter -c feed -t following --max 30
twitter -c bookmarks --max 20

# Rich table with complete post bodies
twitter feed -t following --max 20 --full-text
twitter search "AI agent" --max 20 --full-text

# Full JSON for analysis
twitter feed -t following --max 30 -o following.json
twitter bookmarks --max 20 -o bookmarks.json

Search with jq filtering

# Tweets with > 100 likes
twitter search "AI safety" --max 20 --json | jq '[.data[] | select(.metrics.likes > 100)]'

# Extract just text and author
twitter search "rust lang" --max 10 --json | jq '.data[] | {author: .author.screenName, text: .text[:100]}'

# Most engaged tweets
twitter search "topic" --max 20 --json | jq '.data | sort_by(.metrics.likes) | reverse | .[:5] | .[].id'

Ranking Filter

Filtering is opt-in. Enable with --filter:

twitter feed --filter
twitter bookmarks --filter

Error Reference

ErrorCauseFix
No Twitter cookies foundNot authenticatedLogin to x.com in browser, or set env vars
HTTP 226Automated detectionUse browser cookie extraction (not env vars)
HTTP 401/403Cookie expiredRe-login to x.com and retry
HTTP 404QueryId rotationRetry (auto-fallback built in)
HTTP 429Rate limitedWait 15+ minutes, then retry
Error 187Duplicate tweetChange text content
Error 186Tweet too longKeep under 280 chars

Limitations

  • Images only — video/GIF animation upload not yet supported (image upload supports JPEG/PNG/GIF/WebP)
  • No DMs — no direct messaging
  • No notifications — can't read notifications
  • No polls — can't create polls
  • Single account — one set of credentials at a time
  • Likes are private — Twitter/X made all likes private since June 2024. twitter likes only works for your own account

Safety Notes

  • Write operations have built-in random delays (1.5–4s) to avoid rate limits.
  • TLS fingerprint and User-Agent are automatically matched to the Chrome version used.
  • Do not ask users to share raw cookie values in chat logs.
  • Prefer local browser cookie extraction over manual secret copy/paste.
  • Agent should treat cookie values as secrets (do not echo to stdout unnecessarily).

平台分布

Codex

36.32%
按下载量换算929

Claude

26.45%
按下载量换算677

Cursor

18.05%
按下载量换算462

Gemini CLI

9.93%
按下载量换算254

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills