ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

Opencode Claude Auth

Skill by adisinghstudent

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/adisinghstudent/opencode-claude-auth
Or

What This Skill Does

The Opencode Claude Auth skill acts as a seamless authentication bridge between the Claude Code CLI and the OpenCode environment. Rather than requiring users to generate and manage separate API keys for their Anthropic-powered agents, this skill enables OpenCode to securely leverage your existing, authorized Claude Pro credentials. By tapping into your local machine's keychain on macOS or reading the .claude/.credentials.json file on Linux and Windows, it allows for a unified workflow. The plugin handles token management, auto-refreshes tokens as they near expiration, and manages the complex header requirements for Anthropic API communication, including tool name translation and stream buffering.

Installation

To install this skill, run the following command in your terminal: clawhub install openclaw/skills/skills/adisinghstudent/opencode-claude-auth. Once installed, add the plugin to your opencode.json configuration file by including "plugin": ["opencode-claude-auth"]. Ensure that you have already successfully initialized the Claude Code CLI at least once on your machine, as the plugin relies on these pre-existing credentials. For automated setup, you can also instruct your agent to fetch the installation guide directly from the official repository.

Use Cases

This skill is ideal for power users who already maintain a Claude Pro subscription and want to utilize those same capabilities within the OpenCode ecosystem without managing multiple billing sources or API keys. It is particularly useful for developers working in environments where they want to minimize overhead and streamline the authentication handshake. It also serves as a critical utility for those who prefer to keep all their AI interaction logs and billing tied to their main Claude account rather than individual per-key billing metrics.

Example Prompts

  1. "Check if my Claude Code authentication is active and ready for use within OpenCode."
  2. "Configure the OpenCode auth plugin to use my existing Claude credentials so I don't need a separate API key."
  3. "Refresh my current Anthropic session using the opencode-claude-auth plugin and verify the connection status."

Tips & Limitations

  • Security: Since this plugin accesses your local credentials store, ensure your environment is secure.
  • Platform Compatibility: This works natively on macOS (Keychain), Linux, and Windows, provided the standard ~/.claude directory is present.
  • Maintenance: If Anthropic updates their API, you may need to override the ANTHROPIC_CLI_VERSION environment variable to ensure compatibility until a formal update is released.
  • Token TTL: The plugin caches tokens for 30 seconds; avoid manually modifying the cache files while an active agent session is running.

Metadata

Stars3809
Views1
Updated2026-04-05
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-adisinghstudent-opencode-claude-auth": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#anthropic#authentication#developer-tools#claude-code
Safety Score: 4/5

Flags: file-read, external-api