llm-cli-gateway: Skill for Claude Code

.agents/skills/provider-grok/SKILL.md

provider-grok is a skill for Claude Code from verivus-oss/llm-cli-gateway. It costs 75 tokens per session (2,080 once invoked), scanned A, original, MIT.

A maintenance guide for keeping an xAI Grok command-line tool's integration aligned with its upstream release contract. The contract describes supported flags, permissions, sandboxing, output formats, and session continuation.

In plain words
What is it for?
It is for checking release changes and investigating contract-check failures for Grok requests.
Why use it?
It helps detect when changes in the Grok CLI could make the gateway's integration incorrect.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is verivus-oss/llm-cli-gateway's own configuration. It tells Claude Code how to work on llm-cli-gateway itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llm-cli-gateway configures →

Part of the llm-gateway plugin — 24 skills, 4 commands, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to verivus-oss/llm-cli-gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/verivus-oss/llm-cli-gateway/main/.agents/skills/provider-grok/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/verivus-oss/llm-cli-gateway

Made for: Claude Code.

Or install llm-gateway, the plugin that ships this one along with the rest of its 24 skills, 4 commands, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for provider-grok

README.md
[![agentmods](https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/provider-grok/github.svg)](https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/provider-grok)
Your own site
<a href="https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/provider-grok"><img src="https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/provider-grok/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for provider-grok

Your own site · 80×15
<a href="https://agentmods.dev/skills/verivus-oss/llm-cli-gateway/provider-grok"><img src="https://agentmods.dev/badge/skills/verivus-oss/llm-cli-gateway/provider-grok.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.02080
Opus 5 $0.00037 $0.01040
Sonnet 5 $0.00015 $0.00416
Haiku 4.5 $0.00007 $0.00208

Measured 5d ago against content hash 3a700e765274, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

provider-grok scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/provider-grok/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Provider: xAI Grok CLI

Process guidance for keeping the gateway's Grok (grok) integration aligned with the upstream CLI. This skill does not define argv/env behaviour; the single mechanical source of truth is UPSTREAM_CLI_CONTRACTS.grok in src/upstream-contracts.ts, enforced by validateUpstreamCliArgs / validateUpstreamCliEnv. Never re-encode flags, permission modes, sandbox, or resume rules here or in TOML.

Identity

Field Value
CliType grok
Executable grok
Distribution vendor (no pinned npm/PyPI package recorded)
Changelog https://docs.x.ai/developers/release-notes.md
Install docs https://docs.x.ai/build/overview
Watch categories flags, permission-modes, session-resume, sandbox, output-formats

These values mirror UPSTREAM_CLI_CONTRACTS.grok.upstreamMetadata and docs/upstream/provider-sources.dag.toml ([providers.grok]). The TypeScript metadata is authoritative; the TOML is scanner input only.

When to use

  • An xAI Grok CLI release lands and you need to check for contract drift.
  • A grok request fails the upstream contract check before spawn.
  • npm run upstream:scan -- --live reports a change on the x.ai changelog.

How LLM agents should use Grok through the gateway

  1. Discover the live gateway/provider surface before relying on Grok-specific controls or local skill tools:
    provider_tool_capabilities({cli:"grok"})
    
    For a cached read-only resource, use provider-tools://grok.
  2. Use grok_request for normal turns and grok_request_async for long-running review, analysis, or diversity checks. Sync calls may auto-defer; poll llm_job_status and fetch with llm_job_result when that happens.
  3. Omit model unless the caller explicitly asked for a specific variant; the gateway resolves the configured Grok default.
  4. Do not copy Claude tool names such as Read, Grep, Glob, or Bash into Grok allowedTools; Grok has its own provider-native tool names. This was the root cause of prior Grok reviewer startup failures.
  5. Grok supports gateway allowedTools / disallowedTools, allow / deny, alwaysApprove, permissionMode, agent/subagent controls, web-search toggles, memory/planning toggles, prompt controls, output format, workspace/worktree/native-worktree controls, session controls, and compaction/effort controls as reported by provider_tool_capabilities. Use approvalStrategy:"legacy": Grok rejects mcp_managed before launch and approvalPolicy has no effect. Its permission and sandbox controls remain provider-native. Native ACP also rejects those Claude-only fields.
  6. mcpServers is descriptive metadata only; Grok owns its MCP configuration.
  7. Local Grok skills are discoverable from ~/.grok/skills and bundled skill directories. provider_tool_capabilities reports discovered provider-native tools such as Imagine image_gen, image_edit, image_to_video, and reference_to_video when those skills are present. The gateway still executes Grok through grok_request; it does not directly call those native tools.
  8. The full subcommand surface (including agent/*, update, worktree, dashboard, login, etc.) is exposed via provider_subcommands_list, provider_subcommand_contract, and provider_subcommand_drift for inspection and drift monitoring. dashboard (grok 0.2.60 (474c2bbfc)+) is catalogued as read-only/inspect.
  9. Grok continuity is real via sessionId, resumeLatest, createNewSession, --resume, and --continue. Auth must already be set up with grok login or XAI_API_KEY. Bind concurrent repository work with workingDir or a verified workspace. Use gateway worktree only with an explicit provider-native sessionId that is not overridden by createNewSession; fresh, createNewSession, and resumeLatest-only worktree requests fail closed.
  10. An unscoped CLI child uses a fresh neutral temporary cwd. A cwd-scoped resumeLatest without a stable selected target fails closed. Grok's current prompt contract is argv-bound, so oversized UTF-8 input fails as non-retryable input_too_large and is never truncated. All other caller-controlled argv values are admitted in their final encoded form before spawn. Embedded NUL bytes return non-retryable invalid_input without exposing the rejected value.

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed 3a700e765274
  2. 10d ago First seen · 142 lines · 75 tokens per session scan A 01318f0d5092

Subscribe to this mod's changes

provider-grok is a skill published in the GitHub repository verivus-oss/llm-cli-gateway (15 stars, last pushed 2d ago), licensed MIT. It adds 75 tokens to every session and 2,080 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.