Agent skill

Xai Models

by majiayu000 in majiayu000/claude-skill-registry

xAI Grok model selection and capabilities guide. An agent skill from majiayu000/claude-skill-registry.

MITAuto-check passedAgent Workflows

Install Xai Models

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill xai-models -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry xai-models --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-llm/xai-models .claude/skills/xai-models && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xai-models
GitHub stars
666
Used in
1 other repo
Token cost
~1.6k tokens
SKILL.md length
287 words
Files
2
Skills in repo
1,273
Repo updated
First seen
Licence
MIT

At a glance

xAI Grok model selection and capabilities guide. An agent skill from majiayu000/claude-skill-registry.

  • Works in 3 steps: Use the Right Model → Leverage Caching → Batch Similar Requests
  • Choosing the right Grok model for your task
  • SKILL.md covers Model Quick Reference, Model Selection Decision Tree, Detailed Model Profiles and Cost Optimization Strategies, plus 7 more sections
  • Reaches api.x.ai; needs XAI_API_KEY

What it does

Xai Models is an agent skill from majiayu000/claude-skill-registry. xAI Grok model selection and capabilities guide. Use when choosing the right Grok model for your task, comparing model features, or optimizing costs.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in Agent Workflows, covering Structured output and tool calling. It works with xAI Grok. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

When your agent uses it

  • Choosing the right Grok model for your task
  • Comparing model features
  • Optimizing costs

Example prompts

  • “/xai-models”

Requirements

  • Python 3
  • A credential in XAI_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Use the Right Model
  2. Leverage Caching
  3. Batch Similar Requests

What it can do on your machine

Read from SKILL.md and the folder at commit 2d14a69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.x.ai

    Also links to:

    • docs.x.ai
    • x.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • XAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Xai Models loads about 1.6k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 287 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 2d14a69, republished under its MIT licence (© majiayu000). 287 words, ~1,565 tokens.

Download SKILL.mdSave it as .claude/skills/xai-models/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
xai-models
description
xAI Grok model selection and capabilities guide. Use when choosing the right Grok model for your task, comparing model features, or optimizing costs.
version
1.0.0

xAI Grok Models Guide

Complete guide to selecting the right Grok model for your use case, with pricing and capability comparisons.

Model Quick Reference

ModelBest ForInput $/1MOutput $/1MContext
grok-4-1-fastTool calling, agents$0.20$0.502M
grok-4Complex reasoning$3.00$15.00256K
grok-3-fastGeneral tasks$0.20$0.50131K
grok-3-miniLightweight tasks$0.30$0.50131K
grok-2-visionImage analysis$2.00$10.0032K

Model Selection Decision Tree

What's your primary need?
│
├─► Tool calling / Agent workflows
│   └─► grok-4-1-fast ($0.20/$0.50)
│
├─► Complex reasoning / Analysis
│   └─► grok-4 ($3.00/$15.00)
│
├─► General chat / Simple tasks
│   └─► grok-3-fast ($0.20/$0.50)
│
├─► High volume / Cost sensitive
│   └─► grok-3-mini ($0.30/$0.50)
│
└─► Image/Vision tasks
    └─► grok-2-vision ($2.00/$10.00)

Detailed Model Profiles

Best for: Tool calling, agentic workflows, real-time search

python
# Best choice for X search and sentiment analysis
response = client.chat.completions.create(
    model="grok-4-1-fast",
    messages=[{"role": "user", "content": "Search X for AAPL sentiment"}]
)

Features:

  • 2 million token context window
  • Optimized for tool calling
  • Fast response times
  • Best price/performance ratio

Variants:

  • grok-4-1-fast-reasoning - Maximum intelligence
  • grok-4-1-fast-non-reasoning - Instant responses
grok-4

Best for: Deep analysis, complex reasoning, research

python
# Use for complex multi-step analysis
response = client.chat.completions.create(
    model="grok-4",
    messages=[{"role": "user", "content": "Analyze market trends..."}]
)

