Claude Fable Advisor
Use Claude Code to ask Fable 5 for an external opinion only after proving the
Claude process is using first-party claude.ai subscription auth. Treat Fable's
answer as advisory; verify it against local code, tests, docs, and user intent.
Route Rule
Never run a Fable request through Bedrock, Vertex, Foundry, Claude Platform on
AWS, ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, or
claude auth login --console.
Before every live request, use scripts/run_fable_advisor.py. The script:
- strips known provider/API billing variables from the child environment;
- runs Claude in safe mode with an explicit empty strict MCP configuration;
- strips common cloud, GitHub, and app credential environment variables from
tool-enabled runs unless
--inherit-credentials is explicitly supplied;
- runs
claude auth status --json;
- loads a runner-only long-lived subscription token from
$BOTFILES_ROOT/secrets/local/claude-fable-oauth-token when present, without
exporting it to ordinary Claude Code sessions;
- refuses unless the status shows
loggedIn=true, apiProvider=firstParty,
and either a paid claude.ai stored login or an oauth_token credential
loaded from the runner-only subscription token source;
- runs
claude --model fable --effort max -p ... only after the gate passes;
- disables Claude tools by default and writes reusable output artifacts;
- provides
--read-only-review for credential-stripped repository inspection
with Read, Glob, Grep, and narrowly pre-approved read-only Git commands;
- can opt into all default tools with
--with-tools, a bounded allowlist with
--tools "Read,Bash", and full permission bypass with --yolo.
Do not use claude --bare for this workflow. Bare mode skips OAuth/keychain
subscription auth and expects API-key or third-party-provider credentials.
Workflow
Decide whether Fable is worth the quota. Use it for hard planning, design
tradeoffs, proof/logic review, stuck debugging, final risk review, or an
independent critique. Skip it for routine edits or questions a local Codex
pass can answer cheaply.
Write a standalone prompt. Include the goal, constraints, relevant facts,
what has already been tried, and desired output shape. Do not include secrets.
Attach only the files Fable needs. Prefer a small set of source files, diffs,
plans, logs, or status notes over whole-repo dumps.
Run a route-only check when uncertain:
uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/run_fable_advisor.py" \
--check-only \
--output-dir /path/to/artifacts/fable-route-check
For more stable non-interactive authentication, configure the runner-only
long-lived token once from a private terminal:
uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/setup_fable_oauth_token.py"
This invokes claude setup-token, accepts the resulting token through a
hidden prompt, and stores it in the git-ignored machine-local secret file at
mode 0600. Never paste the token into Codex, task artifacts, shell history,
or tracked files. The runner records only oauthCredentialSource, never the
token value.
Run the live advisory request:
uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/run_fable_advisor.py" \
--prompt-file /path/to/fable-prompt.md \
--file /path/to/relevant-file \
--output-dir /path/to/artifacts/fable-review
Add --dry-run first when you want to render prompt.md and status.json
without making a model request.
Choose the tool mode deliberately:
- No tools (default): omit both
--with-tools and --tools.
- Comprehensive read-only repository review: add
--read-only-review.
This is the preferred mode for assessment and code review. It defaults to
12 turns, strips ambient credentials, uses dontAsk, excludes edit tools,
and pre-approves only built-in reads plus selected inspection-only Git
commands.
- Full default tool set with normal permission handling: add
--with-tools.
- Bounded tool set: add a quoted allowlist such as
--tools "Read,Bash".
- Full default tools with all permission checks bypassed: add
--with-tools --yolo.
--yolo maps to Claude Code's --dangerously-skip-permissions and is
rejected unless tools are enabled. Use it only with explicit user approval
or an already-approved implementation scope, from a trusted working
directory, with a narrowly bounded prompt. It does not weaken the
subscription route gate and never enables a cloud-provider fallback.
Safe mode and environment stripping reduce ambient authority but are not a
filesystem or network sandbox. Use --inherit-credentials only when the
approved task explicitly needs those credentials.
Tool-enabled runs default to three agentic turns so Fable can call a tool
and then return its judgment; override with --max-turns when needed.
--read-only-review has its own 12-turn default and rejects --yolo,
--inherit-credentials, --with-tools, and a custom --tools list.
Its Bash allowlist is a procedural permission control, not an operating-
system sandbox. The runner also prepends a strict no-write, no-network,
no-provider-access boundary to the prompt.
Read answer.md, status.json, and stderr.txt from the output directory.
Summarize Fable's advice, state what you accept or reject, and verify any
actionable recommendation locally before changing code.
Output Contract
Each successful or failed run writes:
prompt.md - exact prompt sent to Claude Code after file bundling;
answer.md - stdout from the Fable request;
stderr.txt - stderr from the Claude process;
status.json - route-gate result, command metadata, exit code, and paths.
status.json records whether authentication came from token-file,
environment, or stored-login, without recording the credential itself.
For read-only reviews, status.json also records the permission mode and exact
pre-approved tool rules.
Dry runs omit answer.md and stderr.txt because no model request is made.
Keep these files in the active task artifact folder when the consultation
informs task decisions.
Failure Handling
If the route gate fails, stop. Tell the user the observed authMethod,
apiProvider, and subscriptionType, and ask them to switch Claude Code to
subscription login before continuing. The safe target is:
authMethod=claude.ai
apiProvider=firstParty
subscriptionType=<paid plan>
For the official long-lived token generated by claude setup-token, the safe
target is loggedIn=true, authMethod=oauth_token, and
apiProvider=firstParty. Claude Code currently omits subscriptionType for
this credential form, so accept it only when the runner loaded the explicit
OAuth environment or token-file source.
If claude -p fails after the route gate passes, try one non-model diagnostic
pass such as claude --version, claude --model fable --effort max --help, and
claude auth status --json under the cleaned environment. If those are healthy,
you may use an interactive zellij fallback, but launch Claude through the same
cleaned environment and capture the answer back into task artifacts. Do not
silently switch to Bedrock, API keys, or --console auth.
Prompt Shape
Ask Fable for judgment, not another implementation agent. Good requests include:
- "Review this plan for hidden risks and missing validation."
- "Find the most likely root cause and the next three checks."
- "Challenge this architecture and propose a safer alternative if needed."
- "Act as a final reviewer; list blockers before I hand this off."
Prefer concise, outcome-oriented instructions. Fable is strongest when given the
goal and constraints rather than a long procedural script.
1---2name: claude-fable-advisor3description: Use Anthropic Claude Fable 5 through Claude Code as a subscription-backed external advisor, reviewer, or planner for Codex work. Use when the user asks for Fable, Claude Fable, a Claude advisor/reviewer/planner, a second-model critique, hard planning review, architecture review, debugging strategy review, adversarial completion check, or an Oracle-like consultation that must avoid Bedrock, API keys, and other usage-based routes.4---56# Claude Fable Advisor78Use Claude Code to ask Fable 5 for an external opinion only after proving the9Claude process is using first-party `claude.ai` subscription auth. Treat Fable's10answer as advisory; verify it against local code, tests, docs, and user intent.1112## Route Rule1314Never run a Fable request through Bedrock, Vertex, Foundry, Claude Platform on15AWS, `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_BASE_URL`, or16`claude auth login --console`.1718Before every live request, use `scripts/run_fable_advisor.py`. The script:1920- strips known provider/API billing variables from the child environment;21- runs Claude in safe mode with an explicit empty strict MCP configuration;22- strips common cloud, GitHub, and app credential environment variables from23 tool-enabled runs unless `--inherit-credentials` is explicitly supplied;24- runs `claude auth status --json`;25- loads a runner-only long-lived subscription token from26 `$BOTFILES_ROOT/secrets/local/claude-fable-oauth-token` when present, without27 exporting it to ordinary Claude Code sessions;28- refuses unless the status shows `loggedIn=true`, `apiProvider=firstParty`,29 and either a paid `claude.ai` stored login or an `oauth_token` credential30 loaded from the runner-only subscription token source;31- runs `claude --model fable --effort max -p ...` only after the gate passes;32- disables Claude tools by default and writes reusable output artifacts;33- provides `--read-only-review` for credential-stripped repository inspection34 with `Read`, `Glob`, `Grep`, and narrowly pre-approved read-only Git commands;35- can opt into all default tools with `--with-tools`, a bounded allowlist with36 `--tools "Read,Bash"`, and full permission bypass with `--yolo`.3738Do not use `claude --bare` for this workflow. Bare mode skips OAuth/keychain39subscription auth and expects API-key or third-party-provider credentials.4041## Workflow42431. Decide whether Fable is worth the quota. Use it for hard planning, design44 tradeoffs, proof/logic review, stuck debugging, final risk review, or an45 independent critique. Skip it for routine edits or questions a local Codex46 pass can answer cheaply.472. Write a standalone prompt. Include the goal, constraints, relevant facts,48 what has already been tried, and desired output shape. Do not include secrets.493. Attach only the files Fable needs. Prefer a small set of source files, diffs,50 plans, logs, or status notes over whole-repo dumps.514. Run a route-only check when uncertain:5253 ```bash54 uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/run_fable_advisor.py" \55 --check-only \56 --output-dir /path/to/artifacts/fable-route-check57 ```5859 For more stable non-interactive authentication, configure the runner-only60 long-lived token once from a private terminal:6162 ```bash63 uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/setup_fable_oauth_token.py"64 ```6566 This invokes `claude setup-token`, accepts the resulting token through a67 hidden prompt, and stores it in the git-ignored machine-local secret file at68 mode `0600`. Never paste the token into Codex, task artifacts, shell history,69 or tracked files. The runner records only `oauthCredentialSource`, never the70 token value.71725. Run the live advisory request:7374 ```bash75 uv run python "$HOME/pro/botfiles/codex/skills/claude-fable-advisor/scripts/run_fable_advisor.py" \76 --prompt-file /path/to/fable-prompt.md \77 --file /path/to/relevant-file \78 --output-dir /path/to/artifacts/fable-review79 ```8081 Add `--dry-run` first when you want to render `prompt.md` and `status.json`82 without making a model request.83846. Choose the tool mode deliberately:8586 - No tools (default): omit both `--with-tools` and `--tools`.87 - Comprehensive read-only repository review: add `--read-only-review`.88 This is the preferred mode for assessment and code review. It defaults to89 12 turns, strips ambient credentials, uses `dontAsk`, excludes edit tools,90 and pre-approves only built-in reads plus selected inspection-only Git91 commands.92 - Full default tool set with normal permission handling: add93 `--with-tools`.94 - Bounded tool set: add a quoted allowlist such as95 `--tools "Read,Bash"`.96 - Full default tools with all permission checks bypassed: add97 `--with-tools --yolo`.9899 `--yolo` maps to Claude Code's `--dangerously-skip-permissions` and is100 rejected unless tools are enabled. Use it only with explicit user approval101 or an already-approved implementation scope, from a trusted working102 directory, with a narrowly bounded prompt. It does not weaken the103 subscription route gate and never enables a cloud-provider fallback.104 Safe mode and environment stripping reduce ambient authority but are not a105 filesystem or network sandbox. Use `--inherit-credentials` only when the106 approved task explicitly needs those credentials.107 Tool-enabled runs default to three agentic turns so Fable can call a tool108 and then return its judgment; override with `--max-turns` when needed.109 `--read-only-review` has its own 12-turn default and rejects `--yolo`,110 `--inherit-credentials`, `--with-tools`, and a custom `--tools` list.111 Its Bash allowlist is a procedural permission control, not an operating-112 system sandbox. The runner also prepends a strict no-write, no-network,113 no-provider-access boundary to the prompt.1141157. Read `answer.md`, `status.json`, and `stderr.txt` from the output directory.116 Summarize Fable's advice, state what you accept or reject, and verify any117 actionable recommendation locally before changing code.118119## Output Contract120121Each successful or failed run writes:122123- `prompt.md` - exact prompt sent to Claude Code after file bundling;124- `answer.md` - stdout from the Fable request;125- `stderr.txt` - stderr from the Claude process;126- `status.json` - route-gate result, command metadata, exit code, and paths.127128`status.json` records whether authentication came from `token-file`,129`environment`, or `stored-login`, without recording the credential itself.130131For read-only reviews, `status.json` also records the permission mode and exact132pre-approved tool rules.133134Dry runs omit `answer.md` and `stderr.txt` because no model request is made.135136Keep these files in the active task artifact folder when the consultation137informs task decisions.138139## Failure Handling140141If the route gate fails, stop. Tell the user the observed `authMethod`,142`apiProvider`, and `subscriptionType`, and ask them to switch Claude Code to143subscription login before continuing. The safe target is:144145```text146authMethod=claude.ai147apiProvider=firstParty148subscriptionType=<paid plan>149```150151For the official long-lived token generated by `claude setup-token`, the safe152target is `loggedIn=true`, `authMethod=oauth_token`, and153`apiProvider=firstParty`. Claude Code currently omits `subscriptionType` for154this credential form, so accept it only when the runner loaded the explicit155OAuth environment or token-file source.156157If `claude -p` fails after the route gate passes, try one non-model diagnostic158pass such as `claude --version`, `claude --model fable --effort max --help`, and159`claude auth status --json` under the cleaned environment. If those are healthy,160you may use an interactive zellij fallback, but launch Claude through the same161cleaned environment and capture the answer back into task artifacts. Do not162silently switch to Bedrock, API keys, or `--console` auth.163164## Prompt Shape165166Ask Fable for judgment, not another implementation agent. Good requests include:167168- "Review this plan for hidden risks and missing validation."169- "Find the most likely root cause and the next three checks."170- "Challenge this architecture and propose a safer alternative if needed."171- "Act as a final reviewer; list blockers before I hand this off."172173Prefer concise, outcome-oriented instructions. Fable is strongest when given the174goal and constraints rather than a long procedural script.