using-grok
Integrate xAI's Grok models for multi-model collaboration. Triggers on "Ask Grok", "What does Grok think", "Have Grok analyze", or similar phrases. Provides access to grok_query, grok_analyze_code, grok_reason, and grok_execute_code tools.
What this skill does
# Using Grok
## Description
Integrate xAI's Grok models into your workflow for multi-model collaboration. Get Grok's perspective on questions, code analysis, explanations, and creative tasks.
## When to Use
Use this skill when users want to:
- Get a second opinion from Grok on technical questions
- Have Grok analyze code for bugs, performance, or security issues
- Compare perspectives between Claude and Grok
- Leverage Grok's training data and reasoning capabilities
- Use Grok's extended thinking for complex problems
### Trigger Patterns
Activate this skill when you see phrases like:
- "Ask Grok..."
- "What does Grok think about..."
- "Get Grok's perspective on..."
- "Have Grok analyze..."
- "Use Grok to..."
- "Query Grok about..."
- "Let Grok explain..."
- "Have Grok review this code..."
- "Ask Grok to reason through..."
- "Get Grok to deeply think about..."
- "How much would it cost to ask Grok..."
- "Estimate the cost of asking Grok..."
- "Have Grok run/execute this code..."
- "Ask Grok to calculate..."
- "Verify this with Grok..."
### Additional Trigger Patterns
| Category | Phrases |
|----------|---------|
| **Quick Checks** | "Double-check with Grok", "Grok verify", "Sanity check via Grok" |
| **Code-Specific** | "Grok this code", "Grok debug this", "Have Grok test this" |
| **Comparisons** | "What would Grok say?", "Grok's take on this", "Second opinion from Grok" |
| **Cost-Aware** | "Quick Grok check" (implies fast model), "Deep Grok analysis" (implies reasoning) |
| **Verification** | "Have Grok run the numbers", "Verify calculation with Grok" |
## Available Tools
### grok_query
Query Grok with a question or prompt. Supports vision/image analysis.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | The question or prompt to send to Grok |
| `model` | string | No | Model alias or ID (default: "auto") |
| `context` | string | No | System context to guide the response |
| `max_tokens` | integer | No | Maximum response tokens (default: 4096) |
| `temperature` | number | No | Sampling temperature 0-2 (default: 0.7) |
| `top_p` | number | No | Nucleus sampling 0-1 (alternative to temperature) |
| `stream` | boolean | No | Enable SSE streaming (default: auto-detected) |
| `image_url` | string | No | Image URL (HTTPS) or base64 data URI for vision queries |
| `image_detail` | string | No | Detail level for image analysis: "auto", "low", "high" (default: "auto") |
**Smart Streaming (P4-014):**
When `stream` is not specified, streaming is automatically enabled for:
- Reasoning models (thinking traces benefit from streaming)
- Long output indicators ("explain in detail", "step by step", "write code", etc.)
- Queries > 500 characters
- High complexity queries (complexity score >= 40)
Simple queries use non-streaming to preserve cache benefits. Explicit `stream: true/false` always overrides auto-detection.
**Vision Support (P4-015):**
- Provide an `image_url` to enable image analysis
- Supports HTTPS URLs (e.g., `https://example.com/photo.jpg`)
- Supports base64 data URIs (e.g., `data:image/png;base64,...`)
- **Minimum image size:** 448×448 pixels (images are processed as 448×448 tiles)
- **Maximum image size:** 10 MiB per image
- Supported formats: PNG, JPEG
- When image is provided with `model: "auto"`, automatically selects vision-capable model (grok-4)
- Use `image_detail: "low"` for faster, cheaper analysis; `"high"` for detailed inspection
**Model Aliases:**
| Alias | Best For | Model ID |
|-------|----------|----------|
| `auto` | General queries | grok-4 |
| `fast` | Quick responses, cost-effective | grok-4-fast |
| `smartest` | Complex reasoning | grok-4 |
| `code` | Code generation, agentic tasks | grok-code-fast-1 |
| `reasoning` | Extended thinking, chain-of-thought | grok-4.1-fast |
| `cheap` | Budget-conscious queries | grok-4-fast |
| `vision` | Image/vision analysis | grok-4 |
### grok_models
List available Grok models with capabilities and pricing.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `refresh` | boolean | No | Force refresh from API (default: false) |
### grok_analyze_code
Analyze code for bugs, performance issues, security vulnerabilities, and style problems.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `code` | string | Yes | The code to analyze |
| `language` | string | No | Programming language (auto-detected if not specified) |
| `analysis_type` | string | No | Type: "performance", "bugs", "security", "style", or "all" (default: "all") |
| `model` | string | No | Model to use (default: grok-code-fast-1) |
**Supported Languages:** JavaScript, TypeScript, Python, Go, Rust, Java, C#, C/C++, Ruby, PHP, SQL, HTML, CSS, Shell, and more (auto-detected).
### grok_reason
Perform extended reasoning and deep thinking on complex problems.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | The question or problem to reason through |
| `effort` | string | No | Reasoning depth: "low", "medium", "high" (default: "medium") |
| `show_thinking` | boolean | No | Include reasoning trace in output (default: true) |
| `model` | string | No | Model to use (default: grok-4-1-fast-reasoning) |
| `context` | string | No | Additional context for the problem |
**Effort Levels:**
- `low`: Quick analysis with focused conclusions (~2000 tokens)
- `medium`: Balanced reasoning with step-by-step analysis (~4000 tokens)
- `high`: Thorough deep thinking with multiple perspectives (~8000 tokens)
### grok_estimate_cost
Estimate the cost of a Grok query before execution.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | The query text to estimate |
| `model` | string | No | Model to use for estimation (default: auto) |
| `context` | string | No | Additional context to include in estimation |
| `max_tokens` | number | No | Expected maximum output tokens |
### grok_execute_code
Execute Python code server-side for calculations, data analysis, and algorithm testing.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `code` | string | Yes | Python code to execute (max 50,000 chars) |
| `description` | string | No | What the code should accomplish (improves explanation) |
| `include_output` | boolean | No | Include raw stdout/stderr (default: true) |
| `max_turns` | integer | No | Max execution iterations 1-10 (default: 3) |
| `model` | string | No | Model to use (default: grok-4-1-fast) |
**Use Cases:**
- Verify mathematical calculations
- Test algorithms with sample data
- Perform data analysis
- Validate code snippets before suggesting them
- Run complex computations
## Model Selection Guide
Choose the right model for the task:
```
Quick question or simple task?
└─ Use "fast" - cheapest, fastest response
Code analysis or generation?
└─ Use "code" - optimized for programming tasks
Complex reasoning or multi-step analysis?
└─ Use "reasoning" - extended thinking, 2M context
Vision or image understanding?
└─ Use "auto" (grok-4) - supports image input
Not sure?
└─ Use "auto" - intelligent default selection
```
## Tool Selection Guide
Choose the right tool for the task:
```
General question or creative task?
└─ Use grok_query - flexible general-purpose tool
Code review or bug hunting?
└─ Use grok_analyze_code - structured analysis with line references
Complex problem requiring deep thought?
└─ Use grok_reason - shows thinking process, adjustable effort
Need to run calculations or test code?
└─ Use grok_execute_code - server-side Python execution
Want to know the cost before querying?
└─ Use grok_estimate_cost - preview costs without spending
List available models and pricing?
└─ Use grokRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.