[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C382NJYRVM9TX886Z241TA":3,"skill-same:01M6C382NJYRVM9TX886Z241TA":121},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":61,"linkOnly":62,"markdownContent":63,"markdownBody":64,"frontMatter":65,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":69,"repositoryHtmlUrl":70,"repositoryHomepageUrl":13,"ownerHtmlUrl":71,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":72,"install":73,"resources":86},"01M6C382NJYRVM9TX886Z241TA","claude-codex-provider-routing","Claude\u002FCodex 模型提供商路由","Add a new third-party API provider (DeepSeek \u002F GLM \u002F OpenRouter \u002F Minimax \u002F etc.) as a Claude Code and Codex CLI shell wrapper, mirroring the existing `claudem` (Minimax) \u002F `claudeds` (DeepSeek) \u002F `claudeg` (GLM) pattern in `~\u002F.bashrc`. The canonical recipe is bashrc-function ONLY (no `~\u002Fbin\u002F` shim). Non-interactive callers (pytest, launchd, AO workers, GitHub Actions) use `bash -lic 'wrapper …'` to source the bashrc. Trigger when the user says \"set up \u003Cprovider> like claudem\", \"add \u003Cprovider> as a Claude\u002FCodex wrapper\", \"route Claude Code through \u003Cprovider>\", \"use OpenRouter in the terminal\", \"new claudem-style alias for \u003CX>\", or when wiring any new model provider behind the existing Claude Code \u002F Codex CLIs.","添加新的第三方 API 提供商（DeepSeek \u002F GLM \u002F OpenRouter \u002F Minimax 等）作为 Claude Code 和 Codex CLI 的 shell 包装器，参照 `~\u002F.bashrc` 中现有的 `claudem`（Minimax）\u002F `claudeds`（DeepSeek）\u002F `claudeg`（GLM）模式。规范做法是仅使用 bashrc 函数（不使用 `~\u002Fbin\u002F` 垫片脚本）。非交互式调用方（pytest、launchd、AO worker、GitHub Actions）使用 `bash -lic 'wrapper …'` 来加载 bashrc。当用户说“像 claudem 一样设置 \u003Cprovider>”、“将 \u003Cprovider> 添加为 Claude\u002FCodex 包装器”、“让 Claude Code 通过 \u003Cprovider> 路由”、“在终端中使用 OpenRouter”、“为 \u003CX> 新建 claudem 风格别名”，或需要将任何新模型提供商接入现有 Claude Code \u002F Codex CLI 时触发。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],"provider routing","claude codex provider routing","provider","routing","codex","for","style","as","Existing","workers","user","Wrapper","up","only","minimax","launchd","bashrc","use","cli","interactive","openrouter","model","Bash","api","SET","github actions","actions","code","codex cli","github","terminal","2026-11-10 10:12:30",false,"---\nname: claude-codex-provider-routing\ndescription: Add a new third-party API provider (DeepSeek \u002F GLM \u002F OpenRouter \u002F Minimax \u002F etc.) as a Claude Code and Codex CLI shell wrapper, mirroring the existing `claudem` (Minimax) \u002F `claudeds` (DeepSeek) \u002F `claudeg` (GLM) pattern in `~\u002F.bashrc`. The canonical recipe is bashrc-function ONLY (no `~\u002Fbin\u002F` shim). Non-interactive callers (pytest, launchd, AO workers, GitHub Actions) use `bash -lic 'wrapper …'` to source the bashrc. Trigger when the user says \"set up \u003Cprovider> like claudem\", \"add \u003Cprovider> as a Claude\u002FCodex wrapper\", \"route Claude Code through \u003Cprovider>\", \"use OpenRouter in the terminal\", \"new claudem-style alias for \u003CX>\", or when wiring any new model provider behind the existing Claude Code \u002F Codex CLIs.\n---\n\n# Claude\u002FCodex Third-Party Provider Routing\n\nClass-level recipe for adding a new third-party model provider (Minimax, DeepSeek, GLM, OpenRouter, …) as a Claude Code \u002F Codex CLI shell wrapper, mirroring the existing `claudem`\u002F`claudeds`\u002F`claudeg` family.\n\nThe set already wired on this machine (2026-07-13):\n\n| Wrapper | Provider | Default model | Env path |\n|---|---|---|---|\n| `claudem` | MiniMax | `MiniMax-M3` | `claude` + `ANTHROPIC_*` |\n| `claudeds` | DeepSeek (Anthropic-compat) | `deepseek-v4-flash` | same |\n| `claudeg`  | GLM 5.2 (OpenRouter, Anthropic-protocol) | `z-ai\u002Fglm-5.2` | `ANTHROPIC_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi` |\n| `claudegz` | GLM 5.1 (Z.AI direct, Anthropic-protocol) | `glm-5.1` | `ANTHROPIC_BASE_URL=https:\u002F\u002Fapi.z.ai\u002Fapi\u002Fanthropic` |\n| `claudek`  | Kimi K3 (OpenRouter, Anthropic-protocol) | `moonshotai\u002Fkimi-k3` | see § Reasoning models |\n| `claudeaf` | Agent-F enterprise acct | `sonnet` | `claude` + `CLAUDE_CONFIG_DIR=~\u002F.claude-agent-f` |\n| `claudewa` \u002F `claude2` | WorldArchitect.ai acct | `fable` | `claude` + `CLAUDE_CONFIG_DIR=~\u002F.claude-wa` + Aside u1 dance |\n| `claudeor` | OpenRouter (Anthropic-protocol) | `anthropic\u002Fclaude-sonnet-4.5` | new, this skill |\n| `claudeo`  | (alias → `claudeg`) | `z-ai\u002Fglm-5.2` | back-compat for legacy alias |\n| `codexor`  | OpenRouter (OpenAI-protocol) | `openai\u002Fgpt-5` | broken on v0.142.3, see Pitfall below |\n| `codexo`   | OpenRouter → GLM 5.2 (OpenAI-protocol) | `z-ai\u002Fglm-5.2` | broken on v0.142.3, see Pitfall below |\n\n## Two layers every wrapper must ship\n\nWhen adding a `\u003Cx>` provider to Claude Code AND\u002FOR Codex, ship ONLY the layers that don't have a single-command workaround — skipping any one breaks a class of callers:\n\n1. **Interactive bash function** in `~\u002F.bashrc` (works in shells, AO, PTY sessions, AND any non-interactive caller via `bash -lic 'wrapper …'`).\n2. **(Codex only) profile layer TOML** at `~\u002F.codex\u002F\u003Cwrapper>.config.toml` (so the wrapper doesn't clobber the user's main `~\u002F.codex\u002Fconfig.toml` \u002F trusted-projects \u002F ChatGPT-account config).\n\n> **Why no `~\u002Fbin\u002F\u003Cwrapper>` binary shim?** Previous versions of this skill (v1.4.0 and earlier) mandated a `~\u002Fbin\u002F\u003Cwrapper>` shim for non-interactive callers. The shim was removed 2026-07-28 because (a) it drifted from the bashrc function (`${VAR:-default}` inherited `ANTHROPIC_MODEL=sonnet` from the bashrc global, silently routing to the wrong model), and (b) `bash -lic 'wrapper …'` is a one-token substitution for the binary that needs no second source of truth. If a future caller genuinely cannot use `bash -lic` (none has surfaced on this host), reconsider then — do NOT preemptively ship the shim.\n\n**Verification for non-interactive callers** — every bashrc-function wrapper must work in all four contexts:\n\n```bash\n# 1. Interactive shell (bashrc auto-sourced)\nbash -ic 'type claudem'                # → \"claudem is a function\"\n\n# 2. Login shell (forces bashrc sourcing)\nbash -lic 'type claudem'               # → \"claudem is a function\"\n\n# 3. From Python subprocess\npython3 -c \"import subprocess; print(subprocess.run(['bash','-lic','claudem --version'], capture_output=True, text=True).stdout)\"\n\n# 4. From cron \u002F launchd \u002F env -i\nenv -i bash -lic 'claudem --version'   # → 2.1.220 (Claude Code)\n```\n\nIf any of these returns `claudem: command not found`, the wrapper is missing from `~\u002F.bashrc` — fix the bashrc, do NOT add a binary shim.\n\nNaming convention (verified stable since at least 2026-06):\n- `claude\u003Cshort>` for Claude wrappers (sonnet default), `claude\u003Cshort>c` for `--continue`.\n- `claude\u003Cshort>op` = Opus variant, `claude\u003Cshort>opc` = Opus + continue.\n- `codex\u003Cshort>` for Codex wrappers, `codex\u003Cshort>c` for `resume --last`.\n- The spelled-out alias form is also a bashrc function: `claudem → claudeminimax`, `claudeds → claudedeepseek`, etc. No underscores — matches the family convention (`claudeg`, `claudek`, `claudeds`, `claudegz`, `claudem`). If the user explicitly wants underscores, ask before adding (the family form is the default).\n- `claudeo` is historically taken (legacy alias at `~\u002F.bashrc:686` for `claude --dangerously-skip-permissions --chrome --model opus`). When the user asks for a wrapper by name and the name already exists as either an alias OR an existing function, **deconflict via rename** rather than refuse or silently collide:\n  - If the user's preferred name collides with a legacy **alias**, replace the alias with a function (aliases shadow function definitions, so the alias wins if both exist — confirmed in production). Test by `type -a \u003Cname>` after editing — if it shows both `alias` and `function`, the alias wins and your function is dead code.\n  - If the user's preferred name collides with an existing **function** of a different target, rename the existing function (suffix the model family: `g`→`gz` for \"Z.AI direct\", `o`→`of` for OpenRouter-former, etc.) and free the preferred name. Verified pattern (2026-07-16): user asked for `claudek` (Kimi K3) + `claudeg` (GLM 5.2 via OpenRouter). Existing `claudeg` was wired to Z.AI direct glm-5.1; renamed to `claudegz`\u002F`claudegzc`. Back-compat alias `claudeo() { claudeg \"$@\"; }` preserves the legacy shortcut.\n  - Tested suffixes in active use (2026-07-16): `m`=minimax, `ds`=deepseek, `g`=glm-via-OpenRouter (z-ai\u002Fglm-5.2), `gz`=glm-via-Z.AI-direct (glm-5.1), `k`=kimi (moonshotai\u002Fkimi-k3), `or`=openrouter-with-Anthropic-default, `af`=agent-f.\n\n## Template — Claude wrapper (Anthropic-protocol endpoint)\n\nUse this for any provider that exposes an Anthropic-protocol endpoint (Anthropic-compat): OpenRouter `\u002Fapi`, Minimax `\u002Fanthropic`, DeepSeek `\u002Fanthropic`, Z.AI `\u002Fapi\u002Fanthropic`, etc.\n\n`~\u002F.bashrc` (insert near other Claude wrappers, e.g. right after `claudemc()` at line 1051):\n\n```bash\n# Claude Code via \u003CProvider> (Anthropic-compatible endpoint \u003CBASE_URL>)\n# Usage: claude\u003Cshort> [args]       → \u003CProvider> session, default model \u003CMODEL>\n#        claude\u003Cshort>op [args]     → \u003CProvider> Opus session\n#        claude\u003Cshort>oc [args]     → → --continue\n#        claude\u003Cshort>opc [args]    → Opus + --continue\nclaude\u003Cshort>() {\n  CLAUDE\u003CSHORT>_MODE=1 \\\n  ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\" \\\n  ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_MODEL=\"\u003CMODEL>\" \\\n  CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0 \\\n  claude --dangerously-skip-permissions --effort high \"$@\"\n}\n\nclaude\u003Cshort>op() {\n  CLAUDE\u003CSHORT>_MODE=1 \\\n  ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\" \\\n  ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_MODEL=\"\u003COPUS_MODEL>\" \\\n  CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0 \\\n  claude --dangerously-skip-permissions --effort high \"$@\"\n}\n\nclaude\u003Cshort>oc()  { claude\u003Cshort> --continue \"$@\"; }\nclaude\u003Cshort>opc() { claude\u003Cshort>op --continue \"$@\"; }\n```\n\n`~\u002Fbin\u002Fclaude\u003Cshort>` (executable shim, mirrors `~\u002Fbin\u002Fclaudem`):\n\n> **⚠ DEPRECATED 2026-07-28:** the binary shim pattern was removed in v1.5.0 of the `claude-code-claudem` umbrella skill. The bashrc function form is the source of truth; non-interactive callers (pytest, launchd, AO workers, GitHub Actions) must use `bash -lic 'claude\u003Cshort> …'` to source the bashrc and make the function visible. This block remains as a historical reference for the `default-if-unset vs force` lesson, but the canonical recipe going forward is the bashrc function only.\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# DEPRECATED — see warning above. Real claude\u003Cshort> CLI — \u003CProvider>-routed Claude Code.\n# Historical: Usable from Go AO PATH shims, cron, and non-interactive shells.\nset -euo pipefail\n: \"${\u003CPROVIDER>_API_KEY:?\u003CPROVIDER>_API_KEY must be set (same as ~\u002F.bashrc claude\u003Cshort>)}\"\nexport CLAUDE\u003CSHORT>_MODE=1\n# Force every ANTHROPIC_* var. Do NOT use ${VAR:-default} — bashrc sets\n# ANTHROPIC_MODEL=\"sonnet\" globally (so bare `claude` defaults to sonnet), and\n# a default-if-unset export inherits that global into the wrapper, silently\n# sending the upstream MiniMax-compatible endpoint the wrong model identity.\n# See \"Pitfall — ANTHROPIC_MODEL\u002FANTHROPIC_BASE_URL leak from bashrc into the\n# wrapper shim\" below for the full bug class. If you genuinely want a caller-\n# overrideable model, gate it explicitly so the bashrc global cannot leak:\nif [[ -n \"${ANTHROPIC_MODEL_OVERRIDE:-}\" ]]; then\n  export ANTHROPIC_MODEL=\"$ANTHROPIC_MODEL_OVERRIDE\"\nelse\n  export ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nfi\nexport ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\"\nexport ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\"\nexport ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\"\nexport CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0\n# CLAUDE_EFFORT defaults to \"high\" but is caller-overridable: this is safe\n# because bashrc does NOT set CLAUDE_EFFORT globally, so the default expansion\n# here is the only fallback path and there is no cross-talk source.\nexport CLAUDE_EFFORT=\"${CLAUDE_EFFORT:-high}\"\nexec claude --dangerously-skip-permissions --effort high \"$@\"\n```\n\nThe override pattern lets callers swap models with `ANTHROPIC_MODEL_OVERRIDE=\u003CX>` without editing the shim, but gates against the bashrc-global cross-talk class. `CLAUDE_EFFORT` keeps simple `${VAR:-default}` because bashrc does not export it.\n\n## Template — Codex wrapper (OpenAI-protocol endpoint)\n\nUse this for Codex, which reads `OPENAI_API_KEY` + `OPENAI_BASE_URL`. Codex v0.142+ has a **known auth conflict** — see §Auth conflict pitfall below.\n\n`~\u002F.bashrc` (insert near other Codex wrappers, around line 568 after `codexsc`):\n\n```bash\n# Codex via \u003CProvider> (OpenAI-compatible \u003CBASE_URL>)\n# Usage: codex\u003Cshort> [args]    → \u003CProvider>-routed Codex, default model \u003CMODEL>\n#        codex\u003Cshort>c [args]   → resume last\n# Layers ~\u002F.codex\u002F\u003Cwrapper>.config.toml on top of the user's main config so\n# their ChatGPT-account config and trusted-projects list stay untouched.\ncodex\u003Cshort>() {\n  OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  OPENAI_BASE_URL=\"\u003CBASE_URL>\" \\\n  command codex --profile \u003Cwrapper> -m \u003CMODEL> --config model_reasoning_effort=high \"$@\"\n}\n\ncodex\u003Cshort>c() {\n  OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  OPENAI_BASE_URL=\"\u003CBASE_URL>\" \\\n  command codex --profile \u003Cwrapper> -m \u003CMODEL> resume --last \"$@\"\n}\n```\n\n`~\u002Fbin\u002Fcodex\u003Cshort>` and `~\u002Fbin\u002Fcodex\u003Cshort>c` (mirror the bash-function pattern):\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Real codex\u003Cshort> CLI — \u003CProvider>-routed Codex via \u003CBASE_URL>.\n# Layers ~\u002F.codex\u002F\u003Cwrapper>.config.toml.\nset -euo pipefail\n: \"${\u003CPROVIDER>_API_KEY:?\u003CPROVIDER>_API_KEY must be set (same as ~\u002F.bashrc codex\u003Cshort>)}\"\nexport OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\"\nexport OPENAI_BASE_URL=\"\u003CBASE_URL>\"\nexec command codex --profile \u003Cwrapper> -m \u003CMODEL> --config model_reasoning_effort=high \"$@\"\n```\n\n`~\u002F.codex\u002F\u003Cwrapper>.config.toml`:\n\n```toml\n# Layered via `codex --profile \u003Cwrapper>` so ChatGPT-account config +\n# trusted projects in the user's main ~\u002F.codex\u002Fconfig.toml stay untouched.\n\nmodel = \"\u003CMODEL>\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[model_providers.\u003Cprovider_short>]\nname = \"\u003CProvider Display Name>\"\nbase_url = \"\u003CBASE_URL>\"\n\nmodel_provider = \"\u003Cprovider_short>\"\n```\n\n## Class — multi-`~\u002F.claude*` account wrappers (different OAuth, same binary)\n\nSibling class to provider routing: instead of routing `claude` to a different **model provider** via `ANTHROPIC_*` env, you route it to a different **Anthropic OAuth account** via `CLAUDE_CONFIG_DIR`. Each `~\u002F.claude*` dir isolates: OAuth credentials, conversation history, MCP servers, and (optionally) settings. On this box (verified live 2026-07-17):\n\n| Wrapper family | Config dir | Model | OAuth | Use for |\n|---|---|---|---|---|\n| `claude` (bare) | `~\u002F.claude` | `sonnet` (default) | $USER tooling | scratch \u002F tooling |\n| `claudewa` \u002F `claude2` (and `*c` variants) | `~\u002F.claude-wa` | `fable` | $USER@your-project.com | WorldArchitect.ai work |\n| `claudeaf` \u002F `claudeafc` | `~\u002F.claude-agent-f` | `sonnet` | jeffrey@agent-f.com | Agnt-F (org Agnt-F) work |\n\nThe bashrc template (~`~\u002F.bashrc:712-731`) is a function that:\n1. Saves the current Aside account via `aside account status` (which prints one line per account, prefixed with `*` for active).\n2. Calls `aside account use \u003Caside-id>` to align the Chrome profile cookies.\n3. Runs `claude` with `CLAUDE_CONFIG_DIR=~\u002F.claude-\u003Caccount> --dangerously-skip-permissions --chrome --model \u003CX> \"$@\"`.\n4. Restores the Aside account on exit (the buggy bit — see Pitfall below).\n\nThe `*c` suffix on the wrapper name is the `--continue` variant — append `--continue` so `--continue` resolves against the account's conversation pool instead of starting fresh.\n\n### Pitfall — `awk '\u002F^\\*\u002F {print $1; exit}'` captures `*` not the account id (Aside stuck on u1 after `claudewa` exits)\n\nThe bashrc restore step is:\n```bash\n_aside_prev=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $1; exit}')\naside account use u1 >\u002Fdev\u002Fnull 2>&1 || true\nCLAUDE_CONFIG_DIR=~\u002F.claude-wa claude --dangerously-skip-permissions --chrome --model fable \"$@\"\nlocal _rc=$?\nif [[ -n \"$_aside_prev\" && \"$_aside_prev\" != \"u1\" ]]; then\n  aside account use \"$_aside_prev\" >\u002Fdev\u002Fnull 2>&1 || true\nfi\n```\n\n`aside account status` output:\n```\n* u0  $USER@gmail.com  signed in  profiles: Profile 0\n  u1  $USER@your-project.com  signed in  profiles: Profile 1\n```\n\n`awk '\u002F^\\*\u002F {print $1; exit}'` extracts `$1` of the line starting with `*`. That field is the literal `*` (the active marker), **not** the account id `u0`. Result: `_aside_prev=\"*\"`, the restore runs `aside account use \"*\"`, Aside CLI rejects with `Account must be a non-negative account id, for example 0 or u0`, the error is swallowed by `>\u002Fdev\u002Fnull 2>&1 || true`, and Aside stays on `u1` after `claudewa` exits — even if it started on `u0`. Verified live 2026-07-17 by reproducing the exact bashrc flow manually.\n\n**Fix:** change `$1` to `$2` (the second whitespace-separated field, which is the account id):\n```bash\n_aside_prev=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}')\n```\n\nOr use `sed -n 's\u002F^\\* \u002F\u002Fp' | awk '{print $1; exit}'` if you want to be more explicit about stripping the marker.\n\n**Workaround until fixed:** after any `claudewa` invocation, manually run `aside account use u0` (or whichever account you want active) to restore.\n\n### Pitfall — `~\u002F.claude-wa\u002F{settings.json,projects}` are symlinks to `~\u002F.claude\u002F`, NOT isolated copies\n\nVerified live 2026-07-17:\n- `~\u002F.claude-wa\u002Fsettings.json` → `~\u002F.claude\u002Fsettings.json` (same permissions\u002Fenv\u002Fhooks)\n- `~\u002F.claude-wa\u002Fprojects\u002F` → `~\u002F.claude\u002Fprojects\u002F` (same conversation history)\n\nSo `claudewac` does **not** find a WA-only conversation pool — `--continue` resolves against the shared `~\u002F.claude\u002Fprojects\u002F` directory. The only things `CLAUDE_CONFIG_DIR=~\u002F.claude-wa` actually isolates are:\n1. OAuth credentials (`.credentials.json`)\n2. Per-account MCP server registrations (`mcp-servers\u002F`, `mcp-strict.json`)\n3. The fact that the bashrc command chose WA's Aside account (`u1`)\n\nIf you genuinely need WA conversations to be isolated from tooling, you must replace the symlink with a real directory + copy\u002Freplay the WA history into it (or stop creating the symlink when bootstrapping a new account). `~\u002F.claude-agent-f\u002F` has concrete files (own `settings.json` with hooks, own `projects\u002F`), so it IS properly isolated.\n\n### Verification recipe for a new account wrapper\n\nBefore declaring a `claudexxx` wrapper \"done\", run the four-layer probe in priority order:\n\n```bash\n# 1. Binary resolution under the config dir\nCLAUDE_CONFIG_DIR=~\u002F.claude-\u003Caccount> timeout 6 claude --version 2>&1 | head -3\n\n# 2. OAuth \u002F auth probe (cheap non-interactive)\ntimeout 10 bash -c 'claudexxx --print --output-format text --model \u003CX> \"reply with just the word pong\"' 2>&1 | tail -5\n\n# 3. --continue target resolution (must find at least one conversation)\nls -la ~\u002F.claude-\u003Caccount>\u002Fprojects\u002F 2>&1 | head -3\n\n# 4. Aside restore round-trip\nSTART=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}')\nclaudexxx --print \"...\"  # should auto-switch Aside\naside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}'\n# If still on u1 and START was different, the awk bug above is biting you\naside account use \"$START\"  # manual restore\n```\n\nStep 4 is the trap — `claudeaf` returned HTTP 401 on this box (2026-07-17) because `~\u002F.claude-agent-f\u002F` has no valid `.credentials.json`. The fix is `node ~\u002F.claude\u002Fscripts\u002Fauth-cli.mjs login --project \u003Caccount>` (or whichever auth script the account ships), but OAuth logins require user approval — don't run them autonomously.\n\n### Verified live 2026-07-17 (test transcript)\n\n| Wrapper | Result | Note |\n|---|---|---|\n| `claudewac --print \"reply with just the word pong\"` | `pong` ✅ | WA account OK |\n| `claudeafc --print \"reply with just the word pong\"` | `401 Invalid authentication credentials` ❌ | Agnt-F needs re-auth via `auth-cli.mjs` |\n| `claude --version` under `CLAUDE_CONFIG_DIR={~\u002F.claude,~\u002F.claude-wa,~\u002F.claude-agent-f}` | `2.1.207 (Claude Code)` (all 3) | binary resolves identically |\n| `aside account use u1` → `aside account use u0` round-trip | works manually; **broken** via `claudewa` because of the awk bug | restore does not actually restore |\n\n## Pitfall — `claude --print` swallows body in non-TTY bash\n\nWhen smoke-testing from `bash -lc`, `claude --print \"\u003Cprompt>\"` may return `exit=0` but produce empty stdout even though the model generated a real answer. Symptom:\n\n```\nrc=0 stderr-bytes=279 stdout-bytes=1\n```\n\nThis is **not a wrapper bug**. The model IS responding. To prove it, use verbose JSON streaming and the canonical parser in `scripts\u002Fparse_claude_verbose.py`:\n\n```bash\nclaude --dangerously-skip-permissions --print --verbose --output-format=json \\\n  \"\u003Cprompt>\" > \u002Ftmp\u002Fc.out 2>\u002Ftmp\u002Fc.err\npython3 scripts\u002Fparse_claude_verbose.py \u003C \u002Ftmp\u002Fc.out\n```\n\nA successful run prints `ASSISTANT_TEXT: 'pong'` (or whatever was asked) and `IS_ERROR=False STOP_REASON=end_turn` — that is the proof the wrapper works end-to-end. The script also exits non-zero if no `result` event is emitted (the symptom of the wrapper actually being broken, not just the stdout-flush quirk).\n\n**Reasoning-model variant (Kimi K3, DeepSeek R1, o1-series, etc., 2026-07-16):** The same silent-exit symptom occurs with reasoning models **even when the model is producing a real answer**, because Claude Code 2.1.207's `-p` non-interactive mode is not threading the model's `thinking`\u002F`redacted_thinking` content blocks through to stdout. Verified with `claudek` (moonshotai\u002Fkimi-k3): the raw API returns `pong-kimi-k3-claudek` in the Anthropic-format `text` block with `stop_reason: end_turn`, but `bash -lic 'claudek -p \"Reply with pong\"'` exits 0 with empty stdout. The same wrapper + same prompt against a non-reasoning model (`claudeor` \u002F `claudeo`) returns \"pong\" normally. Diagnose by hitting `\u002Fv1\u002Fmessages` directly with `curl` (see `scripts\u002Fprobe_openrouter.sh --reasoning`) before assuming the wrapper is broken. Bead: `$USER-3e4o`.\n\n## Pitfall — bash functions aren't exec targets; `timeout \u003CN> \u003Cfunction>` fails\n\nA bash function defined in `~\u002F.bashrc` is *not* on the exec path. From a `bash -lic` shell where the function is loaded, you can call `claudek -p \"...\"` directly — bash resolves it as a function and runs the body. But:\n\n- `timeout 90 claudek -p \"...\"` from a separate shell fails with `timeout: failed to run command 'claudek': No such file or directory`.\n- Same error even inside `bash -lic 'timeout 90 claudek -p \"...\"'` — `timeout` execs the name as a binary.\n\n**The 2026-07-28 fix (canonical):** `timeout` itself is a function-aware bash builtin when called from inside bash, but its child process is `exec`-based. The fix is to call the wrapper as a function inside bash, so bash's function resolution applies:\n\n```bash\n# Works — bash function is resolved by the parent bash, not exec'd\nbash -lic 'timeout 90 claudek -p \"...\"'\n\n# Or with explicit function-resolution:\nbash -lic 'claudek -p \"...\" & pid=$!; (sleep 90; kill $pid 2>\u002Fdev\u002Fnull) & wait $pid'\n```\n\n**DO NOT** revert to the v1.4.0-era \"ship `~\u002Fbin\u002F\u003Cwrapper>`\" workaround. The binary shim was removed 2026-07-28 because it drifted from the bashrc function (default-if-unset vs force ANTHROPIC_MODEL). Bashrc-only is the canonical recipe; the `timeout`-from-non-bash-shell case is solved by `bash -lic`.\n\nSmoke-test command, in priority order:\n\n```bash\n# 1. Best: parse verbose JSON (works for reasoning models too)\nbash -lic 'claudeor --print --verbose --output-format=json \"Reply with exactly the word pong\"' \\\n  | python3 ~\u002F.hermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Fscripts\u002Fparse_claude_verbose.py\n\n# 2. OK for non-reasoning models: direct invocation (function shell only)\nbash -lic 'claudeor --print \"Reply with exactly the word pong\"'\n\n# 3. Timeout + wrapper (must wrap the whole bash -lic call, not just the wrapper):\nbash -lic 'timeout 90 claudeor --print \"...\"'   # ✅\n\n# 4. Wrong — fails with \"No such file or directory\" because timeout execs the name:\ntimeout 90 claudeor --print \"...\"               # ❌\nbash -lic 'timeout 90 claudeor --print \"...\"'   # ❌ (timeout execs from inside bash, function table not in scope)\n```\n\nFor the reasoning-model silent-exit case, option (1) with `--verbose --output-format=json` is the only honest verification — option (2) will print nothing for Kimi K3 even though the API is fine.\n\n## Pitfall — Reasoning models (Kimi K3 \u002F DeepSeek R1 \u002F o1-series) on OpenRouter\n\nReasoning models expose extra content blocks and have provider-level quirks that bite silent wrappers. Verified 2026-07-16 with `moonshotai\u002Fkimi-k3`:\n\n1. **`\u002Fv1\u002Fchat\u002Fcompletions` returns a separate `reasoning` field** on the message, NOT `reasoning_content` (despite some Anthropic-protocol docs implying otherwise). Sample response excerpt:\n   ```json\n   {\n     \"choices\": [{\"message\": {\n       \"content\": \"391\",\n       \"reasoning\": \"17 * 23 = 17 * 20 + 17 * 3 = 340 + 51 = 391.\"\n     }}],\n     \"usage\": {\"completion_tokens_details\": {\"reasoning_tokens\": 56}}\n   }\n   ```\n2. **`\u002Fv1\u002Fmessages` returns 3 content blocks per assistant turn**:\n   ```json\n   \"content\": [\n     {\"type\": \"thinking\", \"thinking\": \"...chain-of-thought...\"},\n     {\"type\": \"text\", \"text\": \"...final answer...\"},\n     {\"type\": \"redacted_thinking\", \"type\": \"redacted_thinking\", \"data\": \"openrouter.reasoning:eyJ0ZX...cHMg\"}\n   ]\n   ```\n   Verify the answer by grepping for `\"type\":\"text\"` not just `\"content\"`.\n3. **Reasoning cannot be disabled** for some providers. Sending `\"reasoning\": {\"enabled\": false}` to Kimi K3 returns `HTTP 400: Reasoning is mandatory for this endpoint and cannot be disabled.` Don't try to silence chain-of-thought — budget `max_tokens` for both reasoning AND answer (≥2× the answer length for safety).\n4. **Upstream rate-limiting at launch.** New reasoning models are usually rate-limited hard for the first days\u002Fweeks. Kimi K3 returned HTTP 429 (`Provider returned error … is temporarily rate-limited upstream … retry_after_seconds=1`) on multiple consecutive calls during launch week (2026-07-16). Implement retry-with-backoff (`retry_after_seconds + jitter`) in any smoke-test script — naive single-shot calls will report spurious failures. See `scripts\u002Fprobe_openrouter.sh` for the retry pattern.\n5. **Default `ANTHROPIC_DEFAULT_HAIKU_MODEL` has no obvious fallback.** When adding a reasoning model, you must explicitly set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to *something* — Claude Code will spawn subagents on the haiku tier, and most reasoning models don't expose a smaller sibling. Either reuse the same heavy model (expensive but works) or pick a known-fast fallback like `z-ai\u002Fglm-4.5-air`. **`claudek` defaults all subagent tiers to `moonshotai\u002Fkimi-k3`** — set `ANTHROPIC_DEFAULT_HAIKU_MODEL` externally if you want a cheaper fallback.\n\n## Pitfall — Codex v0.142.3 ChatGPT-auth conflict\n\nCodex CLI's auth layer wins over env vars: when `~\u002F.codex\u002Fauth.json` has `auth_mode = \"chatgpt\"` (which is the default after `codex login` with a ChatGPT account), Codex ignores `OPENAI_API_KEY` and answers:\n\n> `{\"type\":\"error\",\"status\":400,\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The '\u003Cmodel>' model is not supported when using Codex with a ChatGPT account.\"}}`\n\nTo make `codex\u003Cshort>` actually route through the third-party API:\n- **Either** run `codex logout` first (destroys user's ChatGPT login — irreversible without re-login), OR\n- **Or** ship `~\u002F.codex\u002F\u003Cwrapper>.config.toml` (the profile layer above) AND accept that codexor etc. will still fail at model-list lookup but env-var wiring is correct for any non-ChatGPT-auth environment.\n\nDocument the auth-mode requirement in the wrapper's bash comment block — operators need to know one `codex logout` (or running in a CI\u002Fno-ChatGPT environment) unblocks the wrapper.\n\n## Pitfall — Codex v0.142.3 `responses_websocket` bypasses `model_provider.base_url` (newer than the ChatGPT-auth conflict)\n\nCodex CLI v0.142+ introduced a `responses_websocket` transport that **hard-codes `wss:\u002F\u002Fapi.openai.com\u002Fv1\u002Fresponses` regardless of `[model_providers.\u003Cx>].base_url`** in the profile TOML. Symptom: even after `codex logout` removes the ChatGPT-auth conflict, `codex --profile \u003Cwrapper>` still produces:\n\n```\nERROR codex_api::endpoint::responses_websocket: failed to connect to websocket:\n  HTTP error: 401 Unauthorized, url: wss:\u002F\u002Fapi.openai.com\u002Fv1\u002Fresponses\n```\n\nAnd the resolved config dump prints `provider: openai` (not the provider you configured), with `model: \u003Cyour model id>` — confirming Codex is honoring the model id but routing to api.openai.com anyway.\n\n**Diagnostic — verify the bug, not your config:**\n\n```bash\n# Back up auth.json to neutralize ChatGPT auth, then run with --skip-git-repo-check\nmv ~\u002F.codex\u002Fauth.json ~\u002F.codex\u002Fauth.json.bak\nOPENAI_API_KEY=\"$OPENROUTER_API_KEY\" \\\nOPENAI_BASE_URL=\"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\" \\\ncommand codex --profile codexor -m openai\u002Fgpt-5 \\\n  --config model_reasoning_effort=high exec --skip-git-repo-check \"echo hi\" 2>&1 \\\n  | grep -iE \"model:|provider:|openrouter|wss:\u002F\u002Fapi\\.openai\" | head -10\nmv ~\u002F.codex\u002Fauth.json.bak ~\u002F.codex\u002Fauth.json\n```\n\nIf you see `provider: openai` + `wss:\u002F\u002Fapi.openai.com` even after auth.json is removed, the bug is in Codex v0.142.3 itself, not your wrapper. This was verified 2026-07-14 against `codexor` (openai\u002Fgpt-5), `codexo` (z-ai\u002Fglm-5.2), and both with auth.json backed up — all three produced identical 401s against `api.openai.com`. `codex --help` and `codex exec --help` confirm there is **no** `--base-url` \u002F `--api-base` \u002F `--provider-override` CLI flag in v0.142.3.\n\n**Workarounds (none complete as of 2026-07-14):**\n1. **Downgrade Codex CLI** to a build that uses the legacy `\u002Fv1\u002Fchat\u002Fcompletions` transport and honors `[model_providers.\u003Cx>].base_url`.\n2. **Use the OpenAI-protocol endpoint directly via `curl`** for one-off prompts — bypasses Codex entirely.\n3. **Use `claude\u003Cshort>` instead of `codex\u003Cshort>`** — the `claude` CLI's Anthropic-protocol transport correctly honors `ANTHROPIC_BASE_URL`, so `claudeo`\u002F`claudeor` work end-to-end against OpenRouter while `codexo`\u002F`codexor` cannot.\n\n**Action when you hit this:** the bashrc warning comment already documents the ChatGPT-auth conflict. After this finding, also add a one-liner to any new `codex\u003Cshort>` wrapper's bash comment block noting that v0.142.3's WebSocket transport is broken regardless of auth state, and recommend `claude\u003Cshort>` as the working alternative until upstream fixes.\n\n## Pitfall — OpenRouter model id format\n\nOpenRouter exposes **two** API shapes at the same host:\n\n| Path | Protocol | Used by |\n|---|---|---|\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmessages` | Anthropic-protocol | `claude` wrappers (`ANTHROPIC_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi`) |\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions` | OpenAI-protocol | `codex` wrappers (`OPENAI_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1`) |\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fresponses` | ❌ rejects generic input | do **not** use |\n\nModel IDs go in the form `\u003Cprovider>\u002F\u003Cmodel>` — e.g. `anthropic\u002Fclaude-sonnet-4.5`, `anthropic\u002Fclaude-opus-4.7`, `openai\u002Fgpt-5`, `z-ai\u002Fglm-5.2`. The unversioned `anthropic\u002Fclaude-sonnet-4` is deprecated (returns 11s response, warns \"Claude Sonnet 4 was retired\") — always pin to a suffixed version (`4.5`, `4.7`, etc.). For non-Anthropic\u002Fnon-OpenAI models on OpenRouter, query the live catalog before pinning a default:\n\n```bash\ncurl -sS -H \"Authorization: Bearer $OPENROUTER_API_KEY\" \\\n  https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmodels \\\n  | python3 -c \"import sys,json; d=json.load(sys.stdin); [print(m['id']) for m in d['data'] if '\u003Csubstring>' in m['id'].lower()]\"\n```\n\nVerified GLM family on OpenRouter as of 2026-07-14: `z-ai\u002Fglm-4.5`, `z-ai\u002Fglm-4.5-air`, `z-ai\u002Fglm-4.6`, `z-ai\u002Fglm-4.7`, `z-ai\u002Fglm-4.7-flash`, `z-ai\u002Fglm-5`, `z-ai\u002Fglm-5-turbo`, `z-ai\u002Fglm-5.1`, `z-ai\u002Fglm-5.2`, `z-ai\u002Fglm-5v-turbo`. Note: Codex warns `Model metadata for 'z-ai\u002Fglm-5.2' not found. Defaulting to fallback metadata` even when the model id is correct — the model still works, the warning is metadata-only.\n\n## Pitfall — `unset ANTHROPIC_*` block is upstream of your wrapper\n\n`~\u002F.bashrc` lines 928-933 unconditionally `unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN ANTHROPIC_BASE_URL` so the bare `claude` command uses OAuth\u002Flogin. Your wrapper re-exports them **inline as env-var prefixes on the `claude` invocation**, not via `export`, so the unset is preserved for the parent shell but the spawned `claude` sees them. Do NOT use `export ANTHROPIC_BASE_URL=\"...\"` at shell scope inside the wrapper body — the unset will race-wipe it for sibling commands.\n\n## Pitfall — bashrc globals (`ANTHROPIC_MODEL`, `ANTHROPIC_BASE_URL`) can leak into ANY wrapper layer that uses default-if-unset\n\n`~\u002F.bashrc` deliberately sets `ANTHROPIC_MODEL=\"sonnet\"` globally (line ~939) so the bare `claude` command defaults to sonnet and `claude --model \u003CX>` does not pollute `~\u002F.claude\u002Fsettings.json`. Lines ~928-933 `unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN ANTHROPIC_BASE_URL` so the bare `claude` uses OAuth\u002Flogin. These are inherited by every subprocess launched from a bashrc-sourced shell (pytest, launchd jobs, AO workers, cron via `env -i`, GitHub Actions).\n\nThe **bashrc-function wrapper** is safe by design: it sets every `ANTHROPIC_*` env var **inline as env-var prefixes on the `claude` invocation**, not via `export`. So the bashrc globals are preserved for the parent shell but the spawned `claude` sees the wrapper's values. **No leak.**\n\nThe leak returns the moment you introduce any layer that does `export ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-\u003Cdefault>}\"` or `export ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-\u003Cdefault>}\"`:\n\n- `ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-MiniMax-M3}\"` → returns `\"sonnet\"` (from bashrc) when parent has the default. **Silent model-identity leak** — wrapper answers as `claude-sonnet-5` instead of `MiniMax-M3`, exit 0, no error.\n- `ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-https:\u002F\u002Fapi.minimax.io\u002Fanthropic}\"` → returns `\"\"` (because bashrc line ~930 `unset` it). Endpoint call fails with a 4xx; the failure is loud and easy to diagnose, so this one is less of a foot-gun.\n\n**Symptom verified live 2026-07-28** (the v1.1.0–v1.4.0 era `~\u002Fbin\u002Fclaudem` shim had this bug; the live M3 test caught it on the first run that exercised the slow suite end-to-end from a bashrc-sourced pytest):\n```\n$ env | grep ^ANTHROPIC_MODEL=\nANTHROPIC_MODEL=sonnet\n$ ANTHROPIC_MODEL=sonnet claudem -p \"Output exactly one line: model=\u003Cyour model>\" --max-turns 3\nmodel: claude-sonnet-5          # ← WRONG; should be model=MiniMax-M3\n```\n\n**Fix — force, do NOT default-if-unset.** When you need to introduce a layer that exports env vars (e.g., a binary shim if a future caller cannot use `bash -lic`), use the same pattern the bashrc function uses:\n\n```bash\n# WRONG (silent cross-talk from bashrc global):\nexport ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-\u003CDEFAULT_MODEL>}\"\nexport ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-\u003CDEFAULT_URL>}\"\n\n# RIGHT (mirrors the bashrc function's inline-set pattern):\nexport ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nexport ANTHROPIC_BASE_URL=\"\u003CDEFAULT_URL>\"\n\n# RIGHT with caller override (gated, so bashrc global cannot leak):\nif [[ -n \"${ANTHROPIC_MODEL_OVERRIDE:-}\" ]]; then\n  export ANTHROPIC_MODEL=\"$ANTHROPIC_MODEL_OVERRIDE\"\nelse\n  export ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nfi\n```\n\n`CLAUDE_EFFORT` keeps simple `${VAR:-default}` because bashrc does not export it.\n\n**Audit one-liner — find every wrapper layer with this bug:**\n\n```bash\n# Find any executable wrapper (binary or shim) that uses default-if-unset for bashrc-controlled env vars.\n# Each hit is a silent cross-talk risk.\nrg --hidden -l 'ANTHROPIC_MODEL=.\\$\\{ANTHROPIC_MODEL:-' ~\u002Fbin 2>\u002Fdev\u002Fnull\nrg --hidden -l 'ANTHROPIC_BASE_URL=.\\$\\{ANTHROPIC_BASE_URL:-' ~\u002Fbin 2>\u002Fdev\u002Fnull\n# Bashrc functions are safe (they set inline, not via export). The audit only applies\n# to binary shims, which we no longer ship — these rgs should return zero hits.\n```\n\nVerified clean for `~\u002Fbin\u002F` as of 2026-07-28 (binary removed). The same probe must run on Linux (`ssh jeff-ubuntu 'rg --hidden -l \"ANTHROPIC_MODEL=.\\\\$\\\\{ANTHROPIC_MODEL:-\" ~\u002Fbin'`) for cross-machine parity.\n\n**Class scope:** every wrapper layer in this umbrella that uses default-if-unset for any bashrc-controlled env var (`ANTHROPIC_MODEL`, `ANTHROPIC_BASE_URL`, future globals) is exposed to this bug. Bashrc functions are immune because they set inline; only executable shims are at risk. The `claude-code-claudem` leaf skill documents the M3-specific case in full at `~\u002F.hermes\u002Fskills\u002Fclaude-code-claudem\u002Freferences\u002Fbashrc-global-leak.md`.\n\n## Pitfall — `ANTHROPIC_MODEL=\"sonnet\"` default protects the bare `claude`\n\n`~\u002F.bashrc:939` sets `export ANTHROPIC_MODEL=\"sonnet\"` because `claude` persists `--model` to `~\u002F.claude\u002Fsettings.json` on first run. If you use `claudem` (or any wrapper) and it changes that file, every subsequent bare `claude` run inherits the wrapper's model. Don't remove that `export`. (Captured in `~\u002F.bashrc` comment lines 935-938.)\n\n## Pitfall — User preference: bashrc functions over binary shims (2026-07-28)\n\nUser explicit feedback on the v1.4.0-era `~\u002Fbin\u002Fclaudem` shim: *\"I dont think we should use \u002Fbin\u002Fclaudem or have that and it conflicts with bashrc function maybe we just source bashrc.\"* Encode as a hard rule for this umbrella:\n\n- **Default to bashrc functions, never ship a binary shim by default.** The user's preference is single source of truth (bashrc) over redundant layers. `bash -lic` is the canonical non-interactive invocation; do not preemptively add a `~\u002Fbin\u002F\u003Cwrapper>` shim.\n- **If a future caller cannot use `bash -lic`**, surface that as a class-level question (which caller, why, what env var is missing) before adding any new layer. Do not silently add a shim.\n- **Spelled-out aliases** (`claudeminimax`, `claudedeepseek`, etc.) are also bashrc functions — never binary shims, never second wrappers. `claudem() { … }; claudeminimax() { claudem \"$@\"; }` is the canonical pattern.\n- **Naming convention: no underscores.** Matches `claudeg` \u002F `claudek` \u002F `claudeds` \u002F `claudegz` \u002F `claudem`. The form `claude_minimax` (with underscore) was explicitly rejected.\n\n## Verification — minimum bar before claiming \"done\"\n\nA wrapper is \"done\" only when ALL of these pass:\n\n1. **bash syntax** — `bash -n ~\u002F.bashrc` exits 0; `bash -n ~\u002Fbin\u002F\u003Cshim>` exits 0.\n2. **shim is executable** — `chmod +x ~\u002Fbin\u002F\u003Cshim>`; `file ~\u002Fbin\u002F\u003Cshim>` reports `Bourne-Again shell script`.\n3. **API key reachable** — `openrouter-check` (or equivalent) hits `\u003CPROVIDER>\u002Fauth` and returns 200.\n4. **End-to-end completion** — `claude --print --verbose --output-format=json \"\u003Cprompt>\"` parses out `ASSISTANT_TEXT=\u003Creal answer>` + `IS_ERROR=False` + `STOP_REASON=end_turn` + non-zero `COST`.\n5. **Documentation in bash comment** — every new function has a `# Usage:` block at the top, matching the existing wrappers.\n\nIf only the smoke test 1-3 pass and the verbose parse shows `IS_ERROR=True` or `STOP_REASON` is empty, the wrapper is **not done** — go fix the model id, base URL, or auth conflict before claiming it.\n\n**Codex wrappers on v0.142.3 cannot pass verification step 4** because of the `responses_websocket` transport bypass (see Pitfall below). When wiring `codex\u003Cshort>` on this Codex version:\n- Steps 1-3 + 5 still apply and must pass.\n- Step 4 cannot be met — note this explicitly in the wrapper's bash comment block AND in the smoke-test reply, do not claim \"done\" silently.\n- The minimum honest smoke test is: `(mv ~\u002F.codex\u002Fauth.json ~\u002F.codex\u002Fauth.json.bak; command codex --profile \u003Cwrapper> exec ... 2>&1; mv ~\u002F.codex\u002Fauth.json.bak ~\u002F.codex\u002Fauth.json) | grep -E \"provider:|wss:\u002F\u002Fapi\\.openai\" | head` — confirm the bug rather than blaming your config. If the diagnostic shows `provider: openai` + `wss:\u002F\u002Fapi.openai.com`, report the upstream Codex bug to the user instead of recommending they switch model ids.\n\n## Subagent for parallel provider research\n\nWhen wiring a brand-new provider (not just adding OpenRouter next to the existing 4), spawn one `delegate_task` (or `ao spawn`) per of these in parallel:\n\n1. Probe the provider's API docs for the Anthropic-protocol endpoint and one stable model id.\n2. Probe the provider's API docs for the OpenAI-protocol endpoint and one stable model id.\n3. Probe the provider's auth endpoint (or `auth\u002Fkey` style probe) to confirm the API key works.\n4. Confirm the model id with a real `POST \u002Fv1\u002Fmessages` (or `\u002Fchat\u002Fcompletions`) call returning a 200 with `pong`-style response.\n\nThen wire all four artifacts into the three layers above. Do not skip step 4 — model ids change (`claude-sonnet-4` was retired 2026-06-15) and you will set up a default that 404s on first invocation.\n\n## Common mistakes seen across providers\n\n- **Auth header name** — Anthropic-compat endpoints usually expect `Authorization: Bearer $KEY`, sometimes `x-api-key`. Probe with `curl -I` and check the 401\u002F403 response to read the header name.\n- **Base URL trailing slash** — `\u003Cbase>` and `\u003Cbase>\u002F` are NOT always interchangeable. OpenAI's `OPENAI_BASE_URL` drops trailing slash silently; Anthropic's `ANTHROPIC_BASE_URL` is stricter. Use the form `\u003Chost>` (no trailing slash).\n- **Model id with vs without provider prefix** — OpenRouter accepts `anthropic\u002Fclaude-sonnet-4.5` (correct) AND `claude-sonnet-4.5` (incorrect → 404). Always include the prefix.\n- **Default model deprecated** — `claude-sonnet-4` (unversioned) is slow and warns. Pin to a suffixed version from day one.\n\n## Verification script\n\nBefore declaring any wrapper \"done\", run the full probe recipe — `scripts\u002Fprobe_openrouter.sh` (or its template, adapted to a new provider host) hits auth\u002Fcatalog\u002FAnthropic-protocol\u002FOpenAI-protocol in sequence and exits 0 only when all four return `pong`:\n\n```bash\nscripts\u002Fprobe_openrouter.sh                     # defaults to https:\u002F\u002Fopenrouter.ai\nscripts\u002Fprobe_openrouter.sh https:\u002F\u002Fapi.deepseek.com   # template for a new provider\n```\n\nRequired env: `\u003CPROVIDER>_API_KEY` (for OpenRouter: `OPENROUTER_API_KEY`).\n\n## Support files\n\n- `references\u002Fopenrouter-surfaces.md` — verified probe transcript for `\u002Fapi\u002Fv1\u002Fmessages`, `\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fapi\u002Fv1\u002Fresponses`, plus per-model latency and cost data captured 2026-07-13. Read this before changing a default model id.\n- `references\u002Freasoning-models.md` — reasoning-model probe transcripts (Kimi K3 verified 2026-07-16), the 5-step diagnostic ladder for \"wrapper silently exits\", launch-window 429 backoff pattern, naming convention, and cost data. Read this before wiring a new `claudek`-style wrapper.\n- `templates\u002Fopenrouter-claude-shim.sh` — copy → `~\u002Fbin\u002F\u003Cwrapper>`, fill the `\u003C...>` placeholders, `chmod +x`.\n- `templates\u002Fcodex-profile-config.toml` — copy → `~\u002F.codex\u002F\u003Cwrapper>.config.toml`, fill the `\u003C...>` placeholders.\n- `scripts\u002Fprobe_openrouter.sh` — re-runnable 4-stage probe (auth → catalog → Anthropic → OpenAI). Exit 0 = wrapper is safe.\n- `scripts\u002Fparse_claude_verbose.py` — JSONL parser that extracts `ASSISTANT_TEXT` + `RESULT` metrics from `claude --print --verbose --output-format=json` output. Use this whenever a smoke test returns `exit=0` but appears to print nothing.\n\n## Files referenced (this skill's reference impl)\n\n- `~\u002F.bashrc:1036-1053` — `claudem`\u002F`claudeme`\u002F`claudemc` (Minimax baseline, v1.5.0 added `claudeminimax`\u002F`claudeminimaxc` aliases)\n- `~\u002F.bashrc:953-975` — `claudeds` \u002F `claudedsp` (DeepSeek baseline)\n- `~\u002F.bashrc:1058-1072` — `claudeg` \u002F `claudegc` placeholder (older layout)\n- `~\u002F.bashrc:1171-1196` — `claudek` \u002F `claudekc` (Kimi K3 via OpenRouter, added 2026-07-16)\n- `~\u002F.bashrc:1198-1220` — `claudeg` \u002F `claudegc` (GLM 5.2 via OpenRouter, redefined 2026-07-16; was Z.AI-direct `claudeg` until 2026-07-16)\n- `~\u002F.bashrc:1222-1230` — `claudeo` \u002F `claudeoc` back-compat aliases pointing to `claudeg` (added 2026-07-16)\n- `~\u002F.bashrc:1232-1251` — `claudegz` \u002F `claudegzc` (Z.AI direct glm-5.1; renamed from `claudeg` 2026-07-16 to free the `g` suffix for OpenRouter GLM)\n- `~\u002F.bashrc:570-602` — `codexor` \u002F `codexorc` + `openrouter-check`\n- `~\u002F.bashrc:597-630` — `codexo` \u002F `codexoc` (OpenRouter→GLM 5.2 Codex; subject to v0.142.3 WebSocket bypass)\n- `~\u002F.bashrc:1117-1138` — (older) `claudeo` \u002F `claudeoc` slot, now superseded by the `claudeg` redefinition at line 1198\n- `~\u002F.bashrc:549-558` — base `codex()` function (auto-routes via local proxy)\n- `~\u002F.codex\u002Fcodexor.config.toml` — Codex profile-layer config pattern\n- `~\u002F.codex\u002Fcodexo.config.toml` — Codex profile-layer for GLM 5.2\n\n**No `~\u002Fbin\u002F\u003Cwrapper>` shim baseline.** Previous versions of this skill mandated a binary shim in `~\u002Fbin\u002F` for non-interactive callers. Removed 2026-07-28 (drift bug — see `Pitfall — bashrc globals leak`). Use `bash -lic 'wrapper …'` instead. If a future caller cannot use `bash -lic`, add a `scripts\u002Finstall-\u003Cwrapper>-shim.sh` and document it here — do not preemptively ship shims.\n\n## Beads\n\n- `$USER-3e4o` — Claude Code `-p` silent with reasoning models (Kimi K3). See `references\u002Freasoning-models.md` § \"Bead follow-up\" for scope.\n","# Claude\u002FCodex Third-Party Provider Routing\n\nClass-level recipe for adding a new third-party model provider (Minimax, DeepSeek, GLM, OpenRouter, …) as a Claude Code \u002F Codex CLI shell wrapper, mirroring the existing `claudem`\u002F`claudeds`\u002F`claudeg` family.\n\nThe set already wired on this machine (2026-07-13):\n\n| Wrapper | Provider | Default model | Env path |\n|---|---|---|---|\n| `claudem` | MiniMax | `MiniMax-M3` | `claude` + `ANTHROPIC_*` |\n| `claudeds` | DeepSeek (Anthropic-compat) | `deepseek-v4-flash` | same |\n| `claudeg`  | GLM 5.2 (OpenRouter, Anthropic-protocol) | `z-ai\u002Fglm-5.2` | `ANTHROPIC_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi` |\n| `claudegz` | GLM 5.1 (Z.AI direct, Anthropic-protocol) | `glm-5.1` | `ANTHROPIC_BASE_URL=https:\u002F\u002Fapi.z.ai\u002Fapi\u002Fanthropic` |\n| `claudek`  | Kimi K3 (OpenRouter, Anthropic-protocol) | `moonshotai\u002Fkimi-k3` | see § Reasoning models |\n| `claudeaf` | Agent-F enterprise acct | `sonnet` | `claude` + `CLAUDE_CONFIG_DIR=~\u002F.claude-agent-f` |\n| `claudewa` \u002F `claude2` | WorldArchitect.ai acct | `fable` | `claude` + `CLAUDE_CONFIG_DIR=~\u002F.claude-wa` + Aside u1 dance |\n| `claudeor` | OpenRouter (Anthropic-protocol) | `anthropic\u002Fclaude-sonnet-4.5` | new, this skill |\n| `claudeo`  | (alias → `claudeg`) | `z-ai\u002Fglm-5.2` | back-compat for legacy alias |\n| `codexor`  | OpenRouter (OpenAI-protocol) | `openai\u002Fgpt-5` | broken on v0.142.3, see Pitfall below |\n| `codexo`   | OpenRouter → GLM 5.2 (OpenAI-protocol) | `z-ai\u002Fglm-5.2` | broken on v0.142.3, see Pitfall below |\n\n## Two layers every wrapper must ship\n\nWhen adding a `\u003Cx>` provider to Claude Code AND\u002FOR Codex, ship ONLY the layers that don't have a single-command workaround — skipping any one breaks a class of callers:\n\n1. **Interactive bash function** in `~\u002F.bashrc` (works in shells, AO, PTY sessions, AND any non-interactive caller via `bash -lic 'wrapper …'`).\n2. **(Codex only) profile layer TOML** at `~\u002F.codex\u002F\u003Cwrapper>.config.toml` (so the wrapper doesn't clobber the user's main `~\u002F.codex\u002Fconfig.toml` \u002F trusted-projects \u002F ChatGPT-account config).\n\n> **Why no `~\u002Fbin\u002F\u003Cwrapper>` binary shim?** Previous versions of this skill (v1.4.0 and earlier) mandated a `~\u002Fbin\u002F\u003Cwrapper>` shim for non-interactive callers. The shim was removed 2026-07-28 because (a) it drifted from the bashrc function (`${VAR:-default}` inherited `ANTHROPIC_MODEL=sonnet` from the bashrc global, silently routing to the wrong model), and (b) `bash -lic 'wrapper …'` is a one-token substitution for the binary that needs no second source of truth. If a future caller genuinely cannot use `bash -lic` (none has surfaced on this host), reconsider then — do NOT preemptively ship the shim.\n\n**Verification for non-interactive callers** — every bashrc-function wrapper must work in all four contexts:\n\n```bash\n# 1. Interactive shell (bashrc auto-sourced)\nbash -ic 'type claudem'                # → \"claudem is a function\"\n\n# 2. Login shell (forces bashrc sourcing)\nbash -lic 'type claudem'               # → \"claudem is a function\"\n\n# 3. From Python subprocess\npython3 -c \"import subprocess; print(subprocess.run(['bash','-lic','claudem --version'], capture_output=True, text=True).stdout)\"\n\n# 4. From cron \u002F launchd \u002F env -i\nenv -i bash -lic 'claudem --version'   # → 2.1.220 (Claude Code)\n```\n\nIf any of these returns `claudem: command not found`, the wrapper is missing from `~\u002F.bashrc` — fix the bashrc, do NOT add a binary shim.\n\nNaming convention (verified stable since at least 2026-06):\n- `claude\u003Cshort>` for Claude wrappers (sonnet default), `claude\u003Cshort>c` for `--continue`.\n- `claude\u003Cshort>op` = Opus variant, `claude\u003Cshort>opc` = Opus + continue.\n- `codex\u003Cshort>` for Codex wrappers, `codex\u003Cshort>c` for `resume --last`.\n- The spelled-out alias form is also a bashrc function: `claudem → claudeminimax`, `claudeds → claudedeepseek`, etc. No underscores — matches the family convention (`claudeg`, `claudek`, `claudeds`, `claudegz`, `claudem`). If the user explicitly wants underscores, ask before adding (the family form is the default).\n- `claudeo` is historically taken (legacy alias at `~\u002F.bashrc:686` for `claude --dangerously-skip-permissions --chrome --model opus`). When the user asks for a wrapper by name and the name already exists as either an alias OR an existing function, **deconflict via rename** rather than refuse or silently collide:\n  - If the user's preferred name collides with a legacy **alias**, replace the alias with a function (aliases shadow function definitions, so the alias wins if both exist — confirmed in production). Test by `type -a \u003Cname>` after editing — if it shows both `alias` and `function`, the alias wins and your function is dead code.\n  - If the user's preferred name collides with an existing **function** of a different target, rename the existing function (suffix the model family: `g`→`gz` for \"Z.AI direct\", `o`→`of` for OpenRouter-former, etc.) and free the preferred name. Verified pattern (2026-07-16): user asked for `claudek` (Kimi K3) + `claudeg` (GLM 5.2 via OpenRouter). Existing `claudeg` was wired to Z.AI direct glm-5.1; renamed to `claudegz`\u002F`claudegzc`. Back-compat alias `claudeo() { claudeg \"$@\"; }` preserves the legacy shortcut.\n  - Tested suffixes in active use (2026-07-16): `m`=minimax, `ds`=deepseek, `g`=glm-via-OpenRouter (z-ai\u002Fglm-5.2), `gz`=glm-via-Z.AI-direct (glm-5.1), `k`=kimi (moonshotai\u002Fkimi-k3), `or`=openrouter-with-Anthropic-default, `af`=agent-f.\n\n## Template — Claude wrapper (Anthropic-protocol endpoint)\n\nUse this for any provider that exposes an Anthropic-protocol endpoint (Anthropic-compat): OpenRouter `\u002Fapi`, Minimax `\u002Fanthropic`, DeepSeek `\u002Fanthropic`, Z.AI `\u002Fapi\u002Fanthropic`, etc.\n\n`~\u002F.bashrc` (insert near other Claude wrappers, e.g. right after `claudemc()` at line 1051):\n\n```bash\n# Claude Code via \u003CProvider> (Anthropic-compatible endpoint \u003CBASE_URL>)\n# Usage: claude\u003Cshort> [args]       → \u003CProvider> session, default model \u003CMODEL>\n#        claude\u003Cshort>op [args]     → \u003CProvider> Opus session\n#        claude\u003Cshort>oc [args]     → → --continue\n#        claude\u003Cshort>opc [args]    → Opus + --continue\nclaude\u003Cshort>() {\n  CLAUDE\u003CSHORT>_MODE=1 \\\n  ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\" \\\n  ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_MODEL=\"\u003CMODEL>\" \\\n  CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0 \\\n  claude --dangerously-skip-permissions --effort high \"$@\"\n}\n\nclaude\u003Cshort>op() {\n  CLAUDE\u003CSHORT>_MODE=1 \\\n  ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\" \\\n  ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  ANTHROPIC_MODEL=\"\u003COPUS_MODEL>\" \\\n  CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0 \\\n  claude --dangerously-skip-permissions --effort high \"$@\"\n}\n\nclaude\u003Cshort>oc()  { claude\u003Cshort> --continue \"$@\"; }\nclaude\u003Cshort>opc() { claude\u003Cshort>op --continue \"$@\"; }\n```\n\n`~\u002Fbin\u002Fclaude\u003Cshort>` (executable shim, mirrors `~\u002Fbin\u002Fclaudem`):\n\n> **⚠ DEPRECATED 2026-07-28:** the binary shim pattern was removed in v1.5.0 of the `claude-code-claudem` umbrella skill. The bashrc function form is the source of truth; non-interactive callers (pytest, launchd, AO workers, GitHub Actions) must use `bash -lic 'claude\u003Cshort> …'` to source the bashrc and make the function visible. This block remains as a historical reference for the `default-if-unset vs force` lesson, but the canonical recipe going forward is the bashrc function only.\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# DEPRECATED — see warning above. Real claude\u003Cshort> CLI — \u003CProvider>-routed Claude Code.\n# Historical: Usable from Go AO PATH shims, cron, and non-interactive shells.\nset -euo pipefail\n: \"${\u003CPROVIDER>_API_KEY:?\u003CPROVIDER>_API_KEY must be set (same as ~\u002F.bashrc claude\u003Cshort>)}\"\nexport CLAUDE\u003CSHORT>_MODE=1\n# Force every ANTHROPIC_* var. Do NOT use ${VAR:-default} — bashrc sets\n# ANTHROPIC_MODEL=\"sonnet\" globally (so bare `claude` defaults to sonnet), and\n# a default-if-unset export inherits that global into the wrapper, silently\n# sending the upstream MiniMax-compatible endpoint the wrong model identity.\n# See \"Pitfall — ANTHROPIC_MODEL\u002FANTHROPIC_BASE_URL leak from bashrc into the\n# wrapper shim\" below for the full bug class. If you genuinely want a caller-\n# overrideable model, gate it explicitly so the bashrc global cannot leak:\nif [[ -n \"${ANTHROPIC_MODEL_OVERRIDE:-}\" ]]; then\n  export ANTHROPIC_MODEL=\"$ANTHROPIC_MODEL_OVERRIDE\"\nelse\n  export ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nfi\nexport ANTHROPIC_BASE_URL=\"\u003CBASE_URL>\"\nexport ANTHROPIC_AUTH_TOKEN=\"$\u003CPROVIDER>_API_KEY\"\nexport ANTHROPIC_API_KEY=\"$\u003CPROVIDER>_API_KEY\"\nexport CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL=0\n# CLAUDE_EFFORT defaults to \"high\" but is caller-overridable: this is safe\n# because bashrc does NOT set CLAUDE_EFFORT globally, so the default expansion\n# here is the only fallback path and there is no cross-talk source.\nexport CLAUDE_EFFORT=\"${CLAUDE_EFFORT:-high}\"\nexec claude --dangerously-skip-permissions --effort high \"$@\"\n```\n\nThe override pattern lets callers swap models with `ANTHROPIC_MODEL_OVERRIDE=\u003CX>` without editing the shim, but gates against the bashrc-global cross-talk class. `CLAUDE_EFFORT` keeps simple `${VAR:-default}` because bashrc does not export it.\n\n## Template — Codex wrapper (OpenAI-protocol endpoint)\n\nUse this for Codex, which reads `OPENAI_API_KEY` + `OPENAI_BASE_URL`. Codex v0.142+ has a **known auth conflict** — see §Auth conflict pitfall below.\n\n`~\u002F.bashrc` (insert near other Codex wrappers, around line 568 after `codexsc`):\n\n```bash\n# Codex via \u003CProvider> (OpenAI-compatible \u003CBASE_URL>)\n# Usage: codex\u003Cshort> [args]    → \u003CProvider>-routed Codex, default model \u003CMODEL>\n#        codex\u003Cshort>c [args]   → resume last\n# Layers ~\u002F.codex\u002F\u003Cwrapper>.config.toml on top of the user's main config so\n# their ChatGPT-account config and trusted-projects list stay untouched.\ncodex\u003Cshort>() {\n  OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  OPENAI_BASE_URL=\"\u003CBASE_URL>\" \\\n  command codex --profile \u003Cwrapper> -m \u003CMODEL> --config model_reasoning_effort=high \"$@\"\n}\n\ncodex\u003Cshort>c() {\n  OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\" \\\n  OPENAI_BASE_URL=\"\u003CBASE_URL>\" \\\n  command codex --profile \u003Cwrapper> -m \u003CMODEL> resume --last \"$@\"\n}\n```\n\n`~\u002Fbin\u002Fcodex\u003Cshort>` and `~\u002Fbin\u002Fcodex\u003Cshort>c` (mirror the bash-function pattern):\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Real codex\u003Cshort> CLI — \u003CProvider>-routed Codex via \u003CBASE_URL>.\n# Layers ~\u002F.codex\u002F\u003Cwrapper>.config.toml.\nset -euo pipefail\n: \"${\u003CPROVIDER>_API_KEY:?\u003CPROVIDER>_API_KEY must be set (same as ~\u002F.bashrc codex\u003Cshort>)}\"\nexport OPENAI_API_KEY=\"$\u003CPROVIDER>_API_KEY\"\nexport OPENAI_BASE_URL=\"\u003CBASE_URL>\"\nexec command codex --profile \u003Cwrapper> -m \u003CMODEL> --config model_reasoning_effort=high \"$@\"\n```\n\n`~\u002F.codex\u002F\u003Cwrapper>.config.toml`:\n\n```toml\n# Layered via `codex --profile \u003Cwrapper>` so ChatGPT-account config +\n# trusted projects in the user's main ~\u002F.codex\u002Fconfig.toml stay untouched.\n\nmodel = \"\u003CMODEL>\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[model_providers.\u003Cprovider_short>]\nname = \"\u003CProvider Display Name>\"\nbase_url = \"\u003CBASE_URL>\"\n\nmodel_provider = \"\u003Cprovider_short>\"\n```\n\n## Class — multi-`~\u002F.claude*` account wrappers (different OAuth, same binary)\n\nSibling class to provider routing: instead of routing `claude` to a different **model provider** via `ANTHROPIC_*` env, you route it to a different **Anthropic OAuth account** via `CLAUDE_CONFIG_DIR`. Each `~\u002F.claude*` dir isolates: OAuth credentials, conversation history, MCP servers, and (optionally) settings. On this box (verified live 2026-07-17):\n\n| Wrapper family | Config dir | Model | OAuth | Use for |\n|---|---|---|---|---|\n| `claude` (bare) | `~\u002F.claude` | `sonnet` (default) | $USER tooling | scratch \u002F tooling |\n| `claudewa` \u002F `claude2` (and `*c` variants) | `~\u002F.claude-wa` | `fable` | $USER@your-project.com | WorldArchitect.ai work |\n| `claudeaf` \u002F `claudeafc` | `~\u002F.claude-agent-f` | `sonnet` | jeffrey@agent-f.com | Agnt-F (org Agnt-F) work |\n\nThe bashrc template (~`~\u002F.bashrc:712-731`) is a function that:\n1. Saves the current Aside account via `aside account status` (which prints one line per account, prefixed with `*` for active).\n2. Calls `aside account use \u003Caside-id>` to align the Chrome profile cookies.\n3. Runs `claude` with `CLAUDE_CONFIG_DIR=~\u002F.claude-\u003Caccount> --dangerously-skip-permissions --chrome --model \u003CX> \"$@\"`.\n4. Restores the Aside account on exit (the buggy bit — see Pitfall below).\n\nThe `*c` suffix on the wrapper name is the `--continue` variant — append `--continue` so `--continue` resolves against the account's conversation pool instead of starting fresh.\n\n### Pitfall — `awk '\u002F^\\*\u002F {print $1; exit}'` captures `*` not the account id (Aside stuck on u1 after `claudewa` exits)\n\nThe bashrc restore step is:\n```bash\n_aside_prev=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $1; exit}')\naside account use u1 >\u002Fdev\u002Fnull 2>&1 || true\nCLAUDE_CONFIG_DIR=~\u002F.claude-wa claude --dangerously-skip-permissions --chrome --model fable \"$@\"\nlocal _rc=$?\nif [[ -n \"$_aside_prev\" && \"$_aside_prev\" != \"u1\" ]]; then\n  aside account use \"$_aside_prev\" >\u002Fdev\u002Fnull 2>&1 || true\nfi\n```\n\n`aside account status` output:\n```\n* u0  $USER@gmail.com  signed in  profiles: Profile 0\n  u1  $USER@your-project.com  signed in  profiles: Profile 1\n```\n\n`awk '\u002F^\\*\u002F {print $1; exit}'` extracts `$1` of the line starting with `*`. That field is the literal `*` (the active marker), **not** the account id `u0`. Result: `_aside_prev=\"*\"`, the restore runs `aside account use \"*\"`, Aside CLI rejects with `Account must be a non-negative account id, for example 0 or u0`, the error is swallowed by `>\u002Fdev\u002Fnull 2>&1 || true`, and Aside stays on `u1` after `claudewa` exits — even if it started on `u0`. Verified live 2026-07-17 by reproducing the exact bashrc flow manually.\n\n**Fix:** change `$1` to `$2` (the second whitespace-separated field, which is the account id):\n```bash\n_aside_prev=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}')\n```\n\nOr use `sed -n 's\u002F^\\* \u002F\u002Fp' | awk '{print $1; exit}'` if you want to be more explicit about stripping the marker.\n\n**Workaround until fixed:** after any `claudewa` invocation, manually run `aside account use u0` (or whichever account you want active) to restore.\n\n### Pitfall — `~\u002F.claude-wa\u002F{settings.json,projects}` are symlinks to `~\u002F.claude\u002F`, NOT isolated copies\n\nVerified live 2026-07-17:\n- `~\u002F.claude-wa\u002Fsettings.json` → `~\u002F.claude\u002Fsettings.json` (same permissions\u002Fenv\u002Fhooks)\n- `~\u002F.claude-wa\u002Fprojects\u002F` → `~\u002F.claude\u002Fprojects\u002F` (same conversation history)\n\nSo `claudewac` does **not** find a WA-only conversation pool — `--continue` resolves against the shared `~\u002F.claude\u002Fprojects\u002F` directory. The only things `CLAUDE_CONFIG_DIR=~\u002F.claude-wa` actually isolates are:\n1. OAuth credentials (`.credentials.json`)\n2. Per-account MCP server registrations (`mcp-servers\u002F`, `mcp-strict.json`)\n3. The fact that the bashrc command chose WA's Aside account (`u1`)\n\nIf you genuinely need WA conversations to be isolated from tooling, you must replace the symlink with a real directory + copy\u002Freplay the WA history into it (or stop creating the symlink when bootstrapping a new account). `~\u002F.claude-agent-f\u002F` has concrete files (own `settings.json` with hooks, own `projects\u002F`), so it IS properly isolated.\n\n### Verification recipe for a new account wrapper\n\nBefore declaring a `claudexxx` wrapper \"done\", run the four-layer probe in priority order:\n\n```bash\n# 1. Binary resolution under the config dir\nCLAUDE_CONFIG_DIR=~\u002F.claude-\u003Caccount> timeout 6 claude --version 2>&1 | head -3\n\n# 2. OAuth \u002F auth probe (cheap non-interactive)\ntimeout 10 bash -c 'claudexxx --print --output-format text --model \u003CX> \"reply with just the word pong\"' 2>&1 | tail -5\n\n# 3. --continue target resolution (must find at least one conversation)\nls -la ~\u002F.claude-\u003Caccount>\u002Fprojects\u002F 2>&1 | head -3\n\n# 4. Aside restore round-trip\nSTART=$(aside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}')\nclaudexxx --print \"...\"  # should auto-switch Aside\naside account status 2>\u002Fdev\u002Fnull | awk '\u002F^\\*\u002F {print $2; exit}'\n# If still on u1 and START was different, the awk bug above is biting you\naside account use \"$START\"  # manual restore\n```\n\nStep 4 is the trap — `claudeaf` returned HTTP 401 on this box (2026-07-17) because `~\u002F.claude-agent-f\u002F` has no valid `.credentials.json`. The fix is `node ~\u002F.claude\u002Fscripts\u002Fauth-cli.mjs login --project \u003Caccount>` (or whichever auth script the account ships), but OAuth logins require user approval — don't run them autonomously.\n\n### Verified live 2026-07-17 (test transcript)\n\n| Wrapper | Result | Note |\n|---|---|---|\n| `claudewac --print \"reply with just the word pong\"` | `pong` ✅ | WA account OK |\n| `claudeafc --print \"reply with just the word pong\"` | `401 Invalid authentication credentials` ❌ | Agnt-F needs re-auth via `auth-cli.mjs` |\n| `claude --version` under `CLAUDE_CONFIG_DIR={~\u002F.claude,~\u002F.claude-wa,~\u002F.claude-agent-f}` | `2.1.207 (Claude Code)` (all 3) | binary resolves identically |\n| `aside account use u1` → `aside account use u0` round-trip | works manually; **broken** via `claudewa` because of the awk bug | restore does not actually restore |\n\n## Pitfall — `claude --print` swallows body in non-TTY bash\n\nWhen smoke-testing from `bash -lc`, `claude --print \"\u003Cprompt>\"` may return `exit=0` but produce empty stdout even though the model generated a real answer. Symptom:\n\n```\nrc=0 stderr-bytes=279 stdout-bytes=1\n```\n\nThis is **not a wrapper bug**. The model IS responding. To prove it, use verbose JSON streaming and the canonical parser in `scripts\u002Fparse_claude_verbose.py`:\n\n```bash\nclaude --dangerously-skip-permissions --print --verbose --output-format=json \\\n  \"\u003Cprompt>\" > \u002Ftmp\u002Fc.out 2>\u002Ftmp\u002Fc.err\npython3 scripts\u002Fparse_claude_verbose.py \u003C \u002Ftmp\u002Fc.out\n```\n\nA successful run prints `ASSISTANT_TEXT: 'pong'` (or whatever was asked) and `IS_ERROR=False STOP_REASON=end_turn` — that is the proof the wrapper works end-to-end. The script also exits non-zero if no `result` event is emitted (the symptom of the wrapper actually being broken, not just the stdout-flush quirk).\n\n**Reasoning-model variant (Kimi K3, DeepSeek R1, o1-series, etc., 2026-07-16):** The same silent-exit symptom occurs with reasoning models **even when the model is producing a real answer**, because Claude Code 2.1.207's `-p` non-interactive mode is not threading the model's `thinking`\u002F`redacted_thinking` content blocks through to stdout. Verified with `claudek` (moonshotai\u002Fkimi-k3): the raw API returns `pong-kimi-k3-claudek` in the Anthropic-format `text` block with `stop_reason: end_turn`, but `bash -lic 'claudek -p \"Reply with pong\"'` exits 0 with empty stdout. The same wrapper + same prompt against a non-reasoning model (`claudeor` \u002F `claudeo`) returns \"pong\" normally. Diagnose by hitting `\u002Fv1\u002Fmessages` directly with `curl` (see `scripts\u002Fprobe_openrouter.sh --reasoning`) before assuming the wrapper is broken. Bead: `$USER-3e4o`.\n\n## Pitfall — bash functions aren't exec targets; `timeout \u003CN> \u003Cfunction>` fails\n\nA bash function defined in `~\u002F.bashrc` is *not* on the exec path. From a `bash -lic` shell where the function is loaded, you can call `claudek -p \"...\"` directly — bash resolves it as a function and runs the body. But:\n\n- `timeout 90 claudek -p \"...\"` from a separate shell fails with `timeout: failed to run command 'claudek': No such file or directory`.\n- Same error even inside `bash -lic 'timeout 90 claudek -p \"...\"'` — `timeout` execs the name as a binary.\n\n**The 2026-07-28 fix (canonical):** `timeout` itself is a function-aware bash builtin when called from inside bash, but its child process is `exec`-based. The fix is to call the wrapper as a function inside bash, so bash's function resolution applies:\n\n```bash\n# Works — bash function is resolved by the parent bash, not exec'd\nbash -lic 'timeout 90 claudek -p \"...\"'\n\n# Or with explicit function-resolution:\nbash -lic 'claudek -p \"...\" & pid=$!; (sleep 90; kill $pid 2>\u002Fdev\u002Fnull) & wait $pid'\n```\n\n**DO NOT** revert to the v1.4.0-era \"ship `~\u002Fbin\u002F\u003Cwrapper>`\" workaround. The binary shim was removed 2026-07-28 because it drifted from the bashrc function (default-if-unset vs force ANTHROPIC_MODEL). Bashrc-only is the canonical recipe; the `timeout`-from-non-bash-shell case is solved by `bash -lic`.\n\nSmoke-test command, in priority order:\n\n```bash\n# 1. Best: parse verbose JSON (works for reasoning models too)\nbash -lic 'claudeor --print --verbose --output-format=json \"Reply with exactly the word pong\"' \\\n  | python3 ~\u002F.hermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Fscripts\u002Fparse_claude_verbose.py\n\n# 2. OK for non-reasoning models: direct invocation (function shell only)\nbash -lic 'claudeor --print \"Reply with exactly the word pong\"'\n\n# 3. Timeout + wrapper (must wrap the whole bash -lic call, not just the wrapper):\nbash -lic 'timeout 90 claudeor --print \"...\"'   # ✅\n\n# 4. Wrong — fails with \"No such file or directory\" because timeout execs the name:\ntimeout 90 claudeor --print \"...\"               # ❌\nbash -lic 'timeout 90 claudeor --print \"...\"'   # ❌ (timeout execs from inside bash, function table not in scope)\n```\n\nFor the reasoning-model silent-exit case, option (1) with `--verbose --output-format=json` is the only honest verification — option (2) will print nothing for Kimi K3 even though the API is fine.\n\n## Pitfall — Reasoning models (Kimi K3 \u002F DeepSeek R1 \u002F o1-series) on OpenRouter\n\nReasoning models expose extra content blocks and have provider-level quirks that bite silent wrappers. Verified 2026-07-16 with `moonshotai\u002Fkimi-k3`:\n\n1. **`\u002Fv1\u002Fchat\u002Fcompletions` returns a separate `reasoning` field** on the message, NOT `reasoning_content` (despite some Anthropic-protocol docs implying otherwise). Sample response excerpt:\n   ```json\n   {\n     \"choices\": [{\"message\": {\n       \"content\": \"391\",\n       \"reasoning\": \"17 * 23 = 17 * 20 + 17 * 3 = 340 + 51 = 391.\"\n     }}],\n     \"usage\": {\"completion_tokens_details\": {\"reasoning_tokens\": 56}}\n   }\n   ```\n2. **`\u002Fv1\u002Fmessages` returns 3 content blocks per assistant turn**:\n   ```json\n   \"content\": [\n     {\"type\": \"thinking\", \"thinking\": \"...chain-of-thought...\"},\n     {\"type\": \"text\", \"text\": \"...final answer...\"},\n     {\"type\": \"redacted_thinking\", \"type\": \"redacted_thinking\", \"data\": \"openrouter.reasoning:eyJ0ZX...cHMg\"}\n   ]\n   ```\n   Verify the answer by grepping for `\"type\":\"text\"` not just `\"content\"`.\n3. **Reasoning cannot be disabled** for some providers. Sending `\"reasoning\": {\"enabled\": false}` to Kimi K3 returns `HTTP 400: Reasoning is mandatory for this endpoint and cannot be disabled.` Don't try to silence chain-of-thought — budget `max_tokens` for both reasoning AND answer (≥2× the answer length for safety).\n4. **Upstream rate-limiting at launch.** New reasoning models are usually rate-limited hard for the first days\u002Fweeks. Kimi K3 returned HTTP 429 (`Provider returned error … is temporarily rate-limited upstream … retry_after_seconds=1`) on multiple consecutive calls during launch week (2026-07-16). Implement retry-with-backoff (`retry_after_seconds + jitter`) in any smoke-test script — naive single-shot calls will report spurious failures. See `scripts\u002Fprobe_openrouter.sh` for the retry pattern.\n5. **Default `ANTHROPIC_DEFAULT_HAIKU_MODEL` has no obvious fallback.** When adding a reasoning model, you must explicitly set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to *something* — Claude Code will spawn subagents on the haiku tier, and most reasoning models don't expose a smaller sibling. Either reuse the same heavy model (expensive but works) or pick a known-fast fallback like `z-ai\u002Fglm-4.5-air`. **`claudek` defaults all subagent tiers to `moonshotai\u002Fkimi-k3`** — set `ANTHROPIC_DEFAULT_HAIKU_MODEL` externally if you want a cheaper fallback.\n\n## Pitfall — Codex v0.142.3 ChatGPT-auth conflict\n\nCodex CLI's auth layer wins over env vars: when `~\u002F.codex\u002Fauth.json` has `auth_mode = \"chatgpt\"` (which is the default after `codex login` with a ChatGPT account), Codex ignores `OPENAI_API_KEY` and answers:\n\n> `{\"type\":\"error\",\"status\":400,\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The '\u003Cmodel>' model is not supported when using Codex with a ChatGPT account.\"}}`\n\nTo make `codex\u003Cshort>` actually route through the third-party API:\n- **Either** run `codex logout` first (destroys user's ChatGPT login — irreversible without re-login), OR\n- **Or** ship `~\u002F.codex\u002F\u003Cwrapper>.config.toml` (the profile layer above) AND accept that codexor etc. will still fail at model-list lookup but env-var wiring is correct for any non-ChatGPT-auth environment.\n\nDocument the auth-mode requirement in the wrapper's bash comment block — operators need to know one `codex logout` (or running in a CI\u002Fno-ChatGPT environment) unblocks the wrapper.\n\n## Pitfall — Codex v0.142.3 `responses_websocket` bypasses `model_provider.base_url` (newer than the ChatGPT-auth conflict)\n\nCodex CLI v0.142+ introduced a `responses_websocket` transport that **hard-codes `wss:\u002F\u002Fapi.openai.com\u002Fv1\u002Fresponses` regardless of `[model_providers.\u003Cx>].base_url`** in the profile TOML. Symptom: even after `codex logout` removes the ChatGPT-auth conflict, `codex --profile \u003Cwrapper>` still produces:\n\n```\nERROR codex_api::endpoint::responses_websocket: failed to connect to websocket:\n  HTTP error: 401 Unauthorized, url: wss:\u002F\u002Fapi.openai.com\u002Fv1\u002Fresponses\n```\n\nAnd the resolved config dump prints `provider: openai` (not the provider you configured), with `model: \u003Cyour model id>` — confirming Codex is honoring the model id but routing to api.openai.com anyway.\n\n**Diagnostic — verify the bug, not your config:**\n\n```bash\n# Back up auth.json to neutralize ChatGPT auth, then run with --skip-git-repo-check\nmv ~\u002F.codex\u002Fauth.json ~\u002F.codex\u002Fauth.json.bak\nOPENAI_API_KEY=\"$OPENROUTER_API_KEY\" \\\nOPENAI_BASE_URL=\"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\" \\\ncommand codex --profile codexor -m openai\u002Fgpt-5 \\\n  --config model_reasoning_effort=high exec --skip-git-repo-check \"echo hi\" 2>&1 \\\n  | grep -iE \"model:|provider:|openrouter|wss:\u002F\u002Fapi\\.openai\" | head -10\nmv ~\u002F.codex\u002Fauth.json.bak ~\u002F.codex\u002Fauth.json\n```\n\nIf you see `provider: openai` + `wss:\u002F\u002Fapi.openai.com` even after auth.json is removed, the bug is in Codex v0.142.3 itself, not your wrapper. This was verified 2026-07-14 against `codexor` (openai\u002Fgpt-5), `codexo` (z-ai\u002Fglm-5.2), and both with auth.json backed up — all three produced identical 401s against `api.openai.com`. `codex --help` and `codex exec --help` confirm there is **no** `--base-url` \u002F `--api-base` \u002F `--provider-override` CLI flag in v0.142.3.\n\n**Workarounds (none complete as of 2026-07-14):**\n1. **Downgrade Codex CLI** to a build that uses the legacy `\u002Fv1\u002Fchat\u002Fcompletions` transport and honors `[model_providers.\u003Cx>].base_url`.\n2. **Use the OpenAI-protocol endpoint directly via `curl`** for one-off prompts — bypasses Codex entirely.\n3. **Use `claude\u003Cshort>` instead of `codex\u003Cshort>`** — the `claude` CLI's Anthropic-protocol transport correctly honors `ANTHROPIC_BASE_URL`, so `claudeo`\u002F`claudeor` work end-to-end against OpenRouter while `codexo`\u002F`codexor` cannot.\n\n**Action when you hit this:** the bashrc warning comment already documents the ChatGPT-auth conflict. After this finding, also add a one-liner to any new `codex\u003Cshort>` wrapper's bash comment block noting that v0.142.3's WebSocket transport is broken regardless of auth state, and recommend `claude\u003Cshort>` as the working alternative until upstream fixes.\n\n## Pitfall — OpenRouter model id format\n\nOpenRouter exposes **two** API shapes at the same host:\n\n| Path | Protocol | Used by |\n|---|---|---|\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmessages` | Anthropic-protocol | `claude` wrappers (`ANTHROPIC_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi`) |\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions` | OpenAI-protocol | `codex` wrappers (`OPENAI_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1`) |\n| `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fresponses` | ❌ rejects generic input | do **not** use |\n\nModel IDs go in the form `\u003Cprovider>\u002F\u003Cmodel>` — e.g. `anthropic\u002Fclaude-sonnet-4.5`, `anthropic\u002Fclaude-opus-4.7`, `openai\u002Fgpt-5`, `z-ai\u002Fglm-5.2`. The unversioned `anthropic\u002Fclaude-sonnet-4` is deprecated (returns 11s response, warns \"Claude Sonnet 4 was retired\") — always pin to a suffixed version (`4.5`, `4.7`, etc.). For non-Anthropic\u002Fnon-OpenAI models on OpenRouter, query the live catalog before pinning a default:\n\n```bash\ncurl -sS -H \"Authorization: Bearer $OPENROUTER_API_KEY\" \\\n  https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fmodels \\\n  | python3 -c \"import sys,json; d=json.load(sys.stdin); [print(m['id']) for m in d['data'] if '\u003Csubstring>' in m['id'].lower()]\"\n```\n\nVerified GLM family on OpenRouter as of 2026-07-14: `z-ai\u002Fglm-4.5`, `z-ai\u002Fglm-4.5-air`, `z-ai\u002Fglm-4.6`, `z-ai\u002Fglm-4.7`, `z-ai\u002Fglm-4.7-flash`, `z-ai\u002Fglm-5`, `z-ai\u002Fglm-5-turbo`, `z-ai\u002Fglm-5.1`, `z-ai\u002Fglm-5.2`, `z-ai\u002Fglm-5v-turbo`. Note: Codex warns `Model metadata for 'z-ai\u002Fglm-5.2' not found. Defaulting to fallback metadata` even when the model id is correct — the model still works, the warning is metadata-only.\n\n## Pitfall — `unset ANTHROPIC_*` block is upstream of your wrapper\n\n`~\u002F.bashrc` lines 928-933 unconditionally `unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN ANTHROPIC_BASE_URL` so the bare `claude` command uses OAuth\u002Flogin. Your wrapper re-exports them **inline as env-var prefixes on the `claude` invocation**, not via `export`, so the unset is preserved for the parent shell but the spawned `claude` sees them. Do NOT use `export ANTHROPIC_BASE_URL=\"...\"` at shell scope inside the wrapper body — the unset will race-wipe it for sibling commands.\n\n## Pitfall — bashrc globals (`ANTHROPIC_MODEL`, `ANTHROPIC_BASE_URL`) can leak into ANY wrapper layer that uses default-if-unset\n\n`~\u002F.bashrc` deliberately sets `ANTHROPIC_MODEL=\"sonnet\"` globally (line ~939) so the bare `claude` command defaults to sonnet and `claude --model \u003CX>` does not pollute `~\u002F.claude\u002Fsettings.json`. Lines ~928-933 `unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN ANTHROPIC_BASE_URL` so the bare `claude` uses OAuth\u002Flogin. These are inherited by every subprocess launched from a bashrc-sourced shell (pytest, launchd jobs, AO workers, cron via `env -i`, GitHub Actions).\n\nThe **bashrc-function wrapper** is safe by design: it sets every `ANTHROPIC_*` env var **inline as env-var prefixes on the `claude` invocation**, not via `export`. So the bashrc globals are preserved for the parent shell but the spawned `claude` sees the wrapper's values. **No leak.**\n\nThe leak returns the moment you introduce any layer that does `export ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-\u003Cdefault>}\"` or `export ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-\u003Cdefault>}\"`:\n\n- `ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-MiniMax-M3}\"` → returns `\"sonnet\"` (from bashrc) when parent has the default. **Silent model-identity leak** — wrapper answers as `claude-sonnet-5` instead of `MiniMax-M3`, exit 0, no error.\n- `ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-https:\u002F\u002Fapi.minimax.io\u002Fanthropic}\"` → returns `\"\"` (because bashrc line ~930 `unset` it). Endpoint call fails with a 4xx; the failure is loud and easy to diagnose, so this one is less of a foot-gun.\n\n**Symptom verified live 2026-07-28** (the v1.1.0–v1.4.0 era `~\u002Fbin\u002Fclaudem` shim had this bug; the live M3 test caught it on the first run that exercised the slow suite end-to-end from a bashrc-sourced pytest):\n```\n$ env | grep ^ANTHROPIC_MODEL=\nANTHROPIC_MODEL=sonnet\n$ ANTHROPIC_MODEL=sonnet claudem -p \"Output exactly one line: model=\u003Cyour model>\" --max-turns 3\nmodel: claude-sonnet-5          # ← WRONG; should be model=MiniMax-M3\n```\n\n**Fix — force, do NOT default-if-unset.** When you need to introduce a layer that exports env vars (e.g., a binary shim if a future caller cannot use `bash -lic`), use the same pattern the bashrc function uses:\n\n```bash\n# WRONG (silent cross-talk from bashrc global):\nexport ANTHROPIC_MODEL=\"${ANTHROPIC_MODEL:-\u003CDEFAULT_MODEL>}\"\nexport ANTHROPIC_BASE_URL=\"${ANTHROPIC_BASE_URL:-\u003CDEFAULT_URL>}\"\n\n# RIGHT (mirrors the bashrc function's inline-set pattern):\nexport ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nexport ANTHROPIC_BASE_URL=\"\u003CDEFAULT_URL>\"\n\n# RIGHT with caller override (gated, so bashrc global cannot leak):\nif [[ -n \"${ANTHROPIC_MODEL_OVERRIDE:-}\" ]]; then\n  export ANTHROPIC_MODEL=\"$ANTHROPIC_MODEL_OVERRIDE\"\nelse\n  export ANTHROPIC_MODEL=\"\u003CDEFAULT_MODEL>\"\nfi\n```\n\n`CLAUDE_EFFORT` keeps simple `${VAR:-default}` because bashrc does not export it.\n\n**Audit one-liner — find every wrapper layer with this bug:**\n\n```bash\n# Find any executable wrapper (binary or shim) that uses default-if-unset for bashrc-controlled env vars.\n# Each hit is a silent cross-talk risk.\nrg --hidden -l 'ANTHROPIC_MODEL=.\\$\\{ANTHROPIC_MODEL:-' ~\u002Fbin 2>\u002Fdev\u002Fnull\nrg --hidden -l 'ANTHROPIC_BASE_URL=.\\$\\{ANTHROPIC_BASE_URL:-' ~\u002Fbin 2>\u002Fdev\u002Fnull\n# Bashrc functions are safe (they set inline, not via export). The audit only applies\n# to binary shims, which we no longer ship — these rgs should return zero hits.\n```\n\nVerified clean for `~\u002Fbin\u002F` as of 2026-07-28 (binary removed). The same probe must run on Linux (`ssh jeff-ubuntu 'rg --hidden -l \"ANTHROPIC_MODEL=.\\\\$\\\\{ANTHROPIC_MODEL:-\" ~\u002Fbin'`) for cross-machine parity.\n\n**Class scope:** every wrapper layer in this umbrella that uses default-if-unset for any bashrc-controlled env var (`ANTHROPIC_MODEL`, `ANTHROPIC_BASE_URL`, future globals) is exposed to this bug. Bashrc functions are immune because they set inline; only executable shims are at risk. The `claude-code-claudem` leaf skill documents the M3-specific case in full at `~\u002F.hermes\u002Fskills\u002Fclaude-code-claudem\u002Freferences\u002Fbashrc-global-leak.md`.\n\n## Pitfall — `ANTHROPIC_MODEL=\"sonnet\"` default protects the bare `claude`\n\n`~\u002F.bashrc:939` sets `export ANTHROPIC_MODEL=\"sonnet\"` because `claude` persists `--model` to `~\u002F.claude\u002Fsettings.json` on first run. If you use `claudem` (or any wrapper) and it changes that file, every subsequent bare `claude` run inherits the wrapper's model. Don't remove that `export`. (Captured in `~\u002F.bashrc` comment lines 935-938.)\n\n## Pitfall — User preference: bashrc functions over binary shims (2026-07-28)\n\nUser explicit feedback on the v1.4.0-era `~\u002Fbin\u002Fclaudem` shim: *\"I dont think we should use \u002Fbin\u002Fclaudem or have that and it conflicts with bashrc function maybe we just source bashrc.\"* Encode as a hard rule for this umbrella:\n\n- **Default to bashrc functions, never ship a binary shim by default.** The user's preference is single source of truth (bashrc) over redundant layers. `bash -lic` is the canonical non-interactive invocation; do not preemptively add a `~\u002Fbin\u002F\u003Cwrapper>` shim.\n- **If a future caller cannot use `bash -lic`**, surface that as a class-level question (which caller, why, what env var is missing) before adding any new layer. Do not silently add a shim.\n- **Spelled-out aliases** (`claudeminimax`, `claudedeepseek`, etc.) are also bashrc functions — never binary shims, never second wrappers. `claudem() { … }; claudeminimax() { claudem \"$@\"; }` is the canonical pattern.\n- **Naming convention: no underscores.** Matches `claudeg` \u002F `claudek` \u002F `claudeds` \u002F `claudegz` \u002F `claudem`. The form `claude_minimax` (with underscore) was explicitly rejected.\n\n## Verification — minimum bar before claiming \"done\"\n\nA wrapper is \"done\" only when ALL of these pass:\n\n1. **bash syntax** — `bash -n ~\u002F.bashrc` exits 0; `bash -n ~\u002Fbin\u002F\u003Cshim>` exits 0.\n2. **shim is executable** — `chmod +x ~\u002Fbin\u002F\u003Cshim>`; `file ~\u002Fbin\u002F\u003Cshim>` reports `Bourne-Again shell script`.\n3. **API key reachable** — `openrouter-check` (or equivalent) hits `\u003CPROVIDER>\u002Fauth` and returns 200.\n4. **End-to-end completion** — `claude --print --verbose --output-format=json \"\u003Cprompt>\"` parses out `ASSISTANT_TEXT=\u003Creal answer>` + `IS_ERROR=False` + `STOP_REASON=end_turn` + non-zero `COST`.\n5. **Documentation in bash comment** — every new function has a `# Usage:` block at the top, matching the existing wrappers.\n\nIf only the smoke test 1-3 pass and the verbose parse shows `IS_ERROR=True` or `STOP_REASON` is empty, the wrapper is **not done** — go fix the model id, base URL, or auth conflict before claiming it.\n\n**Codex wrappers on v0.142.3 cannot pass verification step 4** because of the `responses_websocket` transport bypass (see Pitfall below). When wiring `codex\u003Cshort>` on this Codex version:\n- Steps 1-3 + 5 still apply and must pass.\n- Step 4 cannot be met — note this explicitly in the wrapper's bash comment block AND in the smoke-test reply, do not claim \"done\" silently.\n- The minimum honest smoke test is: `(mv ~\u002F.codex\u002Fauth.json ~\u002F.codex\u002Fauth.json.bak; command codex --profile \u003Cwrapper> exec ... 2>&1; mv ~\u002F.codex\u002Fauth.json.bak ~\u002F.codex\u002Fauth.json) | grep -E \"provider:|wss:\u002F\u002Fapi\\.openai\" | head` — confirm the bug rather than blaming your config. If the diagnostic shows `provider: openai` + `wss:\u002F\u002Fapi.openai.com`, report the upstream Codex bug to the user instead of recommending they switch model ids.\n\n## Subagent for parallel provider research\n\nWhen wiring a brand-new provider (not just adding OpenRouter next to the existing 4), spawn one `delegate_task` (or `ao spawn`) per of these in parallel:\n\n1. Probe the provider's API docs for the Anthropic-protocol endpoint and one stable model id.\n2. Probe the provider's API docs for the OpenAI-protocol endpoint and one stable model id.\n3. Probe the provider's auth endpoint (or `auth\u002Fkey` style probe) to confirm the API key works.\n4. Confirm the model id with a real `POST \u002Fv1\u002Fmessages` (or `\u002Fchat\u002Fcompletions`) call returning a 200 with `pong`-style response.\n\nThen wire all four artifacts into the three layers above. Do not skip step 4 — model ids change (`claude-sonnet-4` was retired 2026-06-15) and you will set up a default that 404s on first invocation.\n\n## Common mistakes seen across providers\n\n- **Auth header name** — Anthropic-compat endpoints usually expect `Authorization: Bearer $KEY`, sometimes `x-api-key`. Probe with `curl -I` and check the 401\u002F403 response to read the header name.\n- **Base URL trailing slash** — `\u003Cbase>` and `\u003Cbase>\u002F` are NOT always interchangeable. OpenAI's `OPENAI_BASE_URL` drops trailing slash silently; Anthropic's `ANTHROPIC_BASE_URL` is stricter. Use the form `\u003Chost>` (no trailing slash).\n- **Model id with vs without provider prefix** — OpenRouter accepts `anthropic\u002Fclaude-sonnet-4.5` (correct) AND `claude-sonnet-4.5` (incorrect → 404). Always include the prefix.\n- **Default model deprecated** — `claude-sonnet-4` (unversioned) is slow and warns. Pin to a suffixed version from day one.\n\n## Verification script\n\nBefore declaring any wrapper \"done\", run the full probe recipe — `scripts\u002Fprobe_openrouter.sh` (or its template, adapted to a new provider host) hits auth\u002Fcatalog\u002FAnthropic-protocol\u002FOpenAI-protocol in sequence and exits 0 only when all four return `pong`:\n\n```bash\nscripts\u002Fprobe_openrouter.sh                     # defaults to https:\u002F\u002Fopenrouter.ai\nscripts\u002Fprobe_openrouter.sh https:\u002F\u002Fapi.deepseek.com   # template for a new provider\n```\n\nRequired env: `\u003CPROVIDER>_API_KEY` (for OpenRouter: `OPENROUTER_API_KEY`).\n\n## Support files\n\n- `references\u002Fopenrouter-surfaces.md` — verified probe transcript for `\u002Fapi\u002Fv1\u002Fmessages`, `\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fapi\u002Fv1\u002Fresponses`, plus per-model latency and cost data captured 2026-07-13. Read this before changing a default model id.\n- `references\u002Freasoning-models.md` — reasoning-model probe transcripts (Kimi K3 verified 2026-07-16), the 5-step diagnostic ladder for \"wrapper silently exits\", launch-window 429 backoff pattern, naming convention, and cost data. Read this before wiring a new `claudek`-style wrapper.\n- `templates\u002Fopenrouter-claude-shim.sh` — copy → `~\u002Fbin\u002F\u003Cwrapper>`, fill the `\u003C...>` placeholders, `chmod +x`.\n- `templates\u002Fcodex-profile-config.toml` — copy → `~\u002F.codex\u002F\u003Cwrapper>.config.toml`, fill the `\u003C...>` placeholders.\n- `scripts\u002Fprobe_openrouter.sh` — re-runnable 4-stage probe (auth → catalog → Anthropic → OpenAI). Exit 0 = wrapper is safe.\n- `scripts\u002Fparse_claude_verbose.py` — JSONL parser that extracts `ASSISTANT_TEXT` + `RESULT` metrics from `claude --print --verbose --output-format=json` output. Use this whenever a smoke test returns `exit=0` but appears to print nothing.\n\n## Files referenced (this skill's reference impl)\n\n- `~\u002F.bashrc:1036-1053` — `claudem`\u002F`claudeme`\u002F`claudemc` (Minimax baseline, v1.5.0 added `claudeminimax`\u002F`claudeminimaxc` aliases)\n- `~\u002F.bashrc:953-975` — `claudeds` \u002F `claudedsp` (DeepSeek baseline)\n- `~\u002F.bashrc:1058-1072` — `claudeg` \u002F `claudegc` placeholder (older layout)\n- `~\u002F.bashrc:1171-1196` — `claudek` \u002F `claudekc` (Kimi K3 via OpenRouter, added 2026-07-16)\n- `~\u002F.bashrc:1198-1220` — `claudeg` \u002F `claudegc` (GLM 5.2 via OpenRouter, redefined 2026-07-16; was Z.AI-direct `claudeg` until 2026-07-16)\n- `~\u002F.bashrc:1222-1230` — `claudeo` \u002F `claudeoc` back-compat aliases pointing to `claudeg` (added 2026-07-16)\n- `~\u002F.bashrc:1232-1251` — `claudegz` \u002F `claudegzc` (Z.AI direct glm-5.1; renamed from `claudeg` 2026-07-16 to free the `g` suffix for OpenRouter GLM)\n- `~\u002F.bashrc:570-602` — `codexor` \u002F `codexorc` + `openrouter-check`\n- `~\u002F.bashrc:597-630` — `codexo` \u002F `codexoc` (OpenRouter→GLM 5.2 Codex; subject to v0.142.3 WebSocket bypass)\n- `~\u002F.bashrc:1117-1138` — (older) `claudeo` \u002F `claudeoc` slot, now superseded by the `claudeg` redefinition at line 1198\n- `~\u002F.bashrc:549-558` — base `codex()` function (auto-routes via local proxy)\n- `~\u002F.codex\u002Fcodexor.config.toml` — Codex profile-layer config pattern\n- `~\u002F.codex\u002Fcodexo.config.toml` — Codex profile-layer for GLM 5.2\n\n**No `~\u002Fbin\u002F\u003Cwrapper>` shim baseline.** Previous versions of this skill mandated a binary shim in `~\u002Fbin\u002F` for non-interactive callers. Removed 2026-07-28 (drift bug — see `Pitfall — bashrc globals leak`). Use `bash -lic 'wrapper …'` instead. If a future caller cannot use `bash -lic`, add a `scripts\u002Finstall-\u003Cwrapper>-shim.sh` and document it here — do not preemptively ship shims.\n\n## Beads\n\n- `$USER-3e4o` — Claude Code `-p` silent with reasoning models (Kimi K3). See `references\u002Freasoning-models.md` § \"Bead follow-up\" for scope.\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf","hermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill claude-codex-provider-routing",{"tool":79,"command":80},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill claude-codex-provider-routing",{"tool":82,"command":83},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill claude-codex-provider-routing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002FSKILL.md",true,[87,93,97,101,107,111,117],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fclaude-code-print-silent.md","REFERENCE","参考文档",9989,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Freferences\u002Fclaude-code-print-silent.md",{"path":94,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fopenrouter-surfaces.md",5239,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Freferences\u002Fopenrouter-surfaces.md",{"path":98,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Freasoning-models.md",6990,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Freferences\u002Freasoning-models.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fparse_claude_verbose.py","SCRIPT","脚本",2177,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Fscripts\u002Fparse_claude_verbose.py",{"path":108,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fprobe_openrouter.sh",6446,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Fscripts\u002Fprobe_openrouter.sh",{"path":112,"resourceType":113,"resourceTypeDesc":114,"sizeBytes":115,"sourceHtmlUrl":116},"templates\u002Fcodex-profile-config.toml","OTHER","其他",614,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Ftemplates\u002Fcodex-profile-config.toml",{"path":118,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":119,"sourceHtmlUrl":120},"templates\u002Fopenrouter-claude-shim.sh",727,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fdevops\u002Fclaude-codex-provider-routing\u002Ftemplates\u002Fopenrouter-claude-shim.sh",[122,130,137,145,153,162],{"skillNo":123,"name":124,"nameZh":13,"description":125,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":129},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":131,"name":132,"nameZh":13,"description":133,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":129},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":13,"description":140,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":144},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":146,"name":147,"nameZh":13,"description":148,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":152},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":154,"name":155,"nameZh":13,"description":156,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":157,"licenseFileUrl":158,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":152},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":13,"description":165,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":152},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]