X Search logo

X Search

CommunityPopular
code-yeongyu
x-search

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.

Overview

Publishercode-yeongyu
Repositoryoh-my-openagent
Skill namex-search
Stars
69.1K
Forks
5.7K
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by code-yeongyu on GitHub. Read the source before you install it.

Installation

Install the X Search AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/code-yeongyu/oh-my-openagent.git /tmp/oh-my-openagent
mkdir -p .claude/skills
cp -r /tmp/oh-my-openagent/packages/omo-senpi/src/components/x-search/skill .claude/skills/x-search
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable X Search in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads X Search on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so X Search is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Operator cheat sheet

OperatorMeaningExample
since:YYYY-MM-DDposts on or after the datesince:2026-09-02
until:YYYY-MM-DDposts on or before the dateuntil:2026-09-03
from:handleposts by one accountfrom:growth_papa
filter:linksonly posts with linksearnings filter:links
-filter:repliesdrop repliesNVDA -filter:replies
lang:xxlanguage codelang: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.

Split-search recipe

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.

Reading results

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:

  • Cite the x.com URL for every claim drawn from a post.
  • Label the source as an X post. A tweet is a signal that someone said something, not a verified fact. Say "posted on X by @handle" rather than stating the content as true.
  • Quote sparingly. Summaries in your own words plus the link do the job.

Tandem with web_search

Run the same topic through web_search in the same turn. Then reconcile:

  • Web-found event with no X echo: say so. It may be too fresh, too niche, or the query missed it.
  • X-only claim with no web coverage: say so, and flag it as unconfirmed.
  • Both agree: cite both, X for the reaction, web for the record.

Don't let an X-only claim into a conclusion without that note.

Cost 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.

Backtest pointer

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.

Frequently asked questions

What does the X Search AI skill do?

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.

Why use X Search on TypingMind?

Because you install it once and use it with any model. X Search is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install X Search in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/code-yeongyu/oh-my-openagent/tree/dev/packages/omo-senpi/src/components/x-search/skill. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use X Search?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with X Search?

As many as you like. As long as a model supports skills, you can use X Search with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the X Search AI skill free?

It is published on GitHub by code-yeongyu. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