What problem does it solve? Reimplementing a provider's OAuth flow from scratch often produces subtle mismatches—wrong client IDs, missing scopes, incorrect endpoints, or incompatible token storage—that break token interchange with the official CLI. This Skill guides porting the reference CLI's OAuth implementation exactly, so tokens obtained by either tool work in both. ## Core Features & Use Cases - Exact constant extraction: Locates the reference CLI's auth source (e.g., gemini-cli's oauth2.ts) and copies client_id, scopes, endpoints, redirect URIs, PKCE behavior, and state format verbatim with file-and-line citations. - Token storage interchange: Mirrors the on-disk credential JSON shape (e.g., ~/.gemini/oauth_creds.json with millisecond expiry_date) so tokens are readable and writable by both tools. - Headless and SSH support: Implements the manual-code no-browser flow with suspend/resume state, OSC 52 clipboard copy, and rune-wrapped URL display for remote terminals. - Use Case: When asked to "make our Gemini OAuth match gemini-cli," the Skill walks through extracting the exact client ID, three scopes, v1 auth endpoint, and token exchange fields, then guards them with a constants test. ## Quick Start Make our provider OAuth flow match exactly how the official CLI does it, including constants, token storage format, and the headless login flow.