Claude Skill
zacdcook/openclaw-billing-proxy
OpenClaw Billing Proxy is a JavaScript tool that routes OpenClaw API requests through Claude Code subscription billing, avoiding extra usage charges. Save costs with seamless integration.
Overview
Repository
Install this Skill
npm install -g @anthropic-ai/claude-codeRegistry
npm install -g @anthropic-ai/claude-codegit clone https://github.com/zacdcook/openclaw-billing-proxy
Summary
A lightweight JavaScript proxy that routes OpenClaw API requests through Claude Code subscription billing, helping users avoid extra usage charges by leveraging their existing Claude Code subscription.
将OpenClaw API请求通过Claude Code订阅计费路由,而非额外使用计费。
Key features
- Routes OpenClaw API requests through Claude Code subscription billing
- Eliminates extra usage charges for OpenClaw API calls
- Lightweight JavaScript implementation for easy deployment
- Seamless integration with existing Claude Code subscription
- Simple proxy setup to redirect API traffic
Use cases
- Developers using OpenClaw API who want to reduce costs
- Teams with Claude Code subscriptions looking to optimize billing
- Integrating OpenClaw API in projects without incurring extra fees
- Cost-effective API routing for Claude Code subscribers
- Simplifying billing management for OpenClaw API users
README excerpt
# OpenClaw Subscription Billing Proxy Route your OpenClaw API requests through your Claude Max/Pro subscription instead of Extra Usage billing. ## What This Does After Anthropic revoked subscription billing for third-party tools (April 4, 2026), OpenClaw requests are billed to Extra Usage. This proxy sits between OpenClaw and the Anthropic API, injecting Claude Code's billing identifier so requests use your existing subscription. **Zero cost increase. Full OpenClaw functionality. No code changes to OpenClaw.** ## How It Works The proxy performs 7-layer bidirectional request/response processing to defeat Anthropic's multi-layer detection: **Outbound (request to API):** 1. **Billing Header** -- Injects an 84-character Claude Code billing identifier into the system prompt 2. **Token Swap** -- Replaces OpenClaw's auth token with your Claude Code OAuth token 3. **String Sanitization** -- Replaces 30 trigger phrases (OpenClaw, sessions_*, HEARTBEAT, etc.) 4. **Tool Name Bypass** -- Renames all 29 OpenClaw tool names to PascalCase Claude Code convention (e.g., `exec` -> `Bash`, `lcm_grep` -> `ContextGrep`) throughout the entire body 5. **System Template Bypass** -- Strips ~28K of structured config sections and replaces with a ~0.5K natural prose paraphrase 6. **Tool Description Stripping** -- Removes tool descriptions to reduce fingerprint signal 7. **Property Renaming** -- Renames OC-specific schema properties (e.g., `session_id` -> `thread_id`) **Inbound (response to OpenClaw):** 8. **Full Reverse Mapping** -- Restores ALL original tool names, property names, file paths, and identifiers in both SSE streaming chunks and JSON responses This ensures Anthropic sees what looks like a Claude Code session while OpenClaw sees its original tool names, paths, and identifiers.
Topics
No topics yet.