← Back to Skills Marketplace
ugurinanc12

Codex Profile Failover

by UgurInanc · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
115
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install codex-profile-failover
Description
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...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install codex-profile-failover
  3. After installation, invoke the skill by name or use /codex-profile-failover
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug codex-profile-failover
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 115 downloads so far.

How do I install Codex Profile Failover?

Run "/install codex-profile-failover" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Codex Profile Failover free?

Yes, Codex Profile Failover is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Codex Profile Failover support?

Codex Profile Failover is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Codex Profile Failover?

It is built and maintained by UgurInanc (@ugurinanc12); the current version is v1.0.2.

💬 Comments