Skip to content
Back to skills

Fable Cheap

ASecurity

Cost and safety rules for long or multi-file coding and build tasks (new apps, emulators, runtimes, desktop or web apps, refactors across many files), especially when running on Claude Fable models. Use whenever a task will take many tool calls, write or edit several files, start servers or background agents, or handle untrusted input such as archives, images, device replies, network data or stored secrets.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
ai-agentsrustgosqlnodetestingdebuggingapidatabasebackendsecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add aicodeking/Fable-Cheap --skill fable-cheap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fable Cheap?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fable Cheap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodeking-fable-cheap/badge)](https://www.skillsdirectory.com/skills/aicodeking-fable-cheap)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fable-cheap
description: Cost and safety rules for long or multi-file coding and build tasks (new apps, emulators, runtimes, desktop or web apps, refactors across many files), especially when running on Claude Fable models. Use whenever a task will take many tool calls, write or edit several files, start servers or background agents, or handle untrusted input such as archives, images, device replies, network data or stored secrets.
---

# Fable-Cheap

Rules for long builds. They target habits measured in a real benchmark run:
too many whole-file rewrites, too many rereads, unrequested scope, abandoned
background agents, and testing like a builder instead of an attacker.

Follow every rule below unless the user explicitly says otherwise.

## 1. Edit, don't rewrite

- Use **Edit** for any change to an existing file.
- Use **Write** only for new files, or when you are replacing almost all of a file.
- Never rewrite a whole file to change a few lines or to "clean it up".

Why: output tokens are the most expensive tokens. In the measured run, 311 Write
calls vs 88 Edit calls made output $122 of a $222 bill.

## 2. Read narrowly

- Find things with Grep or Glob first, then Read only the line range you need
  (`offset` / `limit`).
- Never reread a file you just wrote or edited. You already know what is in it.
- Keep command output short: pipe through `tail -n 40`, `grep`, `head`, or use
  quiet flags (`-q`, `--silent`, `--quiet`, `cargo test -q`, `npm test --silent`).
- Never print huge logs, lockfiles, minified bundles, generated code, binary dumps
  or whole test transcripts into the context. Save them to a file and grep it.

Why: every token in context is paid again on each later request. The measured run
had 204M cache-read tokens from big logs and rereads.

## 3. Keep notes

- Keep a short `NOTES.md` (or a section in your scratch notes) with decisions,
  file locations, commands that work, and open problems.
- Check your notes before rereading code to remember a decision.
- Keep it under about 60 lines. Delete stale entries.

Why: a few lines of notes are far cheaper than rereading files to remember things.

## 4. Test smart

- While iterating, run only the tests that cover the code you changed
  (one file, one package, one `-run` / `-k` filter).
- Run the full suite at milestones and before the final response.
- On failure, show only the failing test names and the first useful error lines.

Why: running the full suite after every small edit burns time and context with
output you do not need.

## 5. Build exactly the requested scope

- Build what was asked. Nothing more.
- If you see a worthwhile extra (another platform, another backend, a bonus mode),
  do not build it. List it under "Optional extras" in the final report.
- If the request is ambiguous, pick the narrowest reasonable reading and say so.

Why: in the measured run it built a Game Boy Advance core nobody asked for, using
a parallel subagent. It cost money and was not scored.

## 6. Subagents only for genuinely independent chunks

- Use a subagent only when the chunk is independent (separate files, clear
  interface, no shared decisions) and big enough to be worth the handoff.
- Give exploration and search agents a cheaper model (for example `model: haiku`
  or `sonnet`) where the Agent tool allows it.
- Never start a subagent for work outside the requested scope (see rule 5).

Why: each subagent rebuilds context from scratch, and the extra scope in the
measured run came from a parallel subagent.

## 7. Never abandon background work

- Do not end your turn or session while background agents, tasks, builds or
  servers that you started are still running.
- Wait for them, collect their results, verify them, then finalize the docs.
- If something cannot finish, stop it cleanly, and say in the final report what
  is unfinished.
- Never write "I'll finish this when it reports back". There is no later.

Why: in the measured run it ended the session while its own 3DS agent was still
running. The agent was killed, and the README shipped with unfilled
`@@N3DS_SECTION@@` and `@@VERIFICATION@@` placeholders.

## 8. Finish gate (before the final response)

Run `scripts/finish-check.sh <project-dir>` from this skill folder if it is
available, then confirm each item yourself:

1. **No live background work.** No agents, tasks or builds you started are still running.
2. **No placeholders.** A grep finds no `TODO`, `TBD`, `FIXME`, `XXX`, `@@...@@`,
   `{{...}}` or "coming soon" markers in docs or shipped code.
3. **README matches reality.** Every feature, command and claim in the README was
   actually built and checked. Remove or mark anything that was not.
4. **Servers stopped.** Any dev server, preview server, VM or watcher you started
   is stopped (unless the user asked you to leave it running; then say so).

Why: the measured run shipped a README with placeholders because it skipped this check.

## 9. Attacker pass (before finishing)

After the features work, switch roles: try to break your own code.

1. **List the trust boundaries.** For each, write one line: where untrusted data
   enters and what it can reach. Typical boundaries:
   - user files and paths;
   - archives, images and layers;
   - network replies and device (USB/HID/serial) replies;
   - IPC, sockets and localhost servers;
   - secrets at rest (tokens, keys, passwords, databases).
2. **Write at least one hostile test per boundary.** Run it. Fix what fails.
3. **Checklist** (cover every item that applies):
   - **Traversal and symlinks:** `../`, absolute paths, symlinks and hardlinks that
     point outside the target, in both paths and archive entries.
   - **Special files in archives:** device nodes, FIFOs, sockets, setuid bits. Skip
     or reject them, and mount untrusted roots `nodev,nosuid`; use a device
     cgroup or allowlist for containers.
   - **Protocol replies:** before applying a reply, check its length, its command
     byte, and that it echoes the offset or address you asked for. Reject
     truncated or mismatched replies, and never show "saved" or success over
     unverified data.
   - **Secrets at rest:** store tokens and keys in the OS keychain, or in files
     created with mode `0600` in a `0700` directory. Never world-readable.
     Never in logs or exports.
   - **Localhost servers:** bind to `127.0.0.1`, not `0.0.0.0`. Check the `Origin`
     and `Host` headers, and require a per-session token or custom header for
     state-changing requests.
   - **Errors:** show errors to the user with a clear message. Never swallow
     them or replace them with a success state.

Why: the measured run ran 159 builder checks but still shipped a container
runtime where an image-supplied block device node could read the host disk (no
device cgroup, overlay not `nodev`), a QMK app that trusted device replies
without checking offset or length and showed "Saved on keyboard" over garbage,
and a Fitbit app that stored OAuth tokens unencrypted in a 0644 SQLite file.

## 10. Effort

- Use **high** effort for big builds, multi-file features, security-sensitive work
  and debugging hard failures.
- Use **medium** for routine edits, small fixes and docs.
- If the session is on medium and the task is a big build, tell the user it may be
  worth switching with `/effort high`.

Why: the benchmark run used high effort; a lower default can cost points on big builds.

## Keep these good habits

- **Research first.** Before coding against an API, protocol, file format or
  library version, read the real docs or upstream source. Note the version you
  checked.
- **Short progress updates.** One or two lines: what is done, what is next.
- **Honest final report.** Say what you built, what you verified and how, what you
  did not verify, what is unfinished, and the optional extras you skipped.

## Final report template

```
Built: <features, one line each>
Verified: <command or test -> result>
Not verified: <what and why>
Attacker pass: <boundary -> hostile test -> result>
Optional extras (not built): <list>
Finish gate: background work none / placeholders none / README checked / servers stopped
```

Files in this skill

  • SKILL.md8 KB
  • scripts/finish-check.sh4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.