Features:

  • Highest reasoning capability
  • Best for complex tasks
  • 256K context window
grok-3-fast

Best for: General purpose, balanced performance

python
# Good default choice for most tasks
response = client.chat.completions.create(
    model="grok-3-fast",
    messages=[{"role": "user", "content": "Summarize this..."}]
)

Features:

  • Fast responses
  • 131K context
  • Good balance of speed/quality
grok-3-mini

Best for: High-volume, cost-sensitive applications

python
# Use for bulk processing
response = client.chat.completions.create(
    model="grok-3-mini",
    messages=[{"role": "user", "content": "Classify: ..."}]
)

Features:

  • Lowest latency
  • Most cost-effective
  • Good for simple tasks
grok-2-vision

Best for: Image analysis, charts, screenshots

python
import base64

# Encode image
with open("chart.png", "rb") as f:
    image_data = base64.b64encode(f.read()).decode()

response = client.chat.completions.create(
    model="grok-2-vision",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Analyze this chart"},
            {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}}
        ]
    }]
)

Cost Optimization Strategies

1. Use the Right Model
python
# For filtering/classification - use mini
filter_response = client.chat.completions.create(
    model="grok-3-mini",
    messages=[{"role": "user", "content": f"Is this relevant? {text}"}]
)

# For analysis - use fast
if is_relevant:
    analysis = client.chat.completions.create(
        model="grok-4-1-fast",
        messages=[{"role": "user", "content": f"Analyze: {text}"}]
    )
2. Leverage Caching

Cached input tokens are 75% cheaper:

  • Regular: $0.20/1M
  • Cached: $0.05/1M
3. Batch Similar Requests
python
# Instead of 10 separate calls, batch them
texts = ["text1", "text2", "text3"]
batch_prompt = "Analyze these texts:\n" + "\n".join(texts)

response = client.chat.completions.create(
    model="grok-3-fast",
    messages=[{"role": "user", "content": batch_prompt}]
)

Tool Calling Costs

ToolCost per 1,000 calls
X Search$5.00
Web Search$5.00
Code Execution$5.00
Document Search$2.50

Context Window Comparison

ModelContextPages of TextHours of Audio
grok-4-1-fast2M~6,000~50
grok-4256K~800~6
grok-3-fast131K~400~3
grok-2-vision32K~100~1

Model Capabilities Matrix

Capability4.1 Fast43 Fast3 Mini2 Vision
Tool Calling⭐⭐⭐⭐⭐⭐⭐❌
Reasoning⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Speed⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Cost⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Vision❌❌❌❌⭐⭐⭐
X Search⭐⭐⭐⭐⭐⭐⭐⭐❌
Financial Sentiment Pipeline
python
MODELS = {
    "filter": "grok-3-mini",      # Fast filtering
    "analyze": "grok-4-1-fast",   # Tool calling + analysis
    "deep": "grok-4"              # Complex reasoning (rare)
}
High-Volume Processing
python
MODELS = {
    "bulk": "grok-3-mini",
    "quality_check": "grok-3-fast"
}
Research & Analysis
python
MODELS = {
    "search": "grok-4-1-fast",
    "analyze": "grok-4",
    "summarize": "grok-3-fast"
}

API Usage Example

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("XAI_API_KEY"),
    base_url="https://api.x.ai/v1"
)

# List available models
models = client.models.list()
for model in models.data:
    print(f"{model.id}")

# Use specific model
response = client.chat.completions.create(
    model="grok-4-1-fast",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=100
)
  • xai-auth - Authentication setup
  • xai-agent-tools - Tool calling
  • xai-sentiment - Sentiment analysis

