cpa-codex-auth-sweep-cliproxy

通过 CLI Proxy Management API 拉取 Codex 认证文件并高并发探活扫描。适用于「扫号」「清死号」「清理 Codex 401」场景;仅在用户明确确认后可删除 401。执行前必须提供 base_url 与 management_key。安全限制:默认仅允许 https://chatgpt.com 作为 probe 主机,非白名单目标需显式危险确认。

3,891 stars

Best use case

cpa-codex-auth-sweep-cliproxy is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

通过 CLI Proxy Management API 拉取 Codex 认证文件并高并发探活扫描。适用于「扫号」「清死号」「清理 Codex 401」场景;仅在用户明确确认后可删除 401。执行前必须提供 base_url 与 management_key。安全限制:默认仅允许 https://chatgpt.com 作为 probe 主机,非白名单目标需显式危险确认。

Teams using cpa-codex-auth-sweep-cliproxy 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/cpa-codex-auth-sweep-cliproxy/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/bddiudiu/cpa-codex-auth-sweep-cliproxy/SKILL.md"

Manual Installation

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

How cpa-codex-auth-sweep-cliproxy Compares

Feature / Agentcpa-codex-auth-sweep-cliproxyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

通过 CLI Proxy Management API 拉取 Codex 认证文件并高并发探活扫描。适用于「扫号」「清死号」「清理 Codex 401」场景;仅在用户明确确认后可删除 401。执行前必须提供 base_url 与 management_key。安全限制:默认仅允许 https://chatgpt.com 作为 probe 主机,非白名单目标需显式危险确认。

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

# 技能说明

此技能用于:

1. 通过 **CLI Proxy Management API 的认证文件接口** 获取授权(`/v0/management/auth-files`)
2. 使用 **管理端 API Call 能力**(`/v0/management/api-call` + `auth_index + $TOKEN$`)探测每个 Codex 授权状态(对齐 CLI Proxy 的刷新/代理链路)
3. 识别 401/失效凭证并在用户明确要求时清理

## 交互要求(必须)

在每次准备执行扫描前,必须先主动向用户询问并确认:

- `base_url`(CLI Proxy 管理端地址)
- `management_key`(管理密钥)

如果用户未提供这两个参数,禁止开始扫描;应先提示用户补全。

## 安全提示(必须阅读)

本技能通过管理 API 的 `api-call` 发起探测,请求头中使用 `Authorization: Bearer $TOKEN$`。这意味着 **管理端会把真实 token 转发到 `probe-url` 指向的主机**。

因此必须遵守:

1. 默认仅允许 `https://chatgpt.com/...` 作为探测目标。
2. 扫描前必须向用户确认 `probe-url`(若用户改过)。
3. 若要使用非白名单主机,必须得到用户明确授权,并显式传 `--allow-unsafe-probe-host`。
4. 禁止默认使用 `--insecure`;仅在内网排障且用户明确授权时,才可同时传 `--insecure --allow-insecure-tls`。

## 执行入口

```bash
python3 <SKILL目录>/scripts/cliproxy_scanner.py \
  --base-url "<CLI_PROXY_BASE_URL>" \
  --management-key "<MANAGEMENT_KEY>" \
  --output-json
```

常见用法:

```bash
# 只扫描,不删除
python3 <SKILL目录>/scripts/cliproxy_scanner.py \
  --base-url "<CLI_PROXY_BASE_URL>" \
  --management-key "<MANAGEMENT_KEY>" \
  --output-json

# 扫描 + 删除 401(需要明确删除意图)
python3 <SKILL目录>/scripts/cliproxy_scanner.py \
  --base-url "<CLI_PROXY_BASE_URL>" \
  --management-key "<MANAGEMENT_KEY>" \
  --output-json --delete-401 --yes
```

## 必要环境变量(Required)

- `CLIPROXY_BASE_URL`:CLI Proxy API 管理端地址(例:`http://localhost:8317`)
- `CLIPROXY_MANAGEMENT_KEY`:管理密钥(Management Key,主凭据 / primary credential)

> 两者缺一不可。

可选:

- `CLIPROXY_AUTH_FILES_ENDPOINT`:认证文件列表接口(默认:`/v0/management/auth-files`)
- `CLIPROXY_API_CALL_ENDPOINT`:管理 API Call 接口(默认:`/v0/management/api-call`)
- `CLIPROXY_AUTH_DELETE_ENDPOINT`:认证文件删除接口(默认:`/v0/management/auth-files`,通过 `?name=` 删除)
- `CODEX_PROBE_URL`:Codex 探活 URL(默认:`https://chatgpt.com/backend-api/codex/responses`)
- `CLIPROXY_ALLOWED_PROBE_HOSTS`:允许的 probe host 白名单(默认:`chatgpt.com`)
- `SCAN_WORKERS`:并发数(默认:80)

## 判定口径(已对齐)

- 失效:HTTP 401 / invalid auth / revoked
- 额度为 0:**仅指周限额为 0**(weekly/week/周限额 等语义 + quota/limit exhausted)
- 同时输出管理端视角指标:`management_quota_exhausted`(来自 `/auth-files` 的 `unavailable + status_message(quota)`)
- 网络错误、超时、解析错误:不归类为失效或周限额 0

