openai-auth-switcher-public
by amior1024
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.
安装
claude skill add --url https://github.com/openclaw/skills文档
OpenAI Auth Switcher Public
Use this skill as the publishable public-track release of the OpenAI auth switcher workflow.
It is designed for OpenClaw administrators who want a web-first, first-run-friendly, release-safe workflow for OpenAI OAuth account takeover, inspection, dry-run validation, controlled switching, and public distribution.
Purpose
Keep the live/internal operator skill and the public distributable skill separated.
This public track must:
- avoid bundling live runtime state
- avoid bundling auth snapshots, callbacks, backups, or token ledgers from a real machine
- avoid machine-specific hard-coded paths where possible
- document compatibility boundaries explicitly
- provide a release-safe packaging workflow
- keep temporary runtime files inside the skill runtime area, while encouraging important persistent state to live in an external state base via
OPENAI_AUTH_SWITCHER_PUBLIC_STATE_DIR
Core operating model
Treat OpenClaw OpenAI OAuth switching as a high-sensitivity maintenance workflow.
Always do work in this order:
- Use
install.shas the default user-facing bootstrap entrypoint. - Run
doctor.pywhen installation or environment checks fail. - Confirm runtime discovery with
env_detect.py. - Inspect the current runtime before any switch logic.
- Dry-run any target before proposing a write.
- Keep rollback and backup behavior explicit.
- Package only from this public skill directory or from a sanitized staging copy.
Included scripts
Primary public-release scripts:
install.sh— recommended user entrypoint; wraps the web bootstrap into a single shell commanduninstall.sh— recommended cleanup entrypoint beforeclawhub uninstallscripts/install_web_app.py— one-shot web bootstrap for first-run accessscripts/pick_port.py— port selection helper (9527→12138→ fallback)scripts/generate_web_credentials.py— default admin credential generatorscripts/doctor.py— compatibility and environment checksscripts/env_detect.py— OpenClaw path and runtime discoveryscripts/paths.py— centralized path resolution helpersscripts/inspect_runtime.py— portable runtime inspectionscripts/profile_slot.py— public-safe slot metadata and local slot filesscripts/rollback_experiment.py— rollback helper using explicit backup sourcesscripts/switch_experiment.py— controlled switch experiment with backup and rollbackscripts/token_ledger.py— local token attribution ledger rebuildscripts/hourly_usage.py— hourly/daily rollup payload for local analyticsscripts/package_public_skill.py— release-safe packager wrapper
Helper modules:
scripts/auth_file_lib.pyscripts/probe_lib.pyscripts/lock_lib.pyscripts/state_lib.py
Compatibility and safety references
Read only as needed:
references/compatibility.md— Python / Node / OpenClaw / OS expectationsreferences/runtime-discovery.md— path detection and override modelreferences/install-and-runbook.md— operator flow and first-run checksreferences/security-model.md— sensitivity, boundaries, and redaction rulesreferences/packaging-policy.md— publish checklist and forbidden contentsreferences/migration-notes.md— relation to the internal/live skill
Release rule
Do not publish skills/openai-auth-switcher directly.
Use the public skill directory for ClawHub publication and use a packaging wrapper that rejects runtime data, backups, session callbacks, and credential-bearing files.
Recommended first release positioning:
- version:
0.1.0 - tested on OpenClaw
2026.3.11 - tested on Python
3.11 - tested on Node.js
22.x - Linux-first release