← 返回 Skills 市场
ugurinanc12

Codex Profile Failover

作者 UgurInanc · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
115
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install codex-profile-failover
功能描述
OpenClaw içinde birden fazla openai-codex OAuth profili varken otomatik ve manuel profil taklası sağlar. Aktif profilin kalan kullanım oranı yüzde 10 gibi bi...
使用说明 (SKILL.md)

Codex Profile Failover

Bu skill, OpenClaw auth profilleri üstüne hafif bir Codex profil takla katmanı ekler.

Bu skill ne sağlar

  • Aktif profili canlı usage ile izleyen watchdog
  • Cron veya tek seferlik kullanım için threshold guard
  • Operatörün elle çalıştırabileceği manuel tetikleme scripti
  • Session için doğrudan authProfileOverride yazan helper
  • Genel amaçlı config şablonları ve kurulum notları

Temel davranış

Bir profil şu koşullardan biri varsa değiştirilmeye aday sayılır:

  • efektif kalan kullanım oranı eşik değerin altına düşmüşse
  • usage kontrolü auth veya transport hatası döndürüyorsa ve switchOnUsageError açıksa
  • token yerelde eksik veya süresi geçmiş görünüyorsa

Geçişte, eşik üstünde kalan en sağlıklı alternatif profil tercih edilir. Tüm adaylarda canlı usage okunamıyorsa, yerelde hâlâ geçerli görünen token için sınırlı bir fallback uygulanabilir.

Dahili scriptler

  • scripts/codex_profile_runtime.py auth profile okuma ve canlı usage yardımcıları
  • scripts/codex_profile_watchdog.py uzun süreli arka plan watchdog
  • scripts/codex_profile_threshold_guard.py tek seferlik eşik kontrolü
  • scripts/assign_codex_profile_to_session.py session authProfileOverride alanını yazar
  • scripts/trigger_profile_failover.py operatör için manuel takla tetikleyicisi
  • scripts/install_codex_profile_failover.py hedef workspace içine generic config yazar

Hızlı başlangıç

  1. references/setup.md dosyasını oku.
  2. Installer helper'ı çalıştır veya örnek configleri elle kopyala.
  3. Önce dry-run ile kontrol et.
  4. Sonra bir kez apply ile gerçek geçiş dene.
  5. Her şey doğruysa watchdog'u arka planda başlat.

Önerilen kurulum akışı

Configleri yaz

python3 scripts/install_codex_profile_failover.py --workspace /path/to/workspace --session-key agent:main:main

Dry-run kontrolü

python3 scripts/codex_profile_threshold_guard.py --config /path/to/workspace/config/codex-profile-rotation.json --json

Gerçek bir geçiş uygula

python3 scripts/codex_profile_threshold_guard.py --config /path/to/workspace/config/codex-profile-rotation.json --apply --json

Watchdog'u başlat

nohup python3 scripts/codex_profile_watchdog.py --config /path/to/workspace/config/codex-profile-watchdog.json --apply >> /path/to/workspace/state/codex-profile-watchdog.log 2>&1 &

Manuel tetikleme

python3 scripts/trigger_profile_failover.py --config /path/to/workspace/config/codex-profile-watchdog.json

Tasarım kuralları

  • Profil id'lerini sabit ve generic tut.
  • Mümkünse email veya account başına tek profil yaklaşımını tercih et.
  • Workspace snapshot mantığını otomatik yan etki değil, açık uyumluluk katmanı olarak tut.
  • Skill içine kişisel email, user id veya kanal id koyma.
  • Ortama özel değerleri scriptlerin içine gömme, kurulum sırasında yazılan configlerde tut.

Önemli not

Bu skill, install edildiği anda tek başına tamamen aktif olmaz. Skill dosyalarını getirir, sonra installer helper ile config yazılması ve watchdog'un ayrıca başlatılması gerekir.

Doğrulama listesi

  • auth-profiles.json içinde birden fazla openai-codex:* profil var
  • hedef session sessions.json içinde mevcut
  • dry-run beklenen aktif profili ve adayı gösteriyor
  • apply sonrası authProfileOverride ve authProfileOverrideSource yazılıyor
  • event log ve backup dosyaları workspace state dizininde oluşuyor
  • watchdog tekrar eden çalışmalarda sağlıklı kalıyor

