openclaw-codex-oauth-proxy

OpenClaw 用 openai-codex(ChatGPT OAuth)跑 GPT-5.x Codex/Spark 的配置与排障(网关进程、代理、模型、thinking、JSON 输出)。

16 stars

Best use case

openclaw-codex-oauth-proxy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

OpenClaw 用 openai-codex(ChatGPT OAuth)跑 GPT-5.x Codex/Spark 的配置与排障(网关进程、代理、模型、thinking、JSON 输出)。

Teams using openclaw-codex-oauth-proxy should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openclaw-codex-oauth-proxy/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/testing-security/openclaw-codex-oauth-proxy/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openclaw-codex-oauth-proxy/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openclaw-codex-oauth-proxy Compares

Feature / Agentopenclaw-codex-oauth-proxyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

OpenClaw 用 openai-codex(ChatGPT OAuth)跑 GPT-5.x Codex/Spark 的配置与排障(网关进程、代理、模型、thinking、JSON 输出)。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# openclaw-codex-oauth-proxy

## 0) 先确认你走的是 `openai-codex`(不是 API Key 的 `openai`)

```bash
openclaw models status --plain
openclaw models status --probe --probe-provider openai-codex --json
```

看 `status=ok`,并且 provider 是 `openai-codex`。

## 1) “能登录 OAuth,但模型不可用”的常见根因:`api.openai.com` 网络不通

ChatGPT OAuth 的登录主要走 `auth.openai.com`,但模型调用通常仍需要连 `api.openai.com`。

用 **同一台机器**验证(期望返回 `401`,不是超时):

```bash
curl -m 8 -I https://api.openai.com/v1/models
```

如果直连超时,但加代理能通:

```bash
curl -m 8 --proxy http://127.0.0.1:7897 -I https://api.openai.com/v1/models
```

那就要让 **Gateway 常驻进程**也走代理(见下一节)。

## 2) 关键点:Gateway 是常驻服务,不会继承你终端里的代理环境变量

你在终端里能 `curl --proxy ...` 不代表 `openclaw-gateway` 进程也能出网。

把代理写进 `~/.openclaw/openclaw.json` 的 `env.vars`,然后重启网关:

```bash
openclaw config set env.vars.HTTPS_PROXY "http://127.0.0.1:7897"
openclaw config set env.vars.HTTP_PROXY "http://127.0.0.1:7897"
openclaw config set env.vars.ALL_PROXY "http://127.0.0.1:7897"
openclaw config set env.vars.NO_PROXY "127.0.0.1,localhost"

openclaw gateway restart
openclaw gateway status
```

如果没装服务:

```bash
openclaw gateway install
openclaw gateway restart
```

端口冲突/旧进程残留时,用:

```bash
openclaw gateway --force
```

## 3) 设置默认模型 + thinking(例如默认 `medium`)

```bash
openclaw models set openai-codex/gpt-5.3-codex
openclaw config set agents.defaults.thinkingDefault medium
```

切 Spark(如果 models list 里能看到):

```bash
openclaw models set openai-codex/gpt-5.3-codex-spark
```

验证实际生效的模型(看输出里的 `agentMeta.model`):

```bash
openclaw agent --agent main -m "ping" --thinking minimal --json
```

## 4) CLI `--json` 输出前面夹杂插件日志,别直接管道给 `jq`

有些命令会先打印类似 `[plugins] ...`,导致:

- `jq` 解析失败
- 甚至触发 Node CLI `EPIPE`(broken pipe)

稳妥写法:先落盘,再从第一个 `{` 截 JSON。

```bash
openclaw sessions --json > /tmp/sessions.json
python3 - <<'PY'
import json
raw=open("/tmp/sessions.json","r",encoding="utf-8",errors="replace").read()
raw=raw[raw.find("{"):]
print(json.loads(raw).keys())
PY
```

Related Skills

openclaw-memory

16
from diegosouzapw/awesome-omni-skill

Production-grade memory management for OpenClaw. Search, compress, encrypt, authenticate, rate limit, and audit OpenClaw memory (MEMORY.md, AGENTS.md, memory/) with enterprise-grade security.

oauth-platform-integration

16
from diegosouzapw/awesome-omni-skill

Add new OAuth platform connectors to Twin Me Soul Signature Platform. Use when the user wants to integrate a new platform (Spotify, Netflix, LinkedIn, TikTok, etc.) for soul signature data extraction.

oauth-2-0-setup

16
from diegosouzapw/awesome-omni-skill

Implement OAuth 2.0 authentication flows including authorization code with PKCE, client credentials, and device code for secure API integration.

doc-coauthoring

16
from diegosouzapw/awesome-omni-skill

Guia os usuários através de um fluxo de trabalho estruturado para coautoria de documentação. Use quando o usuário quiser escrever documentação, propostas, especificações técnicas, documentos de decisão ou conteúdo estruturado semelhante. Este fluxo de trabalho ajuda os usuários a transferir contexto de forma eficiente, refinar o conteúdo através de iteração e verificar se o documento funciona para os leitores. Acione quando o usuário mencionar escrever documentos, criar propostas, redigir especificações ou tarefas de documentação semelhantes.

anthropic-doc-coauthoring

16
from diegosouzapw/awesome-omni-skill

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

openclaw-docs-sync

16
from diegosouzapw/awesome-omni-skill

Sync OpenClaw + ClawHub + Skills docs into a local mirror for the QMD memory backend.

codex-delegator-skill

16
from diegosouzapw/awesome-omni-skill

Delegate complex tasks to Codex with structured prompts, tmux sessions, and logging utilities.

youtube-music-openclaw

16
from diegosouzapw/awesome-omni-skill

Control YouTube Music with natural language - search, play, pause, skip, volume, shuffle

openclaw-sentry-pro

16
from diegosouzapw/awesome-omni-skill

Full secret scanning suite: detect leaked API keys, tokens, and credentials, then automatically redact, quarantine exposed files, and enforce .gitignore policies. Everything in openclaw-sentry (free) plus automated countermeasures.

gainforest-oauth-setup

16
from diegosouzapw/awesome-omni-skill

Implement ATProto OAuth authentication in a Next.js App Router application using gainforest-sdk-nextjs. Use when adding login, logout, session management, or authentication flows that integrate with GainForest, Hypercerts, or ATProto PDSes (climateai.org, gainforest.id).

codexer

16
from diegosouzapw/awesome-omni-skill

Advanced Python research assistant with Context 7 MCP integration, focusing on speed, reliability, and 10+ years of software development expertise

codex-web-search

16
from diegosouzapw/awesome-omni-skill

Codex CLI 環境内で Gemini CLI を使用した Web 検索を実行。技術情報、最新ニュース、一般的なリサーチに対応。Use when user asks to search the web, look up information, find recent news, or research a topic within Codex CLI. Also use when user says 調べて, 検索して, 最新情報, ニュース, リサーチ.