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.
npx agentmods add skills/jjilli/fable-flow/build-patternsnpx skills add jjilli/fable-flow --skill build-patternsgit clone --depth 1 https://github.com/jjilli/fable-flowWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00092 | $0.01310 |
| Opus 5 | $0.00046 | $0.00655 |
| Sonnet 5 | $0.00018 | $0.00262 |
| Haiku 4.5 | $0.00009 | $0.00131 |
Grade A, and why
build-patterns 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Build patterns & seam traps
Field notes from running this pipeline across many rounds of one codebase. The
fable-prompting skill covers how to prompt; this covers what tends to break
and what tends to work when the plan turns into code. None of this overrides the
plan's Contracts — it's the judgment to apply within them.
The core failure mode: green per track, broken at the seam
The single most common real bug that survives per-track testing lives where a track meets something its own unit tests don't exercise: another track's code, or the live runtime. A round can show every track's suite green and still be broken. Prove each round with one real end-to-end run through the actual runtime path, not only the unit suite. Seams unit tests routinely miss:
- Background threads, queues, event loops. The pure function is tested; the wiring that feeds it from the drain thread / worker / async loop is not. Test the dispatch, not just the callee.
- Non-HTTP request scopes. A gate built on an HTTP-only base (e.g. Starlette
BaseHTTPMiddleware) silently skips WebSocket and other scopes — an auth or rate-limit middleware that looks complete can leave the live event socket wide open. Test the socket/stream path explicitly, not justGET /. - Real timing and sampling. A loop gated by wall-clock fps/interval behaves differently under a tight test loop than in production. Make the seam deterministic (inject the clock, feed a fixed frame/event sequence) so the test actually pins the wiring instead of passing by luck.
The architect should name the round's riskiest seam and require a concrete end-to-end check of it; the integration reviewer should assume the seam is the bug until a real run says otherwise.
Reusable patterns (each earned, each made later rounds cheaper)
- Provider-adapter, never-raises. For any optional capability (an AI model, an
external service, a hardware backend): a
make_X(config)factory that NEVER raises when the optional dependency is absent, a single typed error that wraps every failure mode, a lazyimportinside the method, and a zero-dependency default that CI actually exercises. Optional providers degrade to the default; they never crash the pipeline. - Enqueue-only worker. Push heavy or optional work (vision, re-identification,
matching) onto a bounded-queue daemon thread off the hot path.
submit()never blocks and never raises (log-and-drop when full); the stop flag is named so it can't shadow a base-class attribute (_stop_event, not_stop); every failure is logged, never propagated to the caller. - Guarded schema migration.
CREATE TABLE IF NOT EXISTSnever adds a column to a table that already exists. Add new columns at startup withPRAGMA table_infoALTER TABLE ADD COLUMN. When you extend a prune/cascade routine, keep its signature and return type stable so callers and their exact-shape tests don't move.
- Invariant validators that don't break existing input. A newly-added
required-invariant check can reject a config that was valid yesterday. Distinguish
an explicit misconfiguration from a defaulted value the user never set (e.g.
pydantic
model_fields_set): reject the former, clamp/upgrade the latter. Ship compatibility by default, not a startup crash on upgrade. - Contract expansion is additive. When a wire/dict/DB shape gains a field,
exact-equality tests (
set(obj) == KEYS) will break by design. Add the key to the expected set — don't loosen the assertion to>=— and fix the fixtures in the same change. Expect this and budget for it whenever a track widens a shared shape. - Record everything, rate-limit the noise. Persist every event/hit; gate the user-facing notification behind a per-source cooldown so a lingering condition can't storm the user. The record is complete; the interruptions are bounded.
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.
- 2d ago First seen · 89 lines · 92 tokens per session scan A c8d2b4339c56
build-patterns is a skill published in the GitHub repository jjilli/fable-flow (2 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 1,310 once invoked, about $0.0005 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.
Other skills, from other repositories
agent-harness-fault-injection
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
hedging-strategy
Hedging strategy design (beta hedge / option protection / tail risk / cross-asset hedging), including hedge-ratio calculation and cost evaluation.
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
oma-scholar
Scholarly research companion using Knows sidecar spec (.knows.yaml). Generates, validates, reviews, queries, and compares structured research-paper sidecars, and fetches them from knows.academy. Use for academic literature search, survey synthesis, paper authoring assistance, and peer review with token-efficient…
oma-hwp
Convert HWP / HWPX / HWPML files to Markdown using kordoc. Extracts text, headings, tables, lists, images, footnotes, and hyperlinks. Use for Korean word processor files (Hangul), government documents, and AI-ready data preparation.
error-recovery
Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.