References

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/ai-llm/xai-models of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 2d14a69

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Xai Models next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Xai Models compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xai Models this skillmajiayu000/claude-skill-registry6661 repos~1.6kAutomated safety check: PassMIT
Project Developmentguanyang/open-agent-hub9752 repos~4.7kAutomated safety check: PassMIT
Documentation Serverandrea9293/mcp-documentation-server343—~2.3kAutomated safety check: PassMIT
Orchestrate RoundArch1eSUN/Arcgentic286—~1.5kAutomated safety check: PassMIT
MCP Auditgetsentry/toolkit917—~1.5kAutomated safety check: PassCustom licence
Discover Agenticrand/cc-polymath1811 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Project Development

    guanyang/open-agent-hub

    This skill should be used for project-level decisions about LLM-powered systems: whether an LLM is the right primitive for the task at hand, the shape of a multi-stage batch or agent pipeline, token…

    975 GitHub starsUsed in 2 repos~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Documentation Server

    andrea9293/mcp-documentation-server

    A skill your agent uses when you need to store, retrieve, search, or manage documents in a local knowledge base with semantic search and hybrid (vector + full-text) retrieval.

    343 GitHub stars~2.3k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Orchestrate Round

    Arch1eSUN/Arcgentic

    Main-session orchestrator for arcgentic rounds. An agent skill from Arch1eSUN/Arcgentic.

    286 GitHub stars~1.5k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • MCP Audit

    getsentry/toolkit

    Official

    Audit MCP servers for protocol compliance, metadata drift, and compatibility regressions.

    917 GitHub stars~1.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Discover Agentic

    rand/cc-polymath

    Automatically discover agentic workflow skills when building AI agents, implementing tool use patterns, managing context windows, decomposing complex tasks, or designing multi-step autonomous…

    181 GitHub starsUsed in 1 repo~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Agent Protocol

    alirezarezvani/claude-skills

    Inter-agent communication protocol for C-suite agent teams. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~4k tokens
    Agent WorkflowsAuto-check passed

More from majiayu000/claude-skill-registry

All 1,273 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Pyzotero

    majiayu000/claude-skill-registry

    Interact with Zotero reference management libraries using the pyzotero Python client.

    666 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check: notes
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed

Works with

Questions about Xai Models

What does Xai Models do?

xAI Grok model selection and capabilities guide. An agent skill from majiayu000/claude-skill-registry. Xai Models is an agent skill from majiayu000/claude-skill-registry. xAI Grok model selection and capabilities guide.

When should I use Xai Models?

Xai Models fits situations like: choosing the right Grok model for your task; comparing model features; optimizing costs.

How do I install Xai Models in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill xai-models -a claude-code`. Or copy the skill folder (skills/ai-llm/xai-models in majiayu000/claude-skill-registry) into .claude/skills/xai-models in your project. Claude Code loads it when a task matches its description.

How do I install Xai Models in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill xai-models -a codex`. Or copy the skill folder (skills/ai-llm/xai-models in majiayu000/claude-skill-registry) into .agents/skills/xai-models in your project. Codex loads it when a task matches its description.

Can I use Xai Models in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill xai-models -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xai-models, .gemini/skills/xai-models, .github/skills/xai-models and .opencode/skills/xai-models in your project.

What does Xai Models need to run?

Going by SKILL.md and its folder, Xai Models needs credentials named XAI_API_KEY. Our summary lists: Python 3; A credential in XAI_API_KEY.

Does Xai Models access the network?

SKILL.md names 3 domains. In commands or code: api.x.ai; the agent is likely to contact it when it follows the instructions. As links in the text: docs.x.ai and x.ai. This is read from the text; nothing was executed.

Is Xai Models safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Xai Models use?

Xai Models is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xai Models use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Xai Models?

Skills that share tags, products or a category with Xai Models: Project Development (guanyang/open-agent-hub, 975 stars), Documentation Server (andrea9293/mcp-documentation-server, 343 stars), Orchestrate Round (Arch1eSUN/Arcgentic, 286 stars) and MCP Audit (getsentry/toolkit, 917 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xai Models?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 1,273 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.