MUST read before searching X/Twitter with the x_search tool. When xAI is connected: date-bound every time-sensitive query (from_date >= yesterday, widen to 7 da
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-skill-09886b305f25 ,按照其中的说明把「x-search」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This skill only matters when an xAI account is connected. The x_search tool
is registered at load time if a credential exists, and it is hidden behind
tool_search until you activate it. Everything below assumes you've read the
current date from the system prompt; never hardcode a date.
tool_search "X posts". If x_search shows up, it's callable on the
next turn.web_search. Don't guess
at tweets from memory.x_search is one round trip to xAI's server-side X tools (keyword search,
semantic search, user search, thread fetch). You don't pick the sub-tool; the
server does. Your job is to shape the query and the parameters so the server
lands on the right one.
from_date. Start narrow. If the first pass
comes back thin, widen to 7 days. Dates are inclusive on both ends.allowed_x_handles (bare handles, no @, max 20). Example:
["growth_papa", "aleabitoreddit"]. allowed_x_handles and
excluded_x_handles are exclusive; pick one.since:, until:, from:,
filter:links, -filter:replies, lang:). The server has been observed
running keyword search in Latest mode when the query carries since:.| Operator | Meaning | Example |
|---|---|---|
since:YYYY-MM-DD | posts on or after the date | since:2026-09-02 |
until:YYYY-MM-DD | posts on or before the date | until:2026-09-03 |
from:handle | posts by one account | from:growth_papa |
filter:links | only posts with links | earnings filter:links |
-filter:replies | drop replies | NVDA -filter:replies |
lang:xx | language code | lang:ko, lang:en |
"exact phrase" | literal match | "foreign net buying" |
Operators live inside query. from_date / to_date / allowed_x_handles
are separate parameters and are the reliable half; operators nudge the server,
parameters bind it. Use both when they agree.
Run these as separate x_search calls, not one combined query.
Handle pass. Trusted accounts, narrow window.
query: "latest on <topic> since:<yesterday>"
allowed_x_handles: ["growth_papa", "aleabitoreddit"]
from_date: <yesterday>
Keyword pass. Open field, reply noise removed.
query: "recent <topic> <ticker or key term> -filter:replies lang:en"
from_date: <yesterday>
Thread-fetch pass. Only when one post from the passes above needs context.
query: "<x.com URL of the post> replies and quotes"
Stop after three passes unless the user asks for more. If the handle pass and the keyword pass disagree, report both rather than averaging them.
Each result arrives as a URL plus a one-line summary, followed by a
Queries used: trailer that lists the exact queries the server ran. Keep the
trailer in your notes; it's the only provenance you have for what was actually
searched.
When you report:
x.com URL for every claim drawn from a post.Run the same topic through web_search in the same turn. Then reconcile:
Don't let an X-only claim into a conclusion without that note.
xAI bills X search at $5 per 1,000 calls. One x_search call is one search
turn. The three-pass recipe costs roughly $0.015. That's cheap, but it isn't
free, so don't loop on retries when the first pass came back empty; widen the
window once, then stop.
Query recipes and parity against other lanes are checked by
packages/omo-senpi/scripts/qa/x-search-backtest.mjs. If you change a rule in
this skill, update the query set there so the backtest still reflects the
recipe it's measuring.