X (Twitter) — Grok Commander

Star_tanuki07
2026-03-17T01:26:36Z

Replaces the Grok button on every tweet with an AI command menu offering 3 built-in modes (Fact Check, Deep Analysis, Translate) and 2 fully customizable slots. Each mode can be sent to Grok's sidebar drawer or privately via x.com/i/grok. Supports manual or auto-send, multi-language auto-detection, and per-language customizable prompt templates. Ideal for casual users who want quick AI-powered context on trending topics without diving deep.

✨ Send Any Tweet to Grok with a Structured Analysis Command

Hide image

Replaces the Grok button on every tweet with a command menu offering three built-in analysis modes and two fully customizable slots, with per-mode private chat support and optional push notification forwarding.

💡 Overview Clicking the repurposed Grok button on any tweet opens a compact command menu. From there you choose a mode — the prompt and tweet content are filled into the Grok sidebar drawer automatically. Each mode has a 🔒 private chat toggle that activates Grok's built-in private chat mode within the drawer, so no history is stored, without ever leaving the X page. A push button (📨) appears per item when any push target is configured, forwarding the tweet URL to Discord or Telegram in one click. All five mode labels and prompt templates are editable from a built-in settings panel, and the script adapts its interface to your chosen language automatically.

🧭 Design Philosophy

This script is a deeper companion to Grok Fact Checker. Where that script answers one question — is this claim true? — Commander is for the next step: understanding the broader picture. When you want to know the background of an unfamiliar topic, read the tone or implied stance behind a post, or decode a cultural reference buried in a meme, the three built-in modes cover those distinct needs directly. The two custom slots exist for any use case that falls outside those defaults.

Why Grok? Because it is natively connected to X's real-time data stream, Grok has immediate context on trending topics, public figures, and platform-specific events that other AI tools would need to retrieve indirectly. For social media content in particular, that native awareness makes a practical difference.

Two routing paths reflect two different needs:

Sidebar drawer — the command runs in Grok's panel on the right side of X, so you stay on the same page and can reference the original post while reading the response.

Private chat (🔒) — the same drawer is used, but Grok's built-in private chat mode is activated before the prompt is entered, so the analysis is not stored in your conversation history. No separate tab or page redirect is involved.

This script is intended for casual users who occasionally encounter an unfamiliar post and want a quick, structured way to get context — without opening a new tab, pasting text manually, or writing a prompt from scratch.

🗂️ Toolbar Entry Point

After installation, the Grok button on every tweet is replaced by a ** Grok button Commander button** . Clicking it opens the command menu inline — no separate page or icon elsewhere is required.

Control | Location | Action
🔴 Commander button | Tweet action toolbar, where the Grok button previously appeared | Opens the AI command menu
🔒 (per menu item) | Right side of each menu entry | Runs the command in private chat mode within the drawer
📨 (per menu item) | Right side of each menu entry, visible only when push is configured | Forwards the tweet URL to configured Discord / Telegram channels
🌐 Lang (menu footer, left) | Bottom-left of the command menu | Opens an inline language switcher
⚙️ (menu footer, right) | Bottom-right of the command menu | Opens the full settings panel

On first install, the Settings panel opens automatically so you can review defaults before using the script. The first time you use a command, the sidebar drawer opens automatically. On subsequent uses, the drawer is expected to already be open — a warning toast will appear if it has been closed.

🚀 Core Features

🕵️ Fact Check

Submits a structured fact-checking prompt asking Grok to assess the tweet's accuracy, flag potential errors or unsupported claims, and supply relevant context.

Click the Commander button on any tweet

Select Fact Check from the menu

Grok's sidebar drawer receives the prompt and tweet content automatically

📊 Deep Analysis

Submits an analysis prompt asking Grok to examine the tweet's tone, emotional framing, implied audience, and the author's likely stance or motivation.

Select Deep Analysis from the menu

Useful when a tweet's intent or subtext is unclear

🌐 Translate & Explain

Submits a translation prompt that converts the tweet to your chosen language in natural, idiomatic form. When internet slang, memes, or cultural references are present, Grok is instructed to explain their background meaning alongside the translation.

Select the translate mode from the menu (label varies by language — e.g., Translate, 梗文翻譯, 翻訳と解説)

Particularly useful for tweets containing platform-specific slang or culturally specific references

✏️ Custom Mode 1 & Custom Mode 2

Two additional menu slots with editable labels and prompt templates. The defaults provide starter prompts, but both can be replaced entirely in Settings.

Edit the label and prompt for each slot in Settings → Prompt Templates

Changes take effect immediately after saving

🔒 Private Chat Mode (per mode)

Every menu item includes a Gork's Privacy Mode Button on the right. Clicking it activates Grok's built-in private chat feature within the sidebar drawer before the prompt is entered. No conversation record is stored.

