SkillsLLM
CategoriesBlogAI NewsAbout
HomeIDE Extensionsopencode-claude-auth

opencode-claude-auth

by griffinmartin

Pending

OpenCode plugin that uses your existing Claude Code credentials — no separate login needed

346stars
31forks
TypeScript
Added 3/23/2026
View on GitHubDownload ZIP
IDE Extensionsaianthropicauthenticationclaudeclaude-code
Installation
# Add to your Claude Code skills
git clone https://github.com/griffinmartin/opencode-claude-auth
README.md

opencode-claude-auth

npm Homebrew CI Socket Badge

Self-contained Anthropic auth provider for OpenCode using your Claude Code credentials — no separate login or API key needed.

How it works

The plugin registers its own auth provider with a custom fetch handler that intercepts all Anthropic API requests. It reads OAuth tokens from the macOS Keychain (or ~/.claude/.credentials.json on other platforms), caches them in memory with a 30-second TTL, and handles the full request lifecycle — no builtin Anthropic auth plugin required.

It also syncs credentials to OpenCode's auth.json as a fallback (on Windows, it writes to both %USERPROFILE%\.local\share\opencode\auth.json and %LOCALAPPDATA%\opencode\auth.json to cover all installation methods). If a token is near expiry, it runs the Claude CLI to trigger a refresh. Background re-sync runs every 5 minutes.

Prerequisites

  • Claude Code installed and authenticated (run claude at least once)
  • OpenCode installed

macOS is preferred (uses Keychain). Linux and Windows work via the credentials file fallback.

Installation

Install with AI

Comments (0)
to leave a comment.

No comments yet. Be the first to share your thoughts!

Related Skills

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
180,571
homebrew
nodejs
oauth
opencode
opencode-plugin
typescript

Paste this into your AI agent (Claude Code, Cursor, Copilot, etc.):

Fetch https://raw.githubusercontent.com/griffinmartin/opencode-claude-auth/main/installation.md and follow every step exactly as written.

Install with Homebrew (macOS)

brew tap griffinmartin/opencode-claude-auth https://github.com/griffinmartin/opencode-claude-auth.git
brew install opencode-claude-auth

Then add to the plugin array in your opencode.json:

{
  "plugin": ["opencode-claude-auth"]
}

Manual install

npm install -g opencode-claude-auth

Then add to the plugin array in your opencode.json:

{
  "plugin": ["opencode-claude-auth"]
}

Usage

Just run OpenCode. The plugin handles auth automatically — it reads your Claude Code credentials, provides them to the Anthropic API, and refreshes them in the background. If your credentials aren't OAuth-based, the plugin falls through to standard API key auth.

Supported models

15 supported models. Run pnpm run test:models to verify against your account.

| Model | | -------------------------- | | claude-3-haiku-20240307 | | claude-haiku-4-5 | | claude-haiku-4-5-20251001 | | claude-opus-4-0 | | claude-opus-4-1 | | claude-opus-4-1-20250805 | | c...

56,062
TypeScript
MCP Serversaiapis
View details
everything-claude-code

by affaan-m

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
98,866
12,893
JavaScript
AI Agentsai-agentsanthropic
View details
gemini-cli

by google-gemini

An open-source AI agent that brings the power of Gemini directly into your terminal.
98,727
12,533
TypeScript
AI Agentsaiai-agents
View details
TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
49,573
22,760
Python
MCP Serversaibark
View details
ui-ux-pro-max-skill

by nextlevelbuilder

An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
48,264
4,692
Python
CLI Toolsai-skillsantigravity
View details
awesome-claude-skills

by ComposioHQ

A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows
47,003
4,821
Python
AI Agentsagent-skillsai-agents
View details