← 返回 Skills 市场
earlvanze

oauth-coder-bridge

作者 Earl Co · GitHub ↗ · v1.3.0 · MIT-0
cross-platform ✓ 安全检测通过
120
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install oauth-coder-bridge
功能描述
Routes OpenClaw Anthropic API calls through oauth-coder (Claude CLI with OAuth), no API key needed.
使用说明 (SKILL.md)

oauth-coder-bridge

Local HTTP bridge: OpenClaw → oauth-coder → real claude CLI (OAuth tokens, no API key).

Upstream: codeninja/oauth-cli-coder

Prerequisites

  • oauth-coder installed and authenticated (claude login)
  • Binary on PATH or set OAUTH_CODER_BIN

Install & Run

bash scripts/setup.sh              # copies bridge, adds claude-cli provider to openclaw.json
python3 ~/.openclaw/scripts/oauth-coder-bridge.py &
# Or: systemctl --user enable --now oauth-coder-bridge

Verify

curl http://127.0.0.1:8787/health  # → {"status":"ok"}
openclaw models set claude         # use alias
openclaw models set claude-cli/claude-opus-4-6  # or full path

Models

Opus: claude-opus-4-6, claude-opus-4-5, claude-opus-4-1, claude-opus-4-0 Sonnet: claude-sonnet-4-6, claude-sonnet-4-5, claude-sonnet-4-0, claude-3-7-sonnet-latest, claude-3-5-sonnet-latest Haiku: claude-haiku-4-5, claude-3-5-haiku-latest

All prefixed with claude-cli/ (e.g. claude-cli/claude-opus-4-6).

How It Works

OpenClaw → HTTP :8787 → oauth-coder-bridge → oauth-coder → claude CLI

Bridge translates Anthropic-messages JSON → oauth-coder ask claude ... subprocess calls.

Config (env vars)

Variable Default Description
OAUTH_CODER_BIN $HOME/bin/oauth-coder Path to binary
OAUTH_CODER_BRIDGE_PORT 8787 Listen port
OAUTH_CODER_BRIDGE_HOST 127.0.0.1 Bind address
OAUTH_CODER_BRIDGE_TIMEOUT 300 Request timeout (s)
OAUTH_CODER_BRIDGE_MAX_PROMPT 100000 Max prompt length
OAUTH_CODER_BRIDGE_LOG_FILE (empty) Log file (stderr only if unset)

Security

  • Binds localhost only
  • Rate limited: 30 req/min per IP
  • Prompts pass through to claude CLI subprocess
  • If LOG_FILE is set, prompts/responses may be logged locally

Troubleshooting

curl http://127.0.0.1:8787/health    # check bridge
which oauth-coder                     # check binary
claude login                          # re-auth
oauth-coder stop-all                  # clear stuck sessions

Files

  • scripts/oauth-coder-bridge.py — bridge server
  • scripts/setup.sh — installer
  • scripts/update-openclaw-config.py — config updater
  • references/oauth-coder-bridge.service — systemd template

MIT License

