/grok-x skill, organized by category.
X Search Flags
Control what X posts to search and how to filter them.Comma-separated list of X handles to focus on. The
@ symbol is optional.Maximum: 10 handlesConstraints:- Cannot be combined with
--exclude - Each handle is automatically stripped of the
@prefix
Comma-separated list of X handles to exclude from results. The
@ symbol is optional.Maximum: 10 handlesConstraints:- Cannot be combined with
--handles - This is an xAI API limitation — you must choose either inclusion or exclusion, not both
Start date for the search range. Must be in
YYYY-MM-DD format.Format: YYYY-MM-DDExample:End date for the search range. Must be in
YYYY-MM-DD format.Format: YYYY-MM-DDExample:Enable image analysis for posts containing images. Grok will analyze charts, screenshots, memes, and other visual content.Short form:
-iDefault: falseImplementation: Adds enable_image_understanding: true to both x_search and web_search toolsExample:Enable video analysis for posts containing videos. Grok will analyze video frames and content.Short form:
-vDefault: falseConstraints:- Only works with
x_search— this is an X Search exclusive capability - Has no effect when used with
--webalone
enable_video_understanding: true to the x_search toolExample:Tool Flags
Activate additional capabilities beyond basic X search.Add web search alongside X search. Enables cross-platform research and fact-checking.Short form:
-wDefault: falseImplementation: Adds web_search tool to the tools arrayUse cases:- Verify claims from X against broader web sources
- Find corroborating evidence from news sites, blogs, and documentation
- Get a complete picture across X and the open web
Add code interpreter for quantitative analysis. Grok writes and executes Python code to compute statistics.Short form:
-aDefault: falseConstraints:- Cannot be combined with
--extract(xAI API limitation)
code_interpreter tool to the tools arrayUse cases:- Compute engagement statistics
- Analyze posting frequency patterns
- Calculate trend velocity
- Generate quantitative reports from search results
Extract structured JSON output using a predefined schema. Automatically selects See Extraction Schemas for detailed schema definitions.
grok-4-1-fast-non-reasoning model.Short form: -xAllowed values: sentiment, narrative, timeline, profiles, claimsConstraints:- Cannot be combined with
--analyze - Automatically overrides
--fastand--deepflags - Forces model to
grok-4-1-fast-non-reasoning(required for structured output with tools)
- Sets
text.formattojson_schemawith strict mode - Disables streaming
- Returns guaranteed schema-compliant JSON
Model Flags
Control which Grok model to use for the query.Use the fast non-reasoning model for quick lookups.Model:
grok-4-1-fast-non-reasoningDefault: falseUse cases:- Quick lookups (“What did @naval post today?”)
- Simple quote pulls
- When latency matters more than depth
- Significantly lower latency and cost
- No extended reasoning chain
- Good for straightforward queries
Use the flagship Grok model for maximum analytical depth.Model:
grok-4-0709Default: falseUse cases:- Complex geopolitical analysis
- Dense technical topics
- Queries where the reasoning chain itself matters
- Higher cost and latency
- Maximum analytical capability
- Not recommended for routine searches
Output Flags
Control how results are displayed.Print all citation URLs after the response text.Short form: Example:
-cDefault: falseImplementation: Extracts URLs from response annotations and prints them in a formatted listExample output:Disable streaming output. Response is buffered and printed all at once.Default:
false (streaming is enabled by default)Use cases:- Debugging
- When piping output to another command
- When streaming causes display issues
Flag Combinations
Valid Combinations
Invalid Combinations
Auto-Overrides
Environment Variables
These environment variables affect flag behavior:Your xAI API key. Required for all queries.Format: Begins with
xai-Configuration: Set in ~/.claude/settings.jsonDefault model when neither
--fast nor --deep is specified.Default: grok-4-1-fast-reasoningValid values:grok-4-1-fast-reasoning(recommended default)grok-4-1-fast-non-reasoninggrok-4-0709
~/.claude/settings.json
