Borrowing it
Nothing to install: this file belongs to BlockedPath/pi-xai-oauth. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/BlockedPath/pi-xai-oauth/main/AGENTS.mdgit clone --depth 1 https://github.com/BlockedPath/pi-xai-oauthWrote 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/instructions/blockedpath/pi-xai-oauth/agents-md)<a href="https://agentmods.dev/instructions/blockedpath/pi-xai-oauth/agents-md"><img src="https://agentmods.dev/badge/instructions/blockedpath/pi-xai-oauth/agents-md/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/instructions/blockedpath/pi-xai-oauth/agents-md"><img src="https://agentmods.dev/badge/instructions/blockedpath/pi-xai-oauth/agents-md.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.03751 | $0.03751 |
| Opus 5.5 | $0.01500 | $0.01500 |
| Sonnet 5.5 | $0.00750 | $0.00750 |
| Haiku 4.5 | $0.00375 | $0.00375 |
Grade A, and why
pi-xai-oauth AGENTS.md 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 16d 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 — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — AI Agent Operations Manual for pi-xai-oauth
For AI coding agents only. Keep this file machine-readable and concise. Human-facing docs live in README.md.
Project Overview
pi-xai-oauth is a pi-package that registers the optional xAI OAuth provider (xai-auth) and the authenticated account's OAuth-visible Grok model catalog, including Grok 4.7 when entitled, with Grok 4.6 retained as the curated offline fallback. Opt-in network tools and /xai-usage also work with Pi's built-in xai SuperGrok/X Premium chat provider; setup seeds defaultProvider: xai only when unset and never overwrites an existing provider choice.
Core flow: bin/setup.js → pi install → bounded catalog selection in extensions/xai/catalog.ts → provider registration in extensions/xai-oauth.ts → browser PKCE or bounded device authorization in extensions/xai/oauth.ts / extensions/xai/device-auth.ts → pinned browser OIDC/JWKS validation in extensions/xai/oidc.ts → streaming via xAI API helpers in extensions/xai/responses.ts; explicit revision-pinned subscription usage lives in extensions/xai/usage.ts; Grok voice dictation and the opt-in TTS/STT tools live in extensions/xai/voice/.
Key Commands (Exact, Copy-Paste Ready)
- Install / setup:
node bin/setup.jsornpm run setup - Install as pi extension:
pi install npm:pi-xai-oauth - Explicit usage CSV export in Pi TUI/RPC:
/xai-usage csv(normalized fields only, copyable output, no automatic file writes or status opt-in) - Grok voice dictation in Pi TUI/RPC:
/xai-voice [language|auto] [live|clip], Ctrl+Space, or F8 (needs a system recorder, a real microphone, and xAI OAuth; not runnable headless) - Grok voice chat in Pi TUI/RPC:
/xai-talk [eve|ara|rex|sal|leo] [duplex] [context](needs a recorder, an audio player, speakers or headphones, and xAI OAuth; not runnable headless) - Full policy/unit/loader/CLI gate:
npm test - Focused Vitest suite:
npm run test:unit -- tests/oauth/browser-login.test.ts - V8 coverage:
npm run test:coverage - Real Pi RPC e2e suite:
npm run test:e2e(spawnspi --mode rpcwith only this extension in an isolated HOME; offline, no credentials, no model calls; needs Node ^22.22.3 or >=24.8, so it stays out ofnpm testand runs in the exact-version boundary jobs instead) - Real Pi loader smoke:
npm run test:loader - Real Pi version and isolated update-dispatch smoke:
npm run test:cli - Run TypeScript:
npm run typecheck(production, tests, fixtures, config) - Verify Pi policy/package metadata:
npm run compatibility:check - Verify exact packed Pi boundaries:
npm run compatibility:boundaries - Verify the scoped GitHub Packages mirror:
node scripts/verify-github-package.js - Evaluate an unadvertised Pi candidate:
node scripts/run-compatibility-matrix.js X.Y.Z --candidate - Git: Always work on feature branches and confirm the active branch before edits.
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.
- 16d ago Changed · +3 lines · +155 tokens per session a12a159f4195
- 17d ago Changed · +7 lines · +415 tokens per session 6556dc0f5d90
- 24d ago Changed · +3 tokens per session bc0ede578f9a
- 1mo ago Changed · +3 lines · +65 tokens per session c256bb7f515a
- 1mo ago Changed · +1 lines · +75 tokens per session 9b3f07a41e98
- 1mo ago Changed · +1 lines · +40 tokens per session c20b5729a1cc
- 1mo ago Changed · +1 lines · +37 tokens per session 8fe6a70f63c8
- 1mo ago First seen · 182 lines · 2,961 tokens per session scan A c71e077f3a4d
pi-xai-oauth AGENTS.md is an instructions file published in the GitHub repository BlockedPath/pi-xai-oauth (43 stars, last pushed 3d ago), licensed MIT. It adds 3,751 tokens to every session, about $0.0150 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-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.