Collection of agent skills for SLICC and Tessl-compatible runtimes — productivity, creative, document, and integration skills.
76
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
Before any xAI API call, retrieve the key:
[ -n "$XAI_API_KEY" ] && echo "✓ XAI_API_KEY is set" || echo "✗ XAI_API_KEY is not set — run: export XAI_API_KEY=<your-key>"Use the XAI_API_KEY environment variable directly as Authorization: Bearer $XAI_API_KEY in all subsequent API calls.
Base URL for all REST calls: https://api.x.ai/v1
Always default to the most capable model unless the user explicitly asks for something cheaper or faster.
| Model | When to Use |
|---|---|
grok-4 | Default choice. Flagship reasoning model for all tasks. |
grok-4-1-fast | Use when the task is tool/search-heavy (multiple tool calls) or needs the 2M token context window. Best tool-calling model. |
grok-3 | Only when the user explicitly wants to save cost. Non-reasoning, supports reasoning_effort. |
grok-3-mini | Only for high-volume/batch tasks where cost is the primary concern. |
Grok 4 caveats: Does NOT support presencePenalty, frequencyPenalty, stop, or reasoning_effort. Passing these will cause errors.
| Model | Status |
|---|---|
grok-imagine-image | Use this. Aurora-powered, current model. Supports aspect ratios. |
grok-2-image-1212 | Deprecated as of 2026-02-24. Do not use. |
grok-4: 256k tokensgrok-4-1-fast: 2M tokensgrok-3: 131k tokensPick the right pattern based on what the user needs:
Use /v1/chat/completions with grok-4:
curl https://api.x.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-m 3600 \
-d '{
"model": "grok-4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum entanglement simply."}
],
"stream": false
}'When the task involves web search, X search, code execution, or any combination of tools, use the Responses API (/v1/responses) with grok-4-1-fast.
Important: Include ALL relevant tools in a single API call. Grok handles orchestration — it will decide which tools to invoke and in what order.
curl https://api.x.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4-1-fast",
"stream": false,
"input": [
{"role": "user", "content": "What are people on X saying about the latest AI news? Cross-reference with web articles."}
],
"tools": [
{"type": "web_search"},
{"type": "x_search"}
]
}'Available server-side tools (combine as many as needed in one call):
web_search — real-time internet search ($5/1k calls)x_search — search X posts/profiles ($5/1k calls)code_execution — sandboxed Python ($5/1k calls)attachment_search — search uploaded files ($10/1k calls)collections_search — RAG over document collections ($2.50/1k calls)Use the Chat Completions endpoint with standard tool definitions:
curl https://api.x.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4-1-fast",
"messages": [{"role": "user", "content": "What is the weather in San Francisco?"}],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"], "default": "celsius"}
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}'Multi-turn function call loop:
tool_callstool_calls), and the tool result message:
[
...original_messages,
{"role": "assistant", "tool_calls": [{"id": "<id>", "type": "function", "function": {"name": "get_weather", "arguments": "{...}"}}]},
{"role": "tool", "tool_call_id": "<id>", "content": "<result>"}
]Use grok-imagine-image with the images endpoint. Always specify an aspect ratio when the user's intent suggests one (landscape scenes → 16:9, portraits → 9:16, etc.).
curl https://api.x.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-imagine-image",
"prompt": "A dramatic eclipse over an Aztec pyramid, photorealistic, golden hour lighting",
"n": 1,
"aspect_ratio": "16:9"
}'Parameters:
aspect_ratio: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, autoresolution: 1k (default) or 2kn: up to 10 images per requestImage URLs are ephemeral — always download the image immediately after generation.
Aurora is an autoregressive model (generates pixels sequentially, like an LLM generates text), not a diffusion model. This means it responds well to natural language descriptions rather than keyword-heavy prompts. However, short or vague prompts get rewritten by an internal "refiner" layer before reaching the image model — which can change your intent. To keep control, write prompts of 40+ words with specific details.
Recommended prompt structure — think like a film director, setting the stage before introducing the subject:
[Environment/Setting] → [Lighting/Atmosphere] → [Subject + Action] → [Camera/Composition] → [Style/Technical]Example:
A rain-soaked cobblestone alley in a European old town at dusk, warm amber light spilling from wrought-iron streetlamps, a lone figure in a long coat walking away from camera, shot from a low angle with shallow depth of field, cinematic 35mm film grain, Rembrandt lighting.
What works well:
a neon sign that says "OPEN" in bright red cursive#FF6B35 orange accent lightingWhat doesn't work:
curl https://api.x.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4",
"messages": [{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,<base64_string>",
"detail": "high"
}
},
{"type": "text", "text": "Describe this image in detail."}
]
}]
}'Image constraints: max 20MiB, jpg/jpeg or png only, any number of images.
Add "stream": true to any request. Response comes as SSE (data: {...} chunks).
{
"model": "grok-4",
"messages": [...],
"response_format": {
"type": "json_object"
}
}| Model | Input | Output |
|---|---|---|
| grok-4 | Check console.x.ai | Check console.x.ai |
| grok-4-1-fast | Lower than grok-4 | Lower than grok-4 |
| grok-3 | ~$3/M tokens | ~$15/M tokens |
| grok-3-mini | ~$0.30/M | ~$0.50/M |
Tool invocations: $5/1k (web/x/code), $2.50/1k (collections), $10/1k (files). Batch API: 50% off all token costs (async, ~24h turnaround).
reasoning_effort, stop, presencePenalty, or frequencyPenalty to grok-4.-m 3600 (curl timeout) for reasoning models — they think before answering.web_search and x_search into separate requests; pass them both in the tools array and let Grok decide how to use them.web_search or x_search for current events.grok-4 not grok-4-<date> unless you need pinned consistency.This skill was last updated on 2026-03-30. If more than three months have passed, check console.x.ai or the xAI docs for newer models and API changes.
.tessl-plugin
skills
aem
aem-edge-functions
references
ai-writing-detector
references
apple-music
references
bluebubbles
cloudflare
concur
fluffyjaws
github
gmail
references
icloud
references
mixtape
references
monday
oryx
outlook
pm-prd
pptx
pptx2pdf
presentations
review
save-the-cat
servicenow
references
strava
strudel-music
swarm
references
teams
references
wavespeed
xai-grok