Make Opus 4.8 — or any Claude model — work like Claude Fable 5. A Claude Code skill plus guard hooks that give a non-frontier model Fable-5-grade work discipline: plan-gate, self-verification, and sub-agent routing, enforced mechanically.
$ npx -y skills add cozytab/fable5-mode --agent claude-code
What's inside
English | 简体中文
Make Opus 4.8 — or any Claude model — work like Claude Fable 5. A Claude Code skill plus guard hooks that give a non-frontier model Fable-5-grade work discipline: plan-gate, self-verification, and sub-agent routing, enforced mechanically.
The skill is invoked as fable-mode; its premise:
output quality = model capability × work discipline
# 1. Install the skill (honors CLAUDE_CONFIG_DIR; falls back to ~/.claude)
git clone https://github.com/cozytab/fable5-mode \
"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode"
# 2. (optional) register the enforcement hooks — merges into your settings.json,
# resolves its own path, idempotent:
bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/install.sh"
# 3. In Claude Code, just ask for it — in any language:
"use fable mode" · "用 fable 模式" · "do this rigorously, one-shot"
# 4. For a project you're taking seriously, turn on enforcement:
mkdir .fable
printf -- '- [ ] 1. first card (with a machine-checkable acceptance test)\n' > .fable/LEDGER.md
The skill works on its own; step 2 is optional (it turns the discipline into hard blocks). Claude replies in your language even though the skill is authored in English.
Why it exists. Weaker models mostly don't fail by being dumb in the moment; they fail by process: thinking while typing and changing their mind halfway, declaring "looks right" without running anything, fanning work out with no verification, and quietly stopping mid-task. Those are process failures, and process is fixable with structure. Since the "discipline half" of frontier output is model-independent, you can hand a cheaper model the working habits of a stronger one and recover a real chunk of the gap — paying in orchestration steps instead of a bigger model.
What you actually get.
What it does not do. It won't turn Opus into Fable 5. It closes the discipline gap, not the capability gap. The cost is real — more orchestration steps and slower wall-clock on small tasks — which is exactly why you don't use it on small tasks. (Net token cost depends on the task; on rework-prone work the discipline can even come out lower.)
| # | Lever | What it forces |
|---|---|---|
| 1 | Plan Gate | Write docs/SPEC.md (requirements + approach + task cards, each with a machine-checkable acceptance test) before writing code. Concentrate thinking in the cheapest phase. |
| 2 | Small-card execution | Each card runs in a fresh context; don't advance until its acceptance command passes; on 2 failures, escalate instead of flailing. |
| 3 | Adversarial self-check | Don't "generate and ship." Dispatch independent viewpoints to refute critical output; for wide-open problems, generate N approaches + judge + synthesize. |
| 4 | Real-product verification | All-green static checks ≠ it works. Run the real product end-to-end each milestone and leave evidence (screenshots, logs, test output). |
| 5 | Context hygiene | SPEC + PROGRESS are external memory. Restore state by re-reading them, not by dragging failed-attempt reasoning through a bloated context. |
| 6 | Checkpoint autonomy | Long background tasks get a watchdog and resumable checkpoints, so a hang or crash costs at most one card. |
The full protocol lives in SKILL.md — the text Claude actually reads.
Six levers written as prose still rely on the model's honor. Four hooks turn the most-shirked rules into hard blocks:
| Hook | Event | Effect |
|---|---|---|
| Profile Injector | SessionStart | Auto-injects the discipline, sized to the ledger state — full during an active round, a one-liner when idle or paused — plus the model-appropriate tier and open-item recovery. |
| Spawn Guard | PreToolUse (Agent/Task/Workflow) | Blocks a detailed spawn before a ledger exists (forces the plan gate), and blocks any spawn requesting a model stronger than the session's — the model ceiling is mechanical, not just prose. |
| Fail-Streak Reminder | PostToolUse (Bash) | Advisory, never blocks: at every 3rd consecutive failing command it injects the attribution ladder (suspect the harness → prove the new code is running → only then debug the product, and fix the class via an invariant) — cures grinding on the wrong layer. |
| Close Guard | Stop | Blocks ending the turn while the ledger still has unchecked items — cures early stopping / spinning. Also enforces evidence-on-close: a - [x] card without an -- evidence: note blocks the stop ("report evidence, not adjectives" as a hard rule). |
Plus hooks/fable_lint.py — not a hook but a one-shot CLI: checks the SPEC
carries [measured]/[inferred]/[not-shown] source tags, every open card names
its acceptance, every closed card carries evidence. Run it at wrap-up (or in CI):
python3 hooks/fable_lint.py <project_dir>.
Design properties that make this safe to register globally:
.fable/ directory (searched upward, bounded at
the git root). No .fable/ → the hooks pass through silently. They never touch
projects you didn't opt in.stop_hook_active, so you're never trapped.See hooks/README.md for the mechanics.
Prerequisites: Claude Code, and python3
(standard library only — no third-party deps; needed only if you use the hooks).
Hooks assume a POSIX environment (macOS / Linux / WSL) where python3 is on
PATH; on native Windows the skill itself still works, but the mechanical
enforcement layer is untested there — treat it as protocol-only.
Your Claude config directory is $CLAUDE_CONFIG_DIR if that variable is set,
otherwise ~/.claude. Everything below derives from it, so it works no matter
where your config lives.
git clone https://github.com/cozytab/fable5-mode \
"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode"
bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/install.sh"
install.sh resolves its own location (so the hook paths are correct no
matter where you cloned it), honors CLAUDE_CONFIG_DIR, and merges the four
hooks into your settings.json without disturbing existing config. It's
idempotent — re-run it after moving the skill and it re-points the paths. Remove
the hooks any time with bash install.sh --uninstall.
Or just tell Claude Code:
Install the skill at https://github.com/cozytab/fable5-mode by following its README.
Updating: after git pull, re-run install.sh. A new version can add hook
events (e.g. a PostToolUse hook), and only the installer updates your
settings.json — a plain git pull ships the files but won't register new
hooks. It's idempotent, so re-running is always safe.
Note: hook registration (install or update) takes effect from your next Claude Code session — settings are read at session start, so restart or open a new session after running the installer.
Clone as above, then merge these four entries into the hooks object of
<config-dir>/settings.json (don't overwrite the file; if you already have a
hooks key, add these under it). Use the absolute path to where you actually
cloned it — the ${CLAUDE_CONFIG_DIR:-$HOME/.claude} below is expanded by the
shell at hook-run time:
"hooks": {
"SessionStart": [{"hooks": [{"type": "command",
"command": "python3 ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/hooks/fable_profile_inject.py"}]}],
"PreToolUse": [{"matcher": "Agent|Task|Workflow",
"hooks": [{"type": "command",
"command": "python3 ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/hooks/fable_spawn_guard.py"}]}],
"PostToolUse": [{"matcher": "Bash",
"hooks": [{"type": "command",
"command": "python3 ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/hooks/fable_fail_streak.py"}]}],
"Stop": [{"hooks": [{"type": "command",
"command": "python3 ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/hooks/fable_close_guard.py"}]}]
}
The skill alone is enough to trigger fable-mode by asking for it; skip the hooks if you only want the protocol.
When a user asks you to install fable-mode from this repo:
$CLAUDE_CONFIG_DIR if set, else ~/.claude.git clone the repo into <config-dir>/skills/fable-mode.bash <config-dir>/skills/fable-mode/install.sh — it merges the hooks
idempotently and resolves paths itself. If you instead register hooks by
editing settings.json yourself, merge into the existing hooks object
(never overwrite the file) and use the absolute clone path — do not
hardcode ~/.claude if the user relocated their config..fable/ directory.Trigger the skill by asking for it by name — "use fable mode", "work like
Fable 5", "rigorous mode", or the Chinese equivalents ("用 fable 模式",
"严谨模式"). It deliberately does not auto-trigger just because a task is
big or important — no surprise process tax; at most it may offer to enable
itself. The other explicit path is a project armed with .fable/, where the
hooks carry the discipline in automatically.
Enable the mechanical enforcement on a project you're taking seriously:
mkdir .fable
cat > .fable/LEDGER.md <<'EOF'
- [ ] 1. first card (with a machine-checkable acceptance test)
- [ ] 2. second card
EOF
From then on, in that project: sessions auto-load the discipline and the right
tier; you can't dispatch a detailed agent without a ledger; you can't end a turn
with unchecked cards. Mark cards - [x] (done + verified) or
- [~] ... -- deferred: reason to close them. To turn enforcement off, check
everything or rm -rf .fable.
Project hygiene: add .fable/ to your project's .gitignore — it's this
round's working state, not history. docs/SPEC.md and docs/PROGRESS.md are
durable project documents: commit those (unless you prefer them private).
Big project, small tasks? Enforcement is per-round, not per-keystroke:
with all cards closed (idle) the guards stay quiet and quick fixes flow freely
with near-zero injection. Mid-round, drop a PAUSED: reason line into
.fable/LEDGER.md to do unrelated work without being nagged (the model ceiling
stays active); remove it to resume the round.
fable-mode's concurrency isn't a fixed number.
The multitasking rule applies in both tiers: independent tool calls are batched into one message, and independent side-tasks (searches, verification runs, bulk mechanical work) run as background subagents while the main thread
FAQ
fable5-mode is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes fable5-mode. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it