## 执行纪律

- 用户只说“看看/扫一下”时:只扫描,不删除。
- 只有在用户明确表达“删掉/清理/扬了”等意图时,才允许 `--delete-401`。
- 汇报优先给出汇总统计(total / ok / 401 / exceeded / error)。
- 执行时必须开启 `--progress` 并持续反馈进度:
  1) 开始执行
  2) 已获取 auth file 总数
  3) 校验过程中按 `--progress-every`(默认 10)输出“第 N 条 / 共 M 条”直到完成

Related Skills

authenticate-wallet

3891
from openclaw/skills

Sign in to AgnicPay wallet via browser-based OAuth. Use when you or the user want to authenticate, sign in, log in, connect wallet, or set up the CLI. Covers phrases like "sign in", "log in", "authenticate", "connect my wallet", "set up agnic".

Web3 & Fintech

pentest-auth-bypass

3891
from openclaw/skills

Test authentication and session management controls for bypass and account takeover scenarios.

Security

cliproxy-media

3891
from openclaw/skills

Analyze images (jpg, png, gif, webp) and PDFs via CLIProxyAPI — a Claude Max proxy that routes requests through your subscription at zero extra cost. Use this skill whenever you need to analyze, describe, or extract information from an image or photo ("analyze image", "describe photo", "what is in this picture"), read or summarize a PDF document ("read PDF", "summary of this document"), or process any media file via a CLIProxy-compatible endpoint ("process media via proxy", "cliproxy vision", "cliproxy media"). NEVER use the built-in `image` or `pdf` tools when using CLIProxyAPI — they fall back to direct Anthropic API which requires separate credits. Use this skill instead for all vision and document analysis tasks.

cliproxy-openclaw

3891
from openclaw/skills

Deploy and configure CLIProxyAPI, expose its dashboard safely, connect OAuth providers like Claude Code, Gemini, Codex, Qwen, and iFlow, generate a reusable API endpoint and API key, and integrate it with OpenClaw or other OpenAI-compatible tools. Use when the user wants one API layer from subscription-based CLI or OAuth accounts, multi-account routing, or CLIProxy setup on a VPS or local machine.

Twenty CRM OAuth Mastery Skill

3891
from openclaw/skills

**Author**: Generated from extensive OAuth debugging sessions in OpenCode

Authensor Gateway

3891
from openclaw/skills

Fail-safe policy gate for OpenClaw marketplace skills. Intercepts tool calls before execution and checks them against your Authensor policy. Low-risk actions run automatically. High-risk actions require your approval. Dangerous actions are blocked. Only action metadata is sent to the control plane — never your files, API keys, or conversation content.

authenticate-openant

3891
from openclaw/skills

Sign in to OpenAnt. Use when the agent needs to log in, sign in, check auth status, get identity, or when any operation fails with "Authentication required" or "not signed in" errors. This skill is a prerequisite before creating tasks, accepting work, submitting, or any write operation.

xhs-auth

3891
from openclaw/skills

小红书认证管理技能。检查登录状态、登录(二维码或手机号)、多账号管理。 当用户要求登录小红书、检查登录状态、切换账号时触发。

openai-auth-switcher-public

3891
from openclaw/skills

Web-first, publishable OpenClaw skill for OpenAI OAuth account switching. Use when you need a reusable public-track workflow for first-run takeover, environment discovery, doctor checks, runtime inspection, slot management, dry-run validation, controlled switch experiments, rollback planning, and release-safe packaging without bundling live auth snapshots, logs, callbacks, or other machine-specific runtime data.

secretcodex

3891
from openclaw/skills

Generate creative code names and encode/decode secret messages using classic and sophisticated ciphers. Blends nostalgic decoder ring fun with modern cryptographic techniques. Includes Caesar, Vigenère, Polybius, Rail Fence, and hybrid methods. Provides keys for secure message sharing between trusted parties.

selfhelp-author

3891
from openclaw/skills

Transform any topic into a polished, New York Times bestselling-quality self-help book chapter, outline, or full manuscript. Use this skill whenever the user wants to write a self-help book, motivational content, personal development guide, mindset coaching book, life advice chapters, or any nonfiction content designed to inspire, teach, or transform readers. Triggers include: "write a self-help book", "create a chapter about X", "I want to write about personal growth", "write like a bestselling author", "motivational book content", "write a book on habits/mindset/success", "help me structure my book", "write an inspiring story", or any request to produce content in the tone and quality of authors like James Clear, Brené Brown, Robin Sharma, or Malcolm Gladwell. Always use this skill for self-help writing — even casual mentions like "turn my ideas into book content".

codex-cli

3891
from openclaw/skills

Use OpenAI Codex CLI for coding tasks. Triggers: codex, code review, fix CI, refactor code, implement feature, coding agent, gpt-5-codex. Enables Clawdbot to delegate coding work to Codex CLI as a subagent or direct tool.