Referanslar

  • Kurulum ve publish öncesi temizlik için references/setup.md
  • Generic config örnekleri için references/watchdog-config.example.json ve references/threshold-config.example.json
安全使用建议
This skill appears to do what it claims (rotate local OpenClaw Codex profiles), but it will read your OpenClaw state files (auth-profiles.json and sessions.json) and make HTTP requests that include profile tokens to an external URL (https://chatgpt.com/backend-api/wham/usage). Before installing, verify that the external usage endpoint is correct and trusted for your deployment. Steps to reduce risk: (1) run the included scripts in a controlled/test workspace first (dry-run mode) and inspect traffic (e.g., via a network proxy) to confirm where tokens are sent; (2) review the exact auth-profiles.json contents in your environment and ensure you are comfortable with those tokens being used for remote usage probes; (3) consider editing codex_profile_runtime.py to point to your expected/internal usage API, or to instrument it to only check local metadata (expires/lastGood) instead of outbound token-based probes; (4) avoid running the watchdog in production until you confirm the endpoint and behavior; and (5) if you cannot validate the external endpoint, treat this skill as unsafe for production because of potential token exfiltration.
功能分析
Type: OpenClaw Skill Name: codex-profile-failover Version: 1.0.2 The skill is designed to automate OpenAI Codex profile rotation by monitoring usage limits and updating session configurations. While the logic appears consistent with its stated purpose, it performs high-risk operations including reading raw authentication tokens from 'auth-profiles.json', making network requests to 'chatgpt.com' using those tokens (in codex_profile_runtime.py), and programmatically modifying 'sessions.json' to override authentication profiles. The inclusion of a background watchdog script and the handling of sensitive credentials without clear encryption or sandboxing qualify it as suspicious, despite the lack of evidence of intentional malice or data exfiltration.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
Name/description say this manages multiple openai-codex OAuth profiles and switches sessions' authProfileOverride; the scripts read auth-profiles.json and sessions.json and patch session entries as expected. The set of files and helper scripts is proportionate to the stated failover purpose.
Instruction Scope
The runtime fetches live usage by issuing HTTP requests that include profile tokens (Authorization: Bearer <token>) to USAGE_URL = "https://chatgpt.com/backend-api/wham/usage". SKILL.md mentions 'live usage' but does not document the external endpoint. Sending long-lived tokens to an external host is sensitive and not explicitly declared; this is the primary risk vector and could lead to token leakage if the endpoint is not trusted.
Install Mechanism
Instruction-only skill with included Python scripts; no installer downloads or binary installs. The provided installer helper just writes local workspace config files. No remote code is fetched during install.
Credentials
The skill requests no environment variables and does not require new credentials, but it reads OpenClaw state files (auth-profiles.json, sessions.json) containing tokens and account identifiers — which is necessary for the claimed behavior but amplifies sensitivity because those tokens are used in network calls. The number of required artifacts is proportionate to the task, but the use of tokens in outbound requests warrants caution.
Persistence & Privilege
Flags: always is false and the skill does not request permanent platform privileges. It modifies only workspace-local session files and its own generated configs/backups; it does not change other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install codex-profile-failover
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /codex-profile-failover 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Docker içinde kullanım ve Codex login mantığı Türkçe olarak açıklamaya eklendi.
v1.0.1
Türkçe açıklamalar iyileştirildi, kurulum davranışı netleştirildi ve skill'in install sonrası otomatik aktif olmadığını açıkça belgelendi.
v1.0.0
Initial release: automatic and manual Codex profile failover for OpenClaw sessions with threshold-based switching, watchdog mode, and generic install helpers.
元数据
Slug codex-profile-failover
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Codex Profile Failover 是什么?

OpenClaw içinde birden fazla openai-codex OAuth profili varken otomatik ve manuel profil taklası sağlar. Aktif profilin kalan kullanım oranı yüzde 10 gibi bi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。

如何安装 Codex Profile Failover?

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

Codex Profile Failover 是免费的吗?

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

Codex Profile Failover 支持哪些平台?

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

谁开发了 Codex Profile Failover?

由 UgurInanc(@ugurinanc12)开发并维护,当前版本 v1.0.2。

💬 留言讨论