Chat2claude — Development skill for Claude Code
Lightweight local ChatGPT/Codex account-session adapter for Claude Code and OpenAI-compatible clients.
How to install Chat2claude
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mingzitaichangduozaishuhoumian/chat2claude and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Chat2claude does
Lightweight local ChatGPT/Codex account-session adapter for Claude Code and OpenAI-compatible clients.
Alternatives in Development
- Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
- Notebook Intelligence — A JupyterLab extension supporting Claude Code, Copilot, Ollama, and OpenAI-compatible LLMs, with MCP, skills 331 ★
- Claude Code API — OpenAI-compatible API gateway for Claude Code CLI 300 ★
README
chatgpt-to-claude
**中文** | [English](README.en.md)
`chatgpt-to-claude` 是一个 TypeScript + Hono 实现的本地兼容层:对外提供 Claude Messages、OpenAI Chat Completions、OpenAI Responses、Models API 等接口,对内连接 mock backend 或真实 ChatGPT/Codex session backend。
本项目面向使用本人控制或已获明确授权的 ChatGPT/Codex 账号的个人本地/私有场景。它不是订阅聚合、流量转售、多租户共享网关或公共代理服务;不要把个人订阅流量公开转售,或面向不特定第三方大规模共享。
我们的项目不一样在哪里
`chatgpt-to-claude` 的定位很明确:它是一个 **本地轻量的 ChatGPT/Codex 到 Claude/OpenAI 兼容 API 适配器**。它把你本机可控的 ChatGPT/Codex 账号会话整理成 Claude Code、Anthropic SDK、OpenAI SDK 以及 OpenAI 兼容客户端能直接使用的接口。
它不是大型 all-in-one 代理网关,也不追求成为“最大、最全”的代理 hub。它选择的是另一条路线:默认跑在个人电脑或私有环境里,默认监听 `127.0.0.1`,用尽量少的运维负担解决本地开发和个人工具接入问题。
它解决的是这类实际问题:
- 你有自己控制或已获授权的 ChatGPT/Codex 账号,但常用客户端只认识 Claude 或 OpenAI 风格 API。
- 你希望 Claude Code、Anthropic SDK、OpenAI SDK、Continue、Cherry Studio 等客户端共用同一个本地服务。
- 你不想把 OAuth、token、cookie、模型发现、alias 绑定和 Runtime API Key 分散塞进不同工具配置里。
- 你需要一个本机
/admin集中完成授权、模型发现、alias 绑定和 Runtime API Key 创建,而不是维护一套重型网关基础设施。
设计取舍:
- 本地/个人使用优先:默认监听
127.0.0.1,默认面向个人机器或私有网络;不面向公共代理、订阅转售、流量聚合或多租户计费场景。 - 轻量运维:推荐路径是 Node.js + pnpm + 本机
/admin。不要求数据库、Redis、Kubernetes、服务网格或重型 API gateway 才能启动。 - 配置集中在
/admin:账号 OAuth、模型 discovery、alias 绑定、Runtime API Key 创建和基础诊断都集中在本地管理台完成,减少手改配置和跨工具复制 secret。 - 客户端友好:一个本地服务同时提供 Claude Messages、OpenAI Chat Completions、OpenAI Responses 和 Models API,方便 Claude Code、Anthropic SDK、OpenAI SDK 以及 OpenAI 兼容客户端接入。
- 轻量不等于玩具:项目仍保留 OAuth/session 维护、模型 alias、Runtime/Admin key 分离、流式状态追踪、请求终态统计和安全日志边界。
- 权限边界清楚:Runtime API Key 只给普通客户端调用
/v1/*;Admin API Key /API_KEYS才用于管理账号和全局诊断,受保护 Admin API 会拒绝 Runtime Key。 - 日志可排障但不泄密:记录请求耗时、stream 终态、events/bytes、错误分类和安全诊断;不记录 prompt、工具参数/结果、原始 provider payload、Authorization、cookie、token 或代理凭据。
一句话:它不是要把所有代理能力都塞进一个大平台,而是把 **个人 ChatGPT/Codex 账号会话** 稳定、清晰、低负担地适配成本机 Claude/OpenAI 兼容 API。
快速开始
Windows:
start.bat
Git Bash、Linux 或 macOS:
./start.sh
手动安装、检查并启动:
corepack pnpm setup
corepack pnpm check
corepack pnpm start
Related Skills
Paperclip Adapter Hermes Local Plus
Drop-in replacement for Paperclip's built-in hermes_local adapter — production-grade Hermes Agent integration
Agrout Bridge
Local HTTP proxy that routes OpenAI-/Anthropic-compatible clients (OpenCode, Claude Desktop, Cursor) through A
Codebuddy2api
Proxy CodeBuddy with OpenAI-compatible and Anthropic-compatible APIs for Codex, Claude Code, and standard SDK
QuotaBar
A lightweight macOS menu bar app that shows your Claude and OpenAI (Codex) usage limits at a glance — multi-ac
Pvc Img Gen Codex
Claude Code skill that makes and edits real images through the Codex CLI from the OpenAI ChatGPT VS Code exten
Deepseek Web Bridge
Local OpenAI-compatible API bridge for an authenticated DeepSeek web session, with a native macOS manager and
Related Agents
Codex CLI
Codex CLI → any OpenAI-compatible endpoint
Lmstudio Local
A locally-hosted model served through LM Studio's OpenAI-compatible API,
CLI Subagents Codex
Runs a task in OpenAI Codex (codex exec) on one of the user's ChatGPT accounts (CLI Subagents). The worker rea