Opencode Anthropic Oauth
Description
OpenCode plugin for Anthropic Claude Pro/Max OAuth login — no Claude Code needed.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
opencode-anthropic-oauth
OpenCode plugin for Anthropic Claude Pro/Max OAuth login — no Claude Code needed.
What it does
Lets you authenticate with your Claude Pro/Max subscription directly in OpenCode via browser OAuth. No need to install Claude Code or manage credentials files.
Installation
npm install -g opencode-anthropic-oauth
Then add to your `opencode.json`:
{
"plugin": ["opencode-anthropic-oauth"]
}
Usage
- Run
/connectin OpenCode (oroc auth loginfrom CLI) - Select Anthropic > Claude Pro/Max
- Open the link in your browser and authorize
- Paste the code back into OpenCode
- Done — all Anthropic models are now available
How it works
- Implements the OAuth PKCE flow directly against Anthropic's auth endpoints
- Opens your browser for authentication — you log in with your Claude account
- Exchanges the authorization code for access + refresh tokens
- Auto-refreshes tokens when they expire — no manual re-auth needed
- Sets the required API headers on Anthropic requests
- Preserves prompt caching for efficient token usage
Changelog
0.4.1
- Fixed high token consumption — removed
cache_controlstripping that was disabling prompt caching - Added
x-anthropic-billing-headerfor proper token tracking - Aligned beta flags with official Claude CLI plugin
0.4.0
- Added
?beta=trueURL parameter for OAuth compatibility - Injected system identity prefix for claude-code beta
- Stripped
cache_control(now removed in 0.4.1)
0.3.0
- Added auto token refresh via loader hook
- Background proactive refresh timer (5min intervals)
Environment variable overrides
All OAuth parameters can be overridden via environment variables. If Anthropic changes something before we publish an update, set an env var and keep working:
| Variable | Description |
|---|---|
ANTHROPIC_CLIENT_ID |
OAuth client ID |
ANTHROPIC_CLI_VERSION |
Claude CLI version for User-Agent |
| `ANTHROPI |
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11