跳到正文
Skillpedia
社交媒体7.4k · #13258

xurl

它能做什么

这个技能向智能体展示如何安装和使用 X 官方的 xurl 工具。适合希望智能体通过 X API 处理 X 账户的人。

适用场景

  • ✓你想让智能体在你的电脑上设置 xurl 工具的时候。
  • ✓你需要为你已注册的应用,通过 OAuth 登录 X 的时候。
  • ✓你想使用现成的快捷方式向 X API 发送基本请求的时候。

技能链接

https://github.com/steipete/agent-scripts/blob/main/skills/xurl/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/steipete/agent-scripts/blob/main/skills/xurl/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我设置 xurl 工具,以便我登录我的 X 账户。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会安装该工具,检查当前的登录状态,并引导你完成授权步骤。密钥保留在你的电脑上,不会粘贴到对话中。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

xurl

Official CLI for the X API.

Primary upstream: https://github.com/xdevplatform/xurl

Install

Homebrew:

brew install --cask xdevplatform/tap/xurl

npm:

npm install -g @xdevplatform/xurl

Shell script:

curl -fsSL https://raw.githubusercontent.com/xdevplatform/xurl/main/install.sh | bash

Go:

go install github.com/xdevplatform/xurl@latest

Safety

  • Never read, print, summarize, upload, or paste ~/.xurl into LLM context.
  • Never ask the user to paste client secrets, bearer tokens, or OAuth tokens into chat.
  • Never use --verbose in agent runs; it can expose auth headers.
  • Do not run auth commands with inline secret flags in an agent session.
  • The user must register app credentials manually on their machine outside the agent session.

Auth

Check current state:

xurl auth status

If an app is already registered, complete OAuth 2.0:

xurl auth oauth2

Multi-app:

xurl auth apps list
xurl auth default my-app
xurl auth default my-app alice
xurl --app dev-app /2/users/me

Notes:

  • xurl stores app config and tokens in ~/.xurl.
  • OAuth 2.0 redirect URI in the X developer portal should be http://localhost:8080/callback.
  • App registration examples with inline secrets are intentionally omitted here. Do that outside the agent session.

Common shortcuts

xurl post "Hello world!"
xurl reply 1234567890 "Nice post"
xurl quote 1234567890 "My take"
xurl delete 1234567890

xurl read 1234567890
xurl search "from:elonmusk" -n 10
xurl whoami
xurl user @XDevelopers
xurl timeline -n 20
xurl mentions -n 10

xurl like 1234567890
xurl unlike 1234567890
xurl repost 1234567890
xurl unrepost 1234567890

xurl bookmark 1234567890
xurl unbookmark 1234567890
xurl bookmarks -n 10
xurl likes -n 10

xurl follow @handle
xurl unfollow @handle
xurl following -n 20
xurl followers -n 20

xurl dm @handle "message"
xurl dms -n 10

xurl media upload path/to/file.mp4
xurl media status MEDIA_ID

POST_ID can also be a full X status URL.

Raw endpoint mode

GET:

xurl /2/users/me

POST JSON:

xurl -X POST /2/tweets -d '{"text":"Hello world!"}'

Headers:

xurl -H "Content-Type: application/json" /2/tweets

Choose auth type:

xurl --auth oauth2 /2/users/me
xurl --auth oauth1 /2/tweets
xurl --auth app /2/users/me

Choose OAuth2 account:

xurl --username alice /2/users/me

Streaming:

xurl /2/tweets/search/stream
xurl -s /2/users/me

Quick checks

Install:

xurl version

Auth:

xurl auth status

Live request after auth:

xurl whoami
常见问题

智能体需要我的 X 密码吗?

登录通过 OAuth 在你的电脑上完成。技能说明密钥绝不能粘贴到对话中。

我可以使用多个 X 应用吗?

可以。该工具可以列出已保存的应用、设置默认应用,或为某个命令指定应用。

开启详细模式安全吗?

技能建议在智能体运行期间不要开启详细模式,因为它可能暴露登录请求头。

详情

作者的原始描述

xurl X API CLI: install, auth, app choice, shortcuts, raw endpoints.

repo: steipete/agent-scripts

热度

GitHub 星标
7.4k
排名
#13258
许可证
MIT
更新时间
2026/10/30

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能