x-search
Skill0 starsChanged 4 months agoMITView on GitHub
Search X (Twitter) with Grok via the xAI "Grok Build" CLI (`grok`) in headless mode, using its server-side x_search tool. Returns Grok's Markdown analysis with footnoted URL citations. Manual invocation only (/x-search); for ordinary "search X" requests use yahoo-realtime-search.
- Pipes a download into a shell
7 other projects use a version of this.
Adopted by
Most recently taken up by
- arch3rPro/ark-spacetheir own version, first seen Nov 8, 2026
- jeroromano/claude-code-orchestration-templatetheir own version, first seen Nov 1, 2026
- schroneko/skillstheir own version, first seen Oct 29, 2026
- muneebhashone/x-search-tooltheir own version, first seen Oct 20, 2026
- lleqsnoom/xskillstheir own version, first seen Sep 20, 2026
- lloyd3126/chenchungnien-skillstheir own version, first seen Aug 25, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- glidea/supersearch-skills★ 4same name
- lleqsnoom/xskills★ 2same name
- arch3rPro/ark-space★ 1same name
- jeroromano/claude-code-orchestration-template★ 1same name
- schroneko/skills★ 1same name
- lloyd3126/chenchungnien-skills★ 0same name
- muneebhashone/x-search-tool★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- brainstormingSkill
- codexSkill
- cognitive-rhythm-writingSkill
- commitSkill
- compressSkill
- create-skillSkill
- crit-reviewSkill
- cross-reviewSkill
- decompressSkill
- herdr-fork-popupSkill
- herdr-forkSkill
- init-rulesSkill
- install-skillsSkill
- japanese-tech-writingSkill
- launch-unitySkill
- llm-wikiSkill
- parallel-dispatchSkill
- pbcopySkill
- refactor-docSkill
- session-logSkill
- subagent-driven-developmentSkill
- sync-skillSkill
- test-driven-developmentSkill
- user-journeySkill
- using-git-worktreesSkill
- writing-plansSkill
- yahoo-realtime-searchSkill
The file
Files
x-search
X (Twitter) を Grok 経由で検索するスキル。xAI 公式 CLI「Grok Build」(grok) をヘッドレスモード (-p) で起動し、サーバーサイドの x_search hosted tool に検索させる。以前の hermes-agent 版を置き換えたもの (Python venv 不要、認証も grok login 1回のみ)。
前提 (ユーザー側で1度だけ手動実行が必要)
以下が未実行の場合、まずユーザーに案内すること。スキル内では自動化しない (ブラウザ操作・グローバル副作用を伴うため)。
- grok CLI のインストール:
更新はcurl -fsSL https://x.ai/cli/install.sh | bashgrok update。 - ログイン (xAI サブスクリプションの OAuth):
認証情報はgrok login # ブラウザが開く grok login --device-code # リモート (SSH) / ブラウザレス環境~/.grok/にグローバル保存され、全プロジェクト共通 (hermes 時代の HERMES_HOME ごとの分裂は無い)。
実行方法
Bash で以下を実行する。クエリは自然文 (日本語/英語どちらでも可)。
grok -p "<クエリ>。組み込みの X 検索 (x_search) を直接使って X (Twitter) を検索し、代表的なポストの URL 引用を含む Markdown で回答して。前置きは不要" \
--tools "" --always-approve --max-turns 8- 既定 (
--output-format plain) では応答 Markdown がそのまま stdout に出る - 生 JSON (usage / sessionId / stopReason 等) が欲しい場合は
--output-format jsonを付ける。応答本文は.text
フラグの意味 (省略禁止)
--tools "": ローカルツール (シェル実行・ファイル編集等) を全封鎖する。grok は~/.claude/の CLAUDE.md やスキルを読み込むため、これが無いと--always-approve下で他スキルのコマンドを勝手にシェル実行しうる (実際に発生を確認済み)。x_searchはサーバーサイド実行なので封鎖の影響を受けない--always-approve: ツール実行の自動承認。無いとヘッドレスでは承認が取れずstopReason: "Cancelled"で検索前に終了する--max-turns 8: 暴走防止の上限
Bash 実行時の注意
- タイムアウト: 1〜2 分かかる。Bash 呼び出し時の
timeoutは 300000 (5分) 程度を指定すること - クエリのクオート: シェルに渡すクエリは必ず
"..."でクオートする (空白・記号・日本語のため)
出力の扱い方
- 返ってくる Markdown には
[[N]](https://x.com/...)形式の脚注付き URL 引用が含まれる。そのままユーザーへの回答に含めて構わない (参照性が高い) - ユーザーが「生データが欲しい」と言った場合は
--output-format jsonで JSON を取得して整形する - ユーザーが「元ポストの実テキストが欲しい」と言った場合はクエリ自体に「該当ポストの本文も引用して返答してください」等を含める
エラー対処
Not signed in:grok loginの実行を案内 (ブラウザ認証)。リモートならgrok login --device-codegrok: command not found: 前提セットアップ未完了。インストールコマンドを案内stopReason: "Cancelled"/ 検索せず終了:--always-approveの付け忘れ- 応答が「Hermes / スキルで検索します」等と回り道する:
--tools ""が付いていれば実害は無い (最終的に内蔵 x_search で検索される)。プロンプト内の「組み込みの X 検索 (x_search) を直接使って」の指示を削らないこと
制約
- これは Grok による検索結果の分析であって、X の検索 API そのものではない。生ツイートの完全な一覧は得られない
- Grok の知識カットオフ・解釈バイアスが乗る
- grok CLI は更新が速く、フラグの挙動がバージョンで変わりうる (検証済みバージョン: 0.2.102)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

