# X Search

MUST read before searching X/Twitter with the x_search tool.

- Repository: https://github.com/code-yeongyu/oh-my-openagent (70577 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add code-yeongyu/oh-my-openagent --skill x-search -g -a claude-code -y`
Codex: `npx skills add code-yeongyu/oh-my-openagent --skill x-search -g -a codex -y`
Cursor: `npx skills add code-yeongyu/oh-my-openagent --skill x-search -g -a cursor -y`
Gemini CLI: `npx skills add code-yeongyu/oh-my-openagent --skill x-search -g -a gemini-cli -y`

## Description

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 days), scope trusted accounts with allowed_x_handles, phrase queries as latest/recent with since:/from:/filter: operators, split into 2-3 searches by account and by keyword, and reconcile against web_search. Triggers: X search, Twitter search, tweets, posts on X, what people are saying on X, x_search, social signal.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# x-search: searching X (Twitter) through xAI

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.

## Which tool

1. Run `tool_search "X posts"`. If `x_search` shows up, it's callable on the
   next turn.
2. If nothing matches, xAI isn't connected. Say so plainly ("x_search is
   unavailable, no xAI credential") and fall back to `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.

## The 4 rules

1. **Date-bound anything time-sensitive.** Stocks, earnings, market reaction,
   foreign flows, breaking news, product launches: compute yesterday from
   today's date and pass it as `from_date`. Start narrow. If the first pass
   comes back thin, widen to 7 days. Dates are inclusive on both ends.
2. **Scope trusted accounts.** When the user names accounts they trust, pass
   them as `allowed_x_handles` (bare handles, no `@`, max 20). Example:
   `["growth_papa", "aleabitoreddit"]`. `allowed_x_handles` and
   `excluded_x_handles` are exclusive; pick one.
3. **Phrase for recency.** Write the query the way X advanced search expects:
   "latest" or "recent" wording plus operators (`since:`, `until:`, `from:`,
   `filter:links`, `-filter:replies`, `lang:`). The server has been observed
   running keyword search in Latest mode when the query carries `since:`.
4. **Split, don't stack.** One mega-query returns mush. Run 2 to 3 narrower
   searches: one pass by account, one by keyword, and a thread fetch when a
   single post needs its replies. Each call is one search turn.

The rest: https://github.com/code-yeongyu/oh-my-openagent/blob/HEAD/packages/omo-senpi/src/components/x-search/skill/SKILL.md
