rianprei

Grok Proxy Cc — Development skill for Claude Code

Development community

Anthropic Messages API proxy for Grok (xAI) — reuses ~/.grok/auth.json CLI login.

How to install Grok Proxy Cc

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rianprei/grok-proxy-cc and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Grok Proxy Cc does

Anthropic Messages API proxy for Grok (xAI) — reuses ~/.grok/auth.json CLI login. Born at maximum optimization: hyper direct, 1.2M UPX, zero bloat.

Alternatives in Development

  • Doctor — Environment diagnostics with interactive fixes — providers, auth, RTK, hooks, token optimization 2.8k ★
  • Opencode Claude Auth — OpenCode plugin that uses your existing Claude Code credentials — no separate login needed 903 ★
  • Ask Grok — Get Grok (xAI) second opinion on a question or current work 135 ★

README

grok-proxy-cc

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Rust](https://img.shields.io/badge/rust-1.75%2B-orange.svg)](https://www.rust-lang.org) [![Build](https://img.shields.io/badge/build-passing-brightgreen.svg)](.github/workflows/ci.yml) [![Binário](https://img.shields.io/badge/binary-1.2M%20UPX-blueviolet.svg)](#build)

An **Anthropic Messages-API-compatible** HTTP proxy, written in Rust, that lets [Claude Code](https://docs.anthropic.com/en/docs/claude-code) drive **Grok (xAI)** models through your existing **Grok CLI login** — no API key, no paid tokens.

Claude Code speaks Anthropic `/v1/messages`; the proxy translates each request into an OpenAI Chat Completions call against `cli-chat-proxy.grok.com`, using the **OIDC token** the `grok` CLI already stores in `~/.grok/auth.json`, and streams the answer back as Anthropic SSE.

claude --model claude-grok-4.7
  → grok-proxy-cc :4112 (Anthropic Messages → OpenAI Chat Completions)
    → cli-chat-proxy.grok.com/v1 (com OIDC JWT do seu login)
      → grok-4.7 responde

Features

  • Zero API key — reuses the Grok CLI's OIDC session from ~/.grok/auth.json
  • 4 models: grok-4.7, grok-4.7-build-fast, grok-4.6, grok-4.5
  • Streaming SSE: reasoning_content → thinking blocks, content → text, tool_calls → tool_use — full Anthropic event stream
  • Tool calling: tool_use ↔ tool_calls, tool_result → role:tool
  • Native effort control: Claude Code's /effort slider → reasoning_effort
  • Chain fallback: grok-4.7 → 4.7-build-fast → 4.6 → 4.5 (same-provider)
  • Token auto-recovery: re-reads ~/.grok/auth.json on upstream 401 — the proxy survives the 6-hour OIDC token rotation without restart
  • Fail-closed: quota exhaustion → terminal 429 with retry-after: 3600, never silently falls back
  • Loopback-only: binds 127.0.0.1, never exposed to the network
  • Constant-time auth: local Bearer token checked in O(n) wi