The entire interaction remains within X — no tab redirect occurs

Grok's private chat state is set automatically; you do not need to toggle it manually

Use Gork's Privacy Mode Button whenever you prefer the analysis not to appear in your Grok history

📨 Push Notifications

The script can forward tweet URLs to Discord and Telegram channels directly from the command menu, without running an AI analysis first. This is useful for bookmarking posts or sharing links to a group or channel in one click.

When at least one push target is configured and enabled, a 📨 push button appears on each menu item next to the 🔒 button. Clicking it opens a channel selection overlay listing all configured and enabled destinations.

Setting up Discord

Open Settings → Push Notifications

Click + Add under the Discord section

Enter a channel label (for your own reference) and a Discord Webhook URL

Enable the entry with the checkbox, then save

Use Send Test Message to verify delivery before first use

Setting up Telegram

Open Settings → Push Notifications

Click + Add under the Telegram section

Enter a channel label, your Bot Token, and the target Chat ID

Enable the entry with the checkbox, then save

Use Send Test Message to verify the bot can reach the chat

Push behavior

Up to 10 entries can be configured across Discord and Telegram combined

When multiple targets are active, a selection overlay lets you choose which channels to send to before confirming

A result toast confirms delivery or reports failure per batch

The confirmation step can be suppressed with "Don't ask again" — this setting can be restored in Settings at any time

🧪 Experimental Features & Known Limitations

Drawer detection relies on the Grok sidebar being open when a command is used. If the drawer is closed mid-session, a warning toast appears. Reopening the drawer manually and clicking the command again will resume normally.

Private chat button detection uses aria-label matching across five languages. If X changes the label for this control in a future update, private mode may silently skip until the script is updated.

Auto-send timing depends on the drawer's render speed. On slow connections, the prompt may occasionally require manual submission even when Auto Send is configured.

First-use drawer auto-open: the script opens the sidebar automatically on the first command after each page load. On subsequent uses within the same session, the drawer must remain open manually.

⚙️ Additional Features

🌐 Quick Language Switcher

A language shortcut button in the bottom-left of the command menu lets you change the active language without opening Settings. Tapping it expands an inline list of the five supported languages. The current language is marked with a checkmark.

Changes apply immediately and persist across sessions

The active template set switches to match the selected language

🌐 Language Selection

The fact-checking prompt and all script UI text — including the status overlay and script manager menu labels — adapt to your chosen language. Eight languages are supported:

🇺🇸 English

🇹🇼 Traditional Chinese

🇨🇳 Simplified Chinese

🇯🇵 Japanese

🇰🇷 Korean

🇪🇸 Spanish

🇧🇷 Portuguese (Brazil)

🇫🇷 French

On first install, the script reads your browser's locale and selects a matching language automatically. To change the language at any time, open your script manager's menu and select Language Settings.

🚀 Auto Send Toggle

By default, commands fill the Grok input and wait for you to send manually (Manual mode). Switching to Auto Send in Settings causes the prompt to be submitted automatically after it is filled.

Manual (default): prompt is filled, you review and send

Auto Send: prompt is filled and submitted without further interaction

Applies to both standard and private chat modes

🖊️ Per-Mode Prompt & Label Editing

All five mode templates — including the three built-in ones — have fully editable labels (up to 20 characters) and prompt text. Defaults can be restored at any time with the Reset to Defaults button in Settings.

🔐 Security & Privacy Notice

⚠️ This script includes an opt-in feature that transmits data to external services you configure.

Data Type | Purpose | Storage | Transmitted To
Discord Webhook URL | Identifies the target channel for push delivery | Local only (script storage) | Discord's servers, only when you click the push button
Telegram Bot Token | Authenticates the bot sending the message | Local only (script storage) | Telegram's API, only when you click the push button
Telegram Chat ID | Identifies the destination chat or channel | Local only (script storage) | Telegram's API, only when you click the push button
Tweet URL | The content forwarded via push | Not stored separately | Discord / Telegram, only when you click the push button

This script does not collect, share, or transmit any data to the script author or any third party beyond the Discord and Telegram endpoints you configure yourself.

💡 This feature is opt-in only — no action means no risk. Credential storage and push transmission only occur if you explicitly configure and enable a push target in Settings → Push Notifications. All other features — the command menu, analysis modes, private chat, language switching, and template editing — operate entirely within your browser and are completely unaffected by push settings. If you choose to enable this feature, reviewing the source code beforehand is recommended.

This userscript is primarily maintained on Greasy Fork.

Built with AI assistance by a hobbyist developer. Bug fixes and updates may not be immediate.

Feedback is welcome. Responses may be assisted by translation tools if needed.