Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add nirholas/three.ws --skill xai-grok-api-guidegit clone --depth 1 https://github.com/nirholas/three.wsWrote 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.
[](https://agentmods.dev/skills/nirholas/three.ws/xai-grok-api-guide)<a href="https://agentmods.dev/skills/nirholas/three.ws/xai-grok-api-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/xai-grok-api-guide/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.
<a href="https://agentmods.dev/skills/nirholas/three.ws/xai-grok-api-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/xai-grok-api-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 3 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Data Exfiltration · line 38 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 38 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 55 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.01071 |
| Opus 5.5 | $0.00025 | $0.00428 |
| Sonnet 5.5 | $0.00013 | $0.00214 |
| Haiku 4.5 | $0.00006 | $0.00107 |
Grade A, and why
xai-grok-api-guide scanned grade A with 1 finding 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 2mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl https://api.x.ai/v1/chat/completions \ How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
xAI Grok API Guide
Grok is xAI's frontier AI model with native X (Twitter) data access. This guide covers API usage, models, and integration patterns.
Why Grok?
| Feature | Grok Advantage |
|---|---|
| Real-time X data | Access to live tweets, trending topics |
| No knowledge cutoff | Trained on latest data continuously |
| Humor/personality | More engaging conversational style |
| Function calling | Full tool support |
| Vision | Image understanding |
| Long context | 128K+ context window |
Models
| Model | Context | Best For | Price (1M tokens) |
|---|---|---|---|
| Grok-3 | 128K | Complex reasoning, analysis | $5 / $15 |
| Grok-2 | 128K | General tasks, faster | $2 / $10 |
| Grok-2-mini | 128K | Quick responses, budget | $0.50 / $2 |
Quick Start
curl https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3",
"messages": [
{"role": "user", "content": "What is trending in crypto on X right now?"}
]
}'
OpenAI-Compatible API
import OpenAI from 'openai';
const xai = new OpenAI({
baseURL: 'https://api.x.ai/v1',
apiKey: process.env.XAI_API_KEY,
});
const response = await xai.chat.completions.create({
model: 'grok-3',
messages: [
{ role: 'system', content: 'You are a crypto market analyst.' },
{ role: 'user', content: 'Analyze $SPA on X/Twitter.' }
]
});
Function Calling
const response = await xai.chat.completions.create({
model: 'grok-3',
messages: [{ role: 'user', content: 'What is the price of SPA?' }],
tools: [
{
type: 'function',
function: {
name: 'getTokenPrice',
description: 'Get the current price of a cryptocurrency token',
parameters: {
type: 'object',
properties: {
symbol: { type: 'string', description: 'Token symbol (e.g., SPA, ETH)' },
chain: { type: 'string', description: 'Blockchain (e.g., arbitrum)' }
},
required: ['symbol']
}
}
}
]
});
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.
- 2mo ago First seen · 152 lines · 63 tokens per session scan A 8822aa421173
xai-grok-api-guide is a skill published in the GitHub repository nirholas/three.ws (287 stars, last pushed yesterday), licensed Apache-2.0. It adds 63 tokens to every session and 1,071 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
xai-grok-api-guide compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| xai-grok-api-guidenirholas/three.ws | Skill | 287 | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |
| coding-agents-prompt-authoringgriddynamics/rosetta | Skill | 382 | 5d ago | Apache-2.0 | A | 39 | Claude Code |
| opik-optimizecomet-ml/opik-mcp | Skill | 227 | 4d ago | Apache-2.0 | A | 143 | Claude Code |
| strategyEliasOulkadi/shokunin | Skill | 112 | 1mo ago | MIT | A | 42 | Claude Code, Codex |
| orchardcore-ai-workflowsCrestApps/CrestApps.AgentSkills | Skill | 14 | 7d ago | MIT | A | 190 | Claude Code |
| image-generationGalbaz1/video-research-mcp | Skill | 23 | 9d ago | MIT | A | 45 | Claude Code |
| granite-pay-per-callnirholas/ibm-x402-mcp | Skill | 9 | 19d ago | Apache-2.0 | A | 49 | Claude Code |