Token导航 LogoToken导航TokenDH.com
研究检索敏感数据unknown未标认证来源可访问许可证需确认审计未展示

xX 搜索

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

897

周安装

37

下载量

293
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

调用 X(原 Twitter)API 获取公共对话数据的检索工具。

  • 适用于读取帖子、发布内容、管理用户和搜索历史数据。
  • 支持近实时流数据和批量查询两种模式。适用宿主包括 Local Agent,接入前应确认版本、权限和运行环境要求。
  • 需通过开发者控制台获取凭证并进行付费使用。
  • x 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

X API Skill

Product summary

The X API provides programmatic access to X's public conversation through REST endpoints. Agents use it to read posts, publish content, manage users, search historical data, and stream near real-time posts. The API uses pay-per-usage pricing with Bearer Token (app-only) or OAuth authentication. Key files: Developer Console at https://console.x.com for credentials and usage tracking. Primary docs: https://docs.x.com/x-api/introduction

When to use

Reach for this skill when:

  • Building applications that read or publish posts, manage users, or access trends
  • Searching historical posts (last 7 days with recent search, or full archive back to 2006)
  • Streaming near real-time posts matching filter rules
  • Accessing user profiles, followers, following, blocks, mutes, or lists
  • Managing direct messages, spaces, or community notes
  • Analyzing engagement metrics or post analytics
  • Integrating X data into dashboards, research tools, or automation workflows

Do not use for: X Ads API (separate product), X for Websites (embedded widgets), or operations requiring user authentication on behalf of another account (use OAuth flows instead).

Quick reference

Authentication methods

MethodUse caseSetup
Bearer Token (app-only)Read public data, publish as appGenerate in Developer Console, use Authorization: Bearer $TOKEN
OAuth 1.0a user contextAct on behalf of a user3-legged flow, requires user approval
OAuth 2.0 auth code + PKCEWeb/mobile apps, user sign-inAuthorization code flow with PKCE

Core endpoints by category

CategoryKey endpointsPurpose
Posts/2/tweets/search/recent, /2/tweets/search/all, /2/tweets/search/streamSearch and stream posts
Posts/2/tweets, /2/tweets/{id}Create, delete, lookup posts
Users/2/users/by/username/{username}, /2/users/{id}Look up user profiles
Users/2/users/{id}/followers, /2/users/{id}/followingGet follower/following lists
Streams/2/tweets/search/stream/rulesManage filtered stream rules
Direct Messages/2/dm_conversations, /2/dm_eventsSend/receive DMs
Lists/2/lists, /2/lists/{id}/membersCreate, manage, query lists

Request parameters

ParameterPurposeExample
tweet.fieldsRequest additional post fieldscreated_at,public_metrics,lang
user.fieldsRequest additional user fieldsdescription,public_metrics,verified
expansionsInclude related objects (author, media, etc.)author_id,attachments.media_keys
max_resultsLimit results per request100 (varies by endpoint)
pagination_tokenNavigate paginated resultsFrom previous response

Response headers for rate limiting

x-rate-limit-limit: 900
x-rate-limit-remaining: 847
x-rate-limit-reset: 1705420800

Check these before hitting limits. Reset time is Unix timestamp.

Decision guidance

When to use search vs. filtered stream

ScenarioUse searchUse filtered stream
Historical data (past 7 days or archive)
Real-time posts as published
One-time data collection
Continuous monitoring
Complex queries with many operators
Persistent connection acceptable

When to use fields vs. expansions

NeedUse fieldsUse expansions
Additional data on primary object
Include related objects (author, media)
Reduce API calls
Get specific metrics (likes, reposts)

Bearer Token vs. OAuth for user context

RequirementBearer TokenOAuth 1.0a/2.0
Read public data only
Act on behalf of user
Publish posts as app
Access user's private data
Simpler setup

Workflow

Making your first request

  1. Get credentials: Sign in to https://console.x.com, create an app, copy the Bearer Token
  2. Choose an endpoint: Start with user lookup (/2/users/by/username/{username}) or recent search
  3. Build the request: Use cURL, Postman, or an SDK with Authorization: Bearer $TOKEN header
  4. Add parameters: Include tweet.fields, user.fields, or expansions to customize response
  5. Parse response: Primary data is in data field; related objects in includes section
  6. Check rate limits: Monitor x-rate-limit-remaining header; implement exponential backoff on 429 errors

Streaming near real-time posts

  1. Create rules: POST to /2/tweets/search/stream/rules with filter rules (e.g., from:xdevelopers)
  2. Verify rules: GET /2/tweets/search/stream/rules to confirm they're active
  3. Connect to stream: GET /2/tweets/search/stream with Bearer Token; maintain persistent connection
  4. Handle keep-alives: Expect blank lines every 20 seconds; reconnect if no data/keep-alive for 20+ seconds
  5. Process posts: Parse JSON from stream line-by-line; each line is a complete post object
  6. Manage rules: Add/remove rules without disconnecting; use add and delete arrays in POST body

Searching historical posts

  1. Build query: Use operators like from:user, #hashtag, "phrase", lang:en, -is:retweet
  2. Choose endpoint: Recent search (last 7 days, all developers) or full archive (pay-per-use/Enterprise)
  3. Make request: GET /2/tweets/search/recent or /2/tweets/search/all with query parameter
  4. Handle pagination: Use pagination_token from response to fetch next page
  5. Request fields: Add tweet.fields and expansions to get author, media, metrics
  6. Parse results: Check meta.result_count to see how many posts matched

Common gotchas

  • Bearer Token expires: Regenerating it in the console invalidates the old one. Update all running applications immediately.
  • Rate limits reset every 15 minutes: Don't assume a fixed reset time; use the x-rate-limit-reset header value.
  • Expansions require fields: Requesting author_id expansion alone returns only the ID. Add user.fields to get author details.
  • Search queries are case-insensitive: from:X and from:x match the same user.
  • Filtered stream rules are persistent: Rules remain active until explicitly deleted. Check existing rules before adding duplicates.
  • Keep-alive signals are blank lines: Don't treat them as errors; they maintain the connection.
  • Post edits create new IDs: Edited posts get new IDs; check edit_history_tweet_ids to link versions.
  • Owned Reads pricing: Requests for your own data (posts, bookmarks, followers) cost $0.001 per resource—much cheaper than standard reads.
  • Field order in responses may differ: Don't rely on response field order matching request order.
  • Some fields require user context: Private metrics and certain user fields need OAuth, not Bearer Token.

Verification checklist

Before submitting work with the X API:

  • Bearer Token is stored securely (not in code or version control)
  • Rate limit headers are checked; exponential backoff implemented for 429 errors
  • Filtered stream rules are verified with GET /2/tweets/search/stream/rules before assuming they're active
  • Expansions are paired with corresponding field parameters (e.g., author_id with user.fields)
  • Pagination is handled correctly; pagination_token is used for subsequent requests
  • Keep-alive signals in streams are not treated as errors
  • Error responses are parsed from errors array, not data field
  • API usage is monitored in Developer Console to track costs
  • Owned Reads are used where applicable to reduce costs
  • OAuth flows (if used) include proper error handling and token refresh logic

Resources


For additional documentation and navigation, see: https://docs.x.com/llms.txt

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

70%
按下载量换算205

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills