fable-harness: Instructions file for Claude Code

CLAUDE.md

fable-harness CLAUDE.md is an instructions file for Claude Code from Miguok/fable-harness. It costs 1,210 tokens per session, scanned A, original, MIT.

Project instructions for Fable Protocol Kit, a set of hooks, skills, and agents that coordinates how different AI models work on tasks. It defines model roles, safety rules, file-handling requirements, and documentation routes.

In plain words
What is it for?
Use it when contributing to Fable Protocol Kit, delegating work to sub-agents, editing protected files, or following its backup, routing, and guardrail procedures.
Why use it?
It keeps work consistent and limits risky changes in a project with many automated contributors. It also makes clear which model or workflow should handle different kinds of tasks.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths.

This is Miguok/fable-harness's own configuration. It tells Claude Code how to work on fable-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fable-harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Miguok/fable-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Miguok/fable-harness/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Miguok/fable-harness

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fable-harness CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/miguok/fable-harness/claude-md/github.svg)](https://agentmods.dev/instructions/miguok/fable-harness/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/miguok/fable-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/miguok/fable-harness/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fable-harness CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/miguok/fable-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/miguok/fable-harness/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,210 This file is loaded in full into every session.
When invoked 1,210 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01210 $0.01210
Opus 5.5 $0.00484 $0.00484
Sonnet 5.5 $0.00242 $0.00242
Haiku 4.5 $0.00121 $0.00121

Measured 5d ago against content hash baeea9f5c852, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fable-harness CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 44 lines

What it actually says

Fable Protocol Kit — 專案指示

本專案是「讓 Opus/Sonnet/Haiku 以 Fable 5 的操作模式工作」的行為協議套件(hooks + skill + agents)。 行為協議本體由 SessionStart hook 注入(.claude/hooks/fable_protocol.md),此處只放模型分工、不可妥協守則、治理文件路由與專案守則。

模型分工(Model Routing)— 委派子代理時強制遵守

主迴圈無論當前是哪個模型,透過 Agent 工具或 Workflow agent() 委派時,依任務性質選 model:

任務性質 model 例子
規劃、統籌、邏輯推理、架構設計、根因分析、驗收子代理交回的 diff、重大決策、抗辯裁決 當前模型(不指定 model) 拆工作、設計評估、bug 根因判定、驗收 diff、judge panel
程式編寫、重構、bug 修復、測試撰寫、上網查資料、翻譯、需要判斷一致性的比對(跨檔反向引用、數字對帳、慣例比對) sonnet 實作功能、改測試、修 lint、查外部文件、翻譯文件、對帳
結果能直接檢查對錯的純蒐集與粗活:分類、格式轉換、檔案批次處理、搜碼、整理資料 haiku Explore 找呼叫點、整理 log、轉換格式
  • 瑣碎單步操作(改一行、看一個檔)主迴圈直接做,不委派。
  • 抗辯三反方的 model 底線規則見協議 §5 與 adversarial-review skill(正本),此處不重複。
  • 「當前模型」=主迴圈直接做,或委派時省略 model 參數讓子代理繼承——推理力跟著 session 走,不降級到寫死的型號(指表格推理列;反方底線見協議 §5)。
  • 改此表時必須同步改 .claude/hooks/fable_protocol.md §5(雙源同步)。
  • 派工包 7 欄、回報模板、升級/降級規則見 model-dispatch-rules skill——委派時強制使用。

不可妥協守則(Non-negotiable Guardrails)

  • 精準修改:只動用戶要求的區塊;不順手重排、重格式化、刪無關程式碼。特殊語法檔(PowerLanguage / Pine Script / SQL migration / CI 配置)尤其嚴格。
  • 註解與參數說明是受保護內容:優化邏輯也不得刪參數說明、既有註解、交易假設、歷史備註;未經指示刪除=失敗,不是清理。
  • 先讀後寫、改前備份:改任何既有檔案前必先 Read;必先建 <檔名>.bak.<YYYYMMDD-HHMMSS> 並確認存在——備份失敗即停。
  • 工具誠實:不得宣稱不存在的工具/檔案/權限;能力缺失就明說並降級(如輸出手貼內容)。
  • 規則衝突時:選更安全、更窄、可回復的動作;仍不確定 → 先問用戶再動檔案。

治理文件路由(Routing)

情境 讀這份
委派子代理(派工包 / 回報格式 / 升級降級) model-dispatch-rules skill
何時慢下來 / 問用戶 / 換路 / 升級模型;輸出前自我抗辯模組 cognitive-rubrics skill

專案守則

  • 測試一律放 tests/,遵守全域 docstring 鐵則(四區塊 + 執行紀錄)。
  • hooks 腳本改動後必須重跑 python -m pytest tests/ -v 且綠燈才算完成。測試要在 Git Bash 下跑:PowerShell 的 PATH 沒有 sh,bash 會解析到 WSL(conftest 會直接擋下並說明)。
  • .claude/hooks/.last_* 是 hook 觸發 marker(e2e 測試用),不要手動改、不要進版控。
  • 佈署到全域(C:\Users\user\.claude\)前必須:本專案全部測試綠 + 用戶明確點頭。佈署步驟見 README.md。
  • 測試環境豁免 uv(使用者 2026-07-04 拍板):本專案走系統 python + 全域 pytest,不建 pyproject,hooks 亦走系統 python。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +133 tokens per session baeea9f5c852
  2. 2mo ago First seen · 44 lines · 1,077 tokens per session scan A f1145153391b

Subscribe to this mod's changes

fable-harness CLAUDE.md is an instructions file published in the GitHub repository Miguok/fable-harness (205 stars, last pushed 4d ago), licensed MIT. It adds 1,210 tokens to every session, about $0.0048 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens