What problem does it solve? Building a server-side gateway that Claude Code can connect to via ANTHROPIC_BASE_URL requires reproducing the Anthropic Messages API contract, including SSE streaming, tool round-trips, and error semantics, which is error-prone without a precise specification. ## Core Features & Use Cases - Messages API Implementation: Guides implementation of POST /v1/messages with streaming and non-streaming responses, system prompts, tools, thinking, and beta headers. - SSE Streaming & Tool Round-Trips: Defines the exact Anthropic raw SSE event sequence and the tool_use/tool_result conversation cycle. - Supporting Endpoints: Covers count_tokens, Files API (upload, list, download), and GET /v1/models with Anthropic-compatible response shapes. - Use Case: You want Claude Code to route requests through your own proxy backed by a non-Anthropic upstream model; this Skill walks you through implementing each endpoint, converting upstream responses into Anthropic content blocks and SSE events, and validating with acceptance test cases. ## Quick Start Ask the AI to implement a Claude Code compatible /v1/messages endpoint with SSE streaming following this gateway specification.