agent-design

agent-design is a skill for Claude Code, Codex from tienenwu/fables. It costs 75 tokens per session (1,247 once invoked), scanned A, original, MIT.

A guide for designing custom coding agents, which are specialized assistants for repeated development tasks. It covers when an agent is justified, what tools it may use, and what its output must contain.

In plain words
What is it for?
Use it to create, audit, or rewrite agent definitions, choose tool and model limits, and investigate agents that repeatedly go off scope.
Why use it?
It helps prevent agents from working outside their assigned task, using excessive access, or returning unclear results. It also helps decide when a normal general-purpose agent is enough.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tienenwu/fables/agent-design
Any agent
npx skills add tienenwu/fables --skill agent-design
Clone the repo
git clone --depth 1 https://github.com/tienenwu/fables

Made for: Claude Code, Codex.

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 agent-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/tienenwu/fables/agent-design.svg)](https://agentmods.dev/skills/tienenwu/fables/agent-design)
Your own site
<a href="https://agentmods.dev/skills/tienenwu/fables/agent-design"><img src="https://agentmods.dev/badge/skills/tienenwu/fables/agent-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00075 $0.01247
Opus 5 $0.00037 $0.00624
Sonnet 5 $0.00015 $0.00249
Haiku 4.5 $0.00007 $0.00125

Measured 4d ago against content hash 2590b735d16b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-design 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 4d 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.

agent-design/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🌐 English version · 繁體中文(正本 / canonical)

Agent 設計判準(agent-design)

定位:dispatching-subagents 管怎麼 agent,本 skill 管怎麼 agent。 核心認知:agent 定義是給弱模型的合約,不是履歷。「你是 15 年經驗的專家」一句就夠, 真正決定行為的是:負面邊界、工具白名單、輸出契約。

核心原則

  1. 預設不建新 agent:general-purpose + 派工三件套 + 對應 playbook skill 已覆蓋八成需求。
  2. 人設 ≤2 行,邊界才是本體:能力清單(「你會 A、B、C」)對行為幾乎無約束力;「你不做 X、做到 Y 為止」才有。
  3. 工具白名單是機器強制的邊界:建議型 agent 給 All tools=把「希望它不亂改」放在最弱的紀律層。
  4. 沒有輸出契約的 agent 會把整個過程倒回主對話——每個 agent 必有 Output Format。

開工分流

情境 路徑 先讀
想建新 agent 先過「該不該存在」三問,過了才寫 references/design-criteria.md §1
審計/整修既有 agent 逐個跑四件套檢查表 references/design-criteria.md §2
選 tools / model 查最小權限表與 tier 對應 references/design-criteria.md §3–4
新 agent 上線前 逐條跑必查清單 references/release-checklist.md

「該不該存在」三問(全部否 → 不建,用 general-purpose)

  1. 這個 agent 的系統 prompt 是否帶來穩定的行為差異?(如審查者的對抗立場、驗證者的不信任預設——這種「立場」值得固化)
  2. 是否需要工具白名單限制它?(唯讀審查、禁改檔的建議者——需要機器強制就值得建)
  3. 是否高頻重複委派同型任務,每次手寫 prompt 成本高?
  • ❌ 「Flutter 專家 agent」——知識型人設。知識已在 playbook skill 裡,general-purpose 被指示「先讀 flutter-dev-playbook」效果相同,多一個 agent 只是多一個選擇困難。
  • ✅ 「code-reviewer agent」——對抗立場(不信任實作者)+ 唯讀白名單 + 高頻使用,三問全過。

紅線(絕對禁止)

  • 禁止建議/審查型 agent 拿到 Edit/Write——它的產出是意見,能改檔案的意見遲早變成未經授權的改動。
  • 禁止沒有 Output Format 的 agent 定義——回報格式缺失的代價由每一次委派支付。
  • 禁止只有能力清單、零負面邊界的定義——那不是 agent,是慫恿。
  • 測試類 agent 的定義裡必須寫死「禁止為了變綠改鬆斷言/skip」——這條紅線不寫進合約,弱模型在 CI 壓力下必犯。
  • 禁止人設段落超過 2 行——多出來的字是 token 稅,不是能力。

失敗訊號(該回頭,不是重試)

徵兆 多半是 修法
兩個 agent 的 description 對同一任務都成立 定位踩線 合併,或寫互鎖條款(「X 移交給 Y」)
委派結果總是倒回全過程流水帳 輸出契約缺失 補 Output Format + 回報合約
agent 清單 >10 個、每次選擇都要想 建太多了 跑三問淘汰,知識型的降級為 playbook skill
agent 老是做超出請求的事 零負面邊界 補「不做什麼」≥3 條

references 索引

  • references/design-criteria.md — 三問詳解、四件套檢查表、tools 最小權限表、model tier、正反例對照。造/審 agent 前讀。
  • references/release-checklist.md — 新 agent 上線前逐條必查。
  • references/test-scenarios.md — 判準測驗集。不給執行中的模型讀。

Read the full file on GitHub · 61 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 61 lines · 75 tokens per session scan A 2590b735d16b

Subscribe to this mod's changes

agent-design is a skill published in the GitHub repository tienenwu/fables (4 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,247 once invoked, about $0.0004 per session on Opus 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-31.