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 aphrody-code/bxc --skill bxc-grok-xaigit clone --depth 1 https://github.com/aphrody-code/bxcWrote 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/aphrody-code/bxc/bxc-grok-xai)<a href="https://agentmods.dev/skills/aphrody-code/bxc/bxc-grok-xai"><img src="https://agentmods.dev/badge/skills/aphrody-code/bxc/bxc-grok-xai/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/aphrody-code/bxc/bxc-grok-xai"><img src="https://agentmods.dev/badge/skills/aphrody-code/bxc/bxc-grok-xai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00108 | $0.00825 |
| Opus 5.5 | $0.00043 | $0.00330 |
| Sonnet 5.5 | $0.00022 | $0.00165 |
| Haiku 4.5 | $0.00011 | $0.00082 |
Grade A, and why
bxc-grok-xai 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@aphrody/xai — High-Level Grok Client (Bun native, keyless)
OpenAI-compatible client for api.x.ai/v1 with a fluent stateful Chat API inspired by the official Python xai-sdk, plus first-class support for native X tool calling via the sibling @aphrody/x package.
Auth (keyless first)
Resolution (in resolveAuth):
- Explicit bearer
- XAI_API_KEY (metered xai-...)
- SUPER_GROK_TOKEN / GROK_SUPER_TOKEN env (preferred for gratuite)
- ~/.grok/auth.json (from
grok login, OIDC JWT) → treated as supergrok mode if not xai- key
Non-xai- tokens → "supergrok" / "grok_oidc" mode. Full compatibility for agent flows without billing.
High-Level API (the main thing)
const grok = new XaiClient();
const chat = grok.createChat("grok-3", {
messages: [system("You are helpful.")],
tools: xNativeTools, // from @aphrody/xai
reasoning_effort: "high",
response_format: { type: "json_object" }
});
chat.append(user("..."));
const res = await chat.sample();
const n = await chat.executeToolCalls({ x_search: (a) => xTools.search(a), ... });
const stream = chat.stream(); // yields {content, toolCallDeltas, toolCalls, done, response?}
const structured = await chat.sampleStructured(schema?);
executeToolCalls(handlersOrXToolsInstance) auto-dispatches or uses provided map. Appends role: "tool" messages automatically.
XTools class (in tools/x.ts) wraps a real or mocked XClient from @aphrody/x. Constructor accepts optional prebuilt client for unit tests.
xNativeTools array of tool defs ready to pass to createChat.
Integration with native X (@aphrody/x)
Grok can emit x_search / x_profile / x_whoami / x_tweets / x_news tool_calls. Fulfillment is done locally with cookie-stealth XClient + local SQLite + optional local For-You ranking (no external Twitter API, no extra keys).
See packages/xai/examples/grok-x-agent.ts for a complete runnable loop.
Low-level still supported
client.chat(), client.stream(), listModels(), etc. for when you need raw control.
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 Changed · +1 lines · -3 tokens per session 8d152c7d4b60
- 3mo ago First seen · 69 lines · 111 tokens per session scan A e96a48028483
bxc-grok-xai is a skill published in the GitHub repository aphrody-code/bxc (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 108 tokens to every session and 825 once invoked, about $0.0004 per session on Opus 5.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-31.
bxc-grok-xai compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bxc-grok-xaiaphrody-code/bxc | Skill | 3 | 2mo ago | Apache-2.0 | A | 108 | Claude Code |
| pinchtab-optpinchtab/pinchtab | Skill | 11k | 8d ago | MIT | C | 161 | Claude Code, Codex |
| using-claude-clideveloperz-ai/ui-debugger-mcp | Skill | 2 | 3d ago | MIT | A | 61 | Claude Code, Codex |
| open-sourcebrowser-use/browser-use | Skill | 123k | yesterday | MIT | A | 101 | Claude Code |
| tool-prompt-optimizationcan1357/oh-my-pi | Skill | 40k | yesterday | MIT | A | 0 | Claude Code, Codex |
| pinchtabpinchtab/pinchtab | Skill | 11k | 8d ago | MIT | A | 94 | Codex |
| pinchtab-mcppinchtab/pinchtab | Skill | 11k | 8d ago | MIT | A | 52 | Claude Code, Codex |