安全使用建议
This skill is functionally coherent with its description, but review these points before installing: - Ensure you trust and have oauth-coder and the claude CLI installed and authenticated locally (run 'claude login' yourself). The bridge will use those local OAuth tokens to answer requests — this gives OpenClaw access to use your authenticated CLI session. - Back up ~/.openclaw/openclaw.json before running the setup script: scripts/update-openclaw-config.py will modify that file and add a 'claude-cli' provider. Confirm the exact changes match your expectations. - Inspect the included scripts (oauth-coder-bridge.py, setup.sh, update-openclaw-config.py) yourself. The bridge runs oauth-coder as a subprocess (subprocess.run) and will execute whatever the oauth-coder binary does — trust in that binary is required. - Be aware prompts/responses may be written to a log file if you set OAUTH_CODER_BRIDGE_LOG_FILE; by default logging goes to stderr. If you are handling sensitive prompts, avoid enabling persistent logging or ensure log file permissions are secure. - The registry metadata omits the required oauth-coder dependency and environment variables documented in SKILL.md; treat that as an authoring oversight and verify prerequisites before install. If you are uncertain about trusting the oauth-coder/claude CLI or do not want OpenClaw to be able to use your local OAuth session, do not install or run the bridge.
功能分析
Type: OpenClaw Skill Name: oauth-coder-bridge Version: 1.3.0 The oauth-coder-bridge skill provides a local HTTP server that acts as a proxy between OpenClaw and the oauth-coder CLI tool. The core logic in scripts/oauth-coder-bridge.py translates Anthropic-style API requests into subprocess calls, including features like rate limiting, localhost binding, and basic prompt sanitization to prevent injection. The installation scripts (setup.sh and update-openclaw-config.py) perform standard configuration tasks such as copying files and updating the OpenClaw provider settings, with no evidence of data exfiltration, obfuscation, or malicious intent.
能力标签
cryptorequires-oauth-token
能力评估
Purpose & Capability
The skill's code, README, and SKILL.md all implement a local HTTP bridge that translates Anthropic messages to oauth-coder CLI calls to the claude binary — this matches the name/description. However, the registry metadata declared no required binaries/env vars while the script requires a local 'oauth-coder' binary (or OAUTH_CODER_BIN) to exist; that metadata omission is an inconsistency users should be aware of. The setup script also updates the user's OpenClaw config (~/.openclaw/openclaw.json) which is consistent with enabling the bridge but is a side effect that requires write access to user config.
Instruction Scope
The SKILL.md and included scripts stay within the bridge's scope: install the bridge script to ~/.openclaw/scripts, update the OpenClaw provider config to point at localhost:8787, and run a local HTTP server. The bridge accepts /v1/messages and runs oauth-coder as a subprocess to produce completions. The instructions do modify the user's OpenClaw config and suggest systemd enablement if desired; both are expected for this kind of integration. The documentation warns that prompts/responses can be logged if LOG_FILE is set.
Install Mechanism
There is no external download step in the included setup.sh — it copies the provided bridge script into ~/.openclaw/scripts and runs a local Python updater to modify openclaw.json. That is low-risk compared to remote installs. The package does not pull code from untrusted URLs during install.
Credentials
The skill does not request external API keys via registry metadata, but it requires an already-authenticated oauth-coder/claude CLI on the host. That means the bridge will cause OpenClaw requests to be fulfilled using the user's local OAuth tokens/session managed by oauth-coder/claude — this is proportional to the stated purpose but is sensitive (local credentials/tokens are used). The bridge may also log prompts/responses if LOG_FILE is set. Also, environment variables used by the code (OAUTH_CODER_BIN, OAUTH_CODER_BRIDGE_PORT, etc.) are documented in SKILL.md but not declared in registry metadata — another discrepancy.
Persistence & Privilege
The skill does install a script under ~/.openclaw/scripts and updates ~/.openclaw/openclaw.json to add a new provider. This is expected to expose the bridge to OpenClaw but it is not 'always: true' and does not force persistent installation by itself. The README/SKILL.md also suggest an optional systemd unit for auto-start; enabling that would increase persistence but is user-controlled.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install oauth-coder-bridge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /oauth-coder-bridge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.3.0
Added all current Anthropic models: 4 Opus, 5 Sonnet, 2 Haiku (11 total). Updated bridge model map and config updater.
v1.2.1
Shorter SKILL.md prompt for lower token overhead
v1.2.0
Fixed: hard-coded paths replaced with auto-detection, provider renamed to claude-cli, security docs added, homepage URL corrected. No more /home/umbrel hardcoded paths. OAUTH_CODER_BIN now auto-detects from $HOME/bin/oauth-coder.
v1.1.0
Hardened v1.1: rate limiting, request size limits, JSON depth validation, input sanitization, threaded server, signal handling, structured logging, /health, /ready, /metrics endpoints
v1.0.0
Initial release: Enable Claude Code usage in OpenClaw via official CLI without direct API access. - Provides a local HTTP server that routes Anthropic-formatted API calls to the `oauth-coder` CLI. - Transparently translates requests/responses between Anthropic API and the CLI interface. - Supports multiple Claude models via aliases and standard OpenClaw model routing. - Seamless integration: No changes needed to existing OpenClaw workflows. - Includes health check endpoint and troubleshooting guidance.
元数据
Slug oauth-coder-bridge
版本 1.3.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 5
常见问题

oauth-coder-bridge 是什么?

Routes OpenClaw Anthropic API calls through oauth-coder (Claude CLI with OAuth), no API key needed. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。

如何安装 oauth-coder-bridge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install oauth-coder-bridge」即可一键安装,无需额外配置。

oauth-coder-bridge 是免费的吗?

是的,oauth-coder-bridge 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

oauth-coder-bridge 支持哪些平台?

oauth-coder-bridge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 oauth-coder-bridge?

由 Earl Co(@earlvanze)开发并维护,当前版本 v1.3.0。

💬 留言讨论