Query Grok chat completions and list available Grok models through the xAI API.

MITAuto-check passedAI & LLM Engineering

Install Xai

skills CLI
$ npx skills add Anil-matcha/awesome-muse-connectors --skill xai -a claude-code

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

GitHub CLI
$ gh skill install Anil-matcha/awesome-muse-connectors xai --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/Anil-matcha/awesome-muse-connectors.git skills-src && mkdir -p .claude/skills && cp -r skills-src/connectors/xai .claude/skills/xai && 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
GitHub stars
1.3k
Token cost
~1.1k tokens
SKILL.md length
393 words
Files
2
Skills in repo
153
Repo updated
First seen
Licence
MIT

At a glance

Query Grok chat completions and list available Grok models through the xAI API.

  • Works in 4 steps: Completions spend real money. xAI bills… → Model ids move fast. The CLI defaults to… → Never exfiltrate the credential: the CLI… → …
  • Tasks that involve LLM API integration
  • SKILL.md covers Purpose, Tooling, Auth and Install, plus 3 more sections
  • Runs Python scripts from its folder; reaches raw.githubusercontent.com

What it does

Xai is an agent skill from Anil-matcha/awesome-muse-connectors. Query Grok chat completions and list available Grok models through the xAI API. Trigger phrases: xai, grok, chat with grok, grok model.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `bin/xai.py`).

It sits in AI & LLM Engineering, covering LLM API integration. It works with xAI Grok. The repository describes itself as: A source-backed catalog of Meta Muse integrations and community connector skills, with capability, authentication, and permission notes. The licence is MIT.

When your agent uses it

  • Tasks that involve LLM API integration

Example prompts

  • “/xai”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Completions spend real money. xAI bills per token (roughly $2.00/1M input and $6.00/1M output for the flagship at the time this was…
  2. Model ids move fast. The CLI defaults to grok-4.6. That is the flagship named on xAI's docs page (last updated 2026-08-21). Prefer the…
  3. Never exfiltrate the credential: the CLI only ever handles surrogates (see bin/xai.py). Do not print, log, or transmit the API key.
  4. Honesty flags (unverified while building this connector): the default model id grok-4.6 was confirmed on docs.x.ai (last updated…

What it can do on your machine

Read from SKILL.md and the folder at commit d6dc5d8. 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

    Ships script files (Python), which the agent can run.

    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:

    • raw.githubusercontent.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Xai loads about 1.1k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 393 words of instructions outside code blocks.

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

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 Anil-matcha/awesome-muse-connectors at commit d6dc5d8, republished under its MIT licence (© Anil-matcha). 393 words, ~1,066 tokens.

Download SKILL.mdSave it as .claude/skills/xai/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
xai
description
Query Grok chat completions and list available Grok models through the xAI API. Trigger phrases: xai, grok, chat with grok, grok model.
metadata.includeInPrompt
true
tagline
Query Grok chat completions and list available Grok models through xAI's OpenAI-compatible API, with per-call token usage surfaced so cost is always visible.
catalog_auth
API key (per-user)
catalog_hosts
api.x.ai

xAI (Grok)

Purpose

Send chat completions to Grok and list the Grok models available to your API key, through xAI's OpenAI-compatible REST API. Reach for this when the user wants a Grok answer, a comparison against Grok, or to see which Grok models their key can use.

Tooling

All commands go through bin/xai.py:

bash
bin/xai.py auth                                              # verify the API key
bin/xai.py models                                            # list available Grok models
bin/xai.py chat --model grok-4.6 --message "Summarize this:" # one completion (spends tokens)
bin/xai.py chat --message "Explain caching in one paragraph" \
    --system "You are a precise technical writer." \
    --temperature 0.7 --max-tokens 500                        # with options

chat takes --message (or --prompt as an alias; one is required), plus optional --model (default grok-4.6), --system, --temperature, and --max-tokens. Every completion prints the response text plus its token usage, so the cost is always visible.

Auth

  • Provider id: xai (credential is collected as custom.xai)
  • Collection: API key (xAI console > API keys; keys start with xai-) via the secure credential flow (credentials.request_api_access)
  • Auth scheme: Authorization: Bearer <api key> on every request
  • Allowed hosts: api.x.ai
  • Status check: bin/xai.py auth

Install

Copy, paste to your Muse:

Install this connector: https://raw.githubusercontent.com/bluman1/muse-connectors/main/connectors/xai/SKILL.md
You are Muse. Fetch the URL above: it is a connector skill's SKILL.md.
1. Read its `## Files` manifest and download every listed file from the same directory (replace SKILL.md in the URL with each relative path).
2. Save them under ~/workspace/skills/xai/, preserving paths. Compile any bin/*.py with python3 -m py_compile.
3. Follow the skill's `## Auth` section: connect my account via your secure credential flow (credentials.request_api_access) for the provider id it names.
4. Run the skill's status check and report what the connector can now do.
Never ask me for raw API keys or secrets in chat.

Operating Rules

  1. Completions spend real money. xAI bills per token (roughly $2.00/1M input and $6.00/1M output for the flagship at the time this was written). Every chat prints how many tokens the call used, so the cost is visible. A single ordinary completion needs no confirmation gate, but surface the cost and confirm with the user before running large or repeated generations.
  2. Model ids move fast. The CLI defaults to grok-4.6. That is the flagship named on xAI's docs page (last updated 2026-08-21). Prefer the live models output over this file when picking a model; a stale id produces an API error you can act on.
  3. Never exfiltrate the credential: the CLI only ever handles surrogates (see bin/xai.py). Do not print, log, or transmit the API key.
  4. Honesty flags (unverified while building this connector): the default model id grok-4.6 was confirmed on docs.x.ai (last updated 2026-08-21) but xAI renames models often, so treat it as provisional; the /v1/chat/completions and /v1/models paths were confirmed in xAI's OpenAI-compatible docs but not live-tested. There is no usage or balance endpoint that works with a standard API key: GET /v1/api-key returns info about the calling key only. Real billing and usage live on xAI's separate Management API (management-api.x.ai), which requires a Management key plus a team id, and inference API keys are rejected there, so this connector ships no usage command. This connector has not been live-tested end-to-end.
Show full SKILL.md (18 more words)Show less

Files

  • SKILL.md
  • bin/xai.py

Maturity

Draft: written from xAI's public docs (docs.x.ai, last checked 2026-09-16); not yet live-tested end-to-end.

© Anil-matcha, 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 connectors/xai of Anil-matcha/awesome-muse-connectors.

  • SKILL.md
  • bin/xai.py

Open the folder on GitHubat commit d6dc5d8

Compare with similar skills

Xai 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xai this skillAnil-matcha/awesome-muse-connectors1.3k—~1.1kAutomated safety check: PassMIT
PiDeck Usage Probe Helperayuayue/PiDeck1k—~1.4kAutomated safety check: PassMIT
Dingo VerifyMigoXLab/dingo757—~833Automated safety check: PassApache-2.0
Agnes Free Textkangarooking/agnes-free-model-skills199—~630Automated safety check: PassMIT
Openai Docstheowenyoung/home1151 repos~1.4kAutomated safety check: PassApache-2.0
AIbutterbase-ai/butterbase-skills534—~1.1kAutomated safety check: PassMIT

Similar skills

  • Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.

    1k GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~833 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Agnes Free Text

    kangarooking/agnes-free-model-skills

    Call the free Agnes text model API for chat completions, streaming answers, coding help, tool-calling experiments, and OpenAI-compatible text generation.

    199 GitHub stars~630 tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • Openai Docs

    theowenyoung/home

    A skill your agent uses for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or…

    115 GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • AI

    butterbase-ai/butterbase-skills

    A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage

    534 GitHub stars~1.1k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Openagents API

    OpenAgentsInc/openagents

    Call the OpenAgents API (Open Responses and Chat Completions, many models, one key) and read its docs.

    455 GitHub stars~430 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from Anil-matcha/awesome-muse-connectors

All 153 skills in this repo
  • Airtable

    Anil-matcha/awesome-muse-connectors

    List Airtable bases, read table records, and add records. An agent skill from Anil-matcha/awesome-muse-connectors.

    1.3k GitHub stars~511 tokensUpdated 4 days ago
    Auto-check passed
  • Alphavantage

    Anil-matcha/awesome-muse-connectors

    Stock quotes and daily price history. An agent skill from Anil-matcha/awesome-muse-connectors.

    1.3k GitHub stars~517 tokensUpdated 4 days ago
    Auto-check passed
  • Amadeus

    Anil-matcha/awesome-muse-connectors

    Search travel with Amadeus: flight offers and prices, airport autocomplete, hotel offers, cheapest dates.

    1.3k GitHub stars~699 tokensUpdated 4 days ago
    Auto-check passed
  • Apollo

    Anil-matcha/awesome-muse-connectors

    Search B2B contacts with Apollo.io: find people by title and company, enrich contacts and companies.

    1.3k GitHub stars~492 tokensUpdated 4 days ago
    Auto-check passed
  • Aqara

    Anil-matcha/awesome-muse-connectors

    Read and control Aqara smart home devices: plugs, switches, lights, AC, locks, curtains, scenes.

    1.3k GitHub stars~1.6k tokensUpdated 4 days ago
    Auto-check passed
  • Asana

    Anil-matcha/awesome-muse-connectors

    Read and manage Asana tasks: my tasks, task details, create tasks.

    1.3k GitHub stars~481 tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Xai

What does Xai do?

Query Grok chat completions and list available Grok models through the xAI API. Xai is an agent skill from Anil-matcha/awesome-muse-connectors. Query Grok chat completions and list available Grok models through the xAI API.

When should I use Xai?

Xai fits situations like: tasks that involve LLM API integration.

How do I install Xai in Claude Code?

Run `npx skills add Anil-matcha/awesome-muse-connectors --skill xai -a claude-code`. Or copy the skill folder (connectors/xai in Anil-matcha/awesome-muse-connectors) into .claude/skills/xai in your project. Claude Code loads it when a task matches its description.

How do I install Xai in Codex?

Run `npx skills add Anil-matcha/awesome-muse-connectors --skill xai -a codex`. Or copy the skill folder (connectors/xai in Anil-matcha/awesome-muse-connectors) into .agents/skills/xai in your project. Codex loads it when a task matches its description.

Can I use Xai 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 Anil-matcha/awesome-muse-connectors --skill xai -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, .gemini/skills/xai, .github/skills/xai and .opencode/skills/xai in your project.

What does Xai need to run?

Going by SKILL.md and its folder, Xai needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Xai access the network?

SKILL.md names 1 domain. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Xai 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 use?

Xai 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 use?

About 1.1k tokens (SKILL.md is roughly 4.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?

Skills that share tags, products or a category with Xai: PiDeck Usage Probe Helper (ayuayue/PiDeck, 1k stars), Dingo Verify (MigoXLab/dingo, 757 stars), Agnes Free Text (kangarooking/agnes-free-model-skills, 199 stars) and Openai Docs (theowenyoung/home, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xai?

Anil-matcha (a GitHub user) maintains it in Anil-matcha/awesome-muse-connectors, which has 1,347 GitHub stars. The repository holds 153 skills in this directory. The repository was last updated on October 5, 2026.

Source: Anil-matcha/awesome-muse-connectors on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.