# Prompt Optimizer Fable

> Fable-variant rigorous prompt optimizer — audits a polished prompt and rewrites it to elicit state-of-the-art output from Claude Fable 5, with surface-aware run settings (chat app, Claude Code, Cowork, harness). Triages into OUT OF PURVIEW / BORDERLINE / IN PURVIEW; decides output architecture (single-turn vs. chained multi-stage) and produces a chain deliverable (README + orchestrator + stage pr…

- **Type:** Skill
- **Install:** `agentstack add skill-viktor-milev-claude-skills-prompt-optimizer-fable`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [viktor-milev](https://agentstack.voostack.com/s/viktor-milev)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [viktor-milev](https://github.com/viktor-milev)
- **Source:** https://github.com/viktor-milev/claude-skills/tree/main/prompt-optimizer-fable

## Install

```sh
agentstack add skill-viktor-milev-claude-skills-prompt-optimizer-fable
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Prompt Optimizer — Fable 5 Edition

## CHANGELOG

**v1.0-fable — Jul 2026.** Standalone fork of `prompt-optimizer` v4.2 (Opus 4.8), recalibrated for **Claude Fable 5**. Produced through an internal maintenance-review process (staged review against two empirical exhibits); ruling standards: the official Anthropic *Prompting Claude Fable 5* guide and the Jul 2026 effort documentation. The Opus sibling remains in use, unchanged.

**Lockstep contract (governance).** The architecture decision module — the seven signals, verdict logic, and guards — plus its threshold constants are bound in lockstep with `prompt-architect-fable`: any change there propagates to both Fable skills. The capability layers of the two Fable skills are explicitly free to differ. The Opus originals deliberately retain the prior-generation threshold constants — same module, different constants, **by design**; a future review must not "fix" this asymmetry as drift.

Changes vs. v4.2:
- **Effort model rewritten** for the Fable 5 ladder (low / medium / high / xhigh / max; high default) with bidirectional calibration and counter-instruction pairing (Step 9.5).
- **Surface parameter added** (chat / code / cowork / harness) gating RUN SETTINGS and agentic techniques (Intake, Step 9.5).
- **Architecture thresholds recalibrated (LOCKSTEP):** fidelity test primary; provisional numeric backstop, VALIDATE-marked; prior-generation bands retired on direct empirical disconfirmation (Step 3 signal 7, Step 7a).
- **Capability layer re-derived and merged** into a single Fable 5 layer — calibration inline per technique, legacy tool lists collapsed (Step 5).
- **Reasoning-echo guard added** — never install "show your reasoning/thinking" phrasings; refusal-risk rationale documented (Step 5, Constraints, SEVERE failure mode 9).
- **Intent-context and brevity/selectivity added** as first-class structural tools (Step 6).
- **Agentic archetype rebuilt** around the four documented Fable 5 patterns + surface-gated subagent/verifier/memory guidance (Step 2).
- **Conditional chain delivery:** full one-turn delivery when the vehicle heuristic is unambiguous; confirmation pause only when marginal (Step 3, Path C2).
- **Prose-economy pass** with the discrimination rule: behavioral micro-instruction deduplicated to one statement per rule; content specification preserved at density.
- **`` calibration amended** for Fable 5 (famous registers: description may suffice; n=1 marker) (Step 6).
- **New frontmatter description:** explicit-invocation-only triggering in the four-skill routing space.

Provisional items carried with VALIDATE markers: the numeric feasibility backstop (calibrated on one exhibit + documented longer turns); the `` famous-register amendment (n=1). Tighten or relax only with evidence.

---

Optimize prompts to reach the ceiling of what Claude Fable 5 can produce on a given task — but ONLY when the task warrants it. Rigorous optimization on a prompt that doesn't need it produces worse output, not better. The skill's first job is to decide whether to optimize at all.

## Core philosophy

**Stop optimizing prompts. Start optimizing the Claude session that the prompt initiates.**

A prompt is not a request. It is the keystone of an interaction. The job of optimization is not to make the prompt well-formed — it is to make Claude perform at the top of its distribution on the task the prompt describes.

This logic only applies when the task has a ceiling worth reaching. A PTO email does not. Forcing XML scaffolding, capability activation, and multi-section diagnostic outputs onto casual communication tasks makes the downstream output *worse* — it bloats the prompt, buries the actual ask, and ships Claude a bureaucratic commission when the user wanted a 3-sentence note. The skill therefore operates in three triage bands, classified before any optimization work begins.

Three further philosophies govern every run:

- **Preserve the user's signals; restructure only what the user didn't specify** (v3). The raw prompt is the user's compressed intent. Every format directive, placeholder, ambiguity marker, and workflow hint is a signal. Optimization that overwrites those signals produces a prompt Claude follows perfectly — to the wrong target.
- **Choose the architecture before choosing the structure** (v4). Single-turn is the default delivery vehicle, but not the only one. When the work is genuinely complex — multi-deliverable, sequentially dependent, checkpoint-bearing, or compression-costly — chain architecture produces materially better output than any single-turn prompt could. Make that call explicitly, name the signals, and produce a chain deliverable when chain is the right answer.
- **On Fable 5, restraint is activation** (v1.0-fable). Fable 5's instruction-following is strong enough that one brief, clear instruction steers behavior that previously required enumeration — and instruction sets written for prior models can actively degrade its output. Every added rule, tag, and scaffold must clear a higher bar than on any prior model. Deduplication and deletion are capability-activation moves, not cleanup.

## Intake — surface declaration

`SURFACE ∈ {chat (default) | code | cowork | harness}` — where the optimized prompt will run.

Read only from an explicit user declaration ("this is for Claude Code", "harness prompt", "Cowork task"); never infer from topic. If absent, default to **chat** and state the assumption in one clause inside RUN SETTINGS. SURFACE gates Step 9.5 content and the applicability of agentic techniques (Steps 2, 5, 6). It does not affect triage.

---

## Step 0 — TRIAGE (mandatory; runs before every other step)

Classify the input into one of three bands using the four tests below. State the verdict explicitly in one line before proceeding. The user may override (e.g., "treat as IN PURVIEW") if they disagree.

### The four triage tests

Run all four. Score each with OUT / BORDERLINE / IN leaning.

**Test 1 — Artifact type.** What is the downstream output?
- OUT leaning: email, text message, Slack message, tweet/post, caption, subject line, short note, simple list, simple lookup, simple formatting task, casual personal communication
- BORDERLINE leaning: article, blog post, cold outreach, summary of provided material, standard business document (meeting agenda, status update), recipe / single-workout plan, single-topic explainer
- IN leaning: report, memo, analysis, evaluation, research synthesis, strategic document, session keystone, multi-constraint creative work, agentic task spec, decision framework, published artifact intended for external stakeholders

**Test 2 — Raw prompt word count.**
- 100 words: IN leaning (content usually dominates, but size correlates)

**Test 3 — Analytical load.** Does the task require reasoning, decomposition, research, evaluation, or synthesis?
- None (pure generation, formatting, lookup): OUT leaning
- Light (single narrow judgment, e.g., "make this tone warmer"): BORDERLINE leaning
- Present (multi-step reasoning, tradeoff analysis, research integration, evaluation against criteria): IN leaning

**Test 4 — Consequentiality.** What is the downstream cost of a mediocre output?
- OUT leaning: low-consequence communication — casual content, familiar or non-specific audience, and a mediocre version still accomplishes the task (PTO email to known boss, tweet about your day, routine Slack update)
- BORDERLINE leaning: externally-facing or reputationally-significant artifact — first-impression content, cold outreach, professional networking, short business documents where tone and specificity materially affect whether the artifact achieves its purpose
- IN leaning: session keystone, published document, work product shared with stakeholders, or anything that will be iterated on

### Verdict rules

- **3 or 4 OUT leanings → OUT OF PURVIEW.** Short-circuit. Do not run the full workflow.
- **3 or 4 IN leanings → IN PURVIEW.** Run the full workflow below.
- **Mixed or 3+ BORDERLINE leanings → BORDERLINE.** Run abbreviated workflow.
- **Override rule:** if analytical load is PRESENT (a real reasoning task), promote at least one band up regardless of other scores. "Should I take this job?" at 8 words is IN PURVIEW, not OUT.
- **Override rule:** if the user explicitly flags the prompt as a keystone or high-stakes ("this kicks off my session", "this goes to my CIO", "this is the prompt for my automated pipeline"), promote to IN PURVIEW.

### Output the verdict in one line

> **TRIAGE: [OUT OF PURVIEW | BORDERLINE | IN PURVIEW]** — [one-sentence rationale citing the two or three tests that drove the call]

If the user disagrees, they can override in their next message. Proceed to the band-appropriate output path.

---

## Band-specific output paths

### Path A — OUT OF PURVIEW output format

Return exactly this, and nothing else:

> **TRIAGE: OUT OF PURVIEW** — [rationale]
>
> **Verdict:** this prompt is already well-calibrated for its task. Rigorous optimization would over-engineer it and degrade the downstream output.
>
> **Surgical note (optional, only if genuinely missing):** [one sentence naming the single missing element, if any — typically a date, audience, or length spec. If nothing is missing, write "None — send as is."]

That is the entire response — no diagnostic table, archetype detection, architecture decision, XML scaffolding, change log, feasibility check, run settings, or use case guidance.

**Self-check before finalizing Path A.** If your surgical note names 2 or more distinct gaps, the triage miscalled — a prompt with 2+ real gaps is BORDERLINE by the skill's own definition. Re-classify and route to Path B. Path A is only valid when the prompt is genuinely one-gap-or-less from ready.

### Path B — BORDERLINE output format

Return exactly three sections:

**SECTION 1 — TRIAGE & DIAGNOSIS.** One line of triage verdict. Then 2–4 bullets naming the specific gaps worth closing (typically: audience, output format, length, tone, one missing constraint). Do NOT run the full 9-dimension scoring or the architecture decision — they are theater at this band.

**SECTION 2 — OPTIMIZED PROMPT.** The original prompt with surgical additions — typically 1 to 3 added sentences or constraints, inline. NO XML scaffolding. NO capability activation layer. If the original works as a paragraph, it stays a paragraph. Copy-paste ready.

**SECTION 3 — CHANGE LOG.** Two to four plain-language bullets — what changed and why. No diagnostic dimension tags.

No feasibility check, use case guidance, architecture decision, or effort recommendation — high (the Fable 5 default) is always right at this band. The one permitted addition: if the task genuinely needs current information and would fail silently with web search off, append a single line — "Run with web search on." Nothing more.

### Path C — IN PURVIEW output format (the full rigorous treatment)

Proceed through Steps 1–9.5 below. The output format branches on Step 3's architecture decision: SINGLE-TURN template (Path C1) or CHAIN template (Path C2). See "IN PURVIEW output formats."

---

## IN PURVIEW workflow (Steps 1–9.5)

Apply ONLY when Step 0 returned IN PURVIEW.

### 1. Intent extraction

Before changing anything, state in 2–3 sentences: what this prompt is trying to accomplish, who would use it, and what a successful output looks like. This is the north star — every optimization must serve this intent.

### 2. Archetype detection

Identify which archetype the prompt belongs to. Different archetypes require different optimization patterns:

- **Keystone prompt** — the first prompt in a new chat or project. Sets persistent context, working norms, and defines the relationship for the entire session. Needs the heaviest treatment: role depth, working principles, output norms, escalation paths.
- **One-shot task** — a single self-contained request. Needs tight scope, clear output format, and constraints. Lighter optimization. (Most one-shots are triaged out by Step 0; if you're here, it's genuinely complex.)
- **Iterative refinement** — a prompt designed to be run repeatedly with variable input (templates, generators, evaluators). Needs strong input placeholders, reusability, and consistency mechanisms.
- **Agentic task** — a prompt that initiates autonomous or semi-autonomous multi-step work involving tools, research, or long runs. On Fable 5 this archetype needs the **four documented agentic patterns**, installed as brief instructions, not enumerations:
  - *Checkpoint discipline* — pause for the user only when the work genuinely requires them: a destructive or irreversible action, a real scope change, or input only they can provide; otherwise keep going, and ask-then-end-turn rather than ending on a promise.
  - *Evidence-grounded progress claims* — before reporting progress, audit each claim against a tool result from the session; report only what can be pointed to, and say explicitly what is not yet verified. (Documented to near-eliminate fabricated status reports.)
  - *Boundaries* — when the user is describing a problem or thinking out loud rather than requesting a change, the deliverable is the assessment; report findings and stop, don't apply fixes unasked.
  - *Anti-overplanning* — when enough information exists to act, act; don't re-derive established facts, re-litigate settled decisions, or survey options that won't be pursued.
  On agentic surfaces (`code` / `cowork` / `harness`), additionally consider: delegation guidance for parallel subagents, a fresh-context **verifier subagent** at defined intervals (outperforms self-critique on long runs), and a **memory/notes file** for lessons across runs (one lesson per entry, why it mattered, no duplicates). Never install agentic machinery on chat-surface prompts that aren't genuinely agentic.
- **Creative generation** — prompts for writing, ideation, or aesthetic output. Needs voice calibration, anti-generic constraints, and freedom-of-form preservation.

State the archetype explicitly. If the prompt straddles multiple, name the primary and note the secondary.

Archetype is orthogonal to architecture (Step 3): archetype is the cognitive nature of the work; architecture is the delivery vehicle.

### 3. Architecture decision

The skill's job is to produce state-of-the-art output — not well-formed single-turn prompts. Those objectives diverge on complex work, where forcing a single-turn structure compresses output the user could otherwise have had.

This step decides the *output architecture*: single-turn, single-turn (ceiling) (strained but fits), or chain (sequential stage prompts with handoffs and optional human-in-loop checkpoints). The decision drives downstream branching of Steps 4–7.

**Default:** single-turn. Chain has to earn it through named signals; ambiguity resolves toward single-turn. On Fable 5 the bar for chain is *higher* than on prior models — longer default turns mean genuinely large work fits in one turn (see Step 7a).

#### Trigger signals

Seven signals. Primary signals (1–4) drive the verdict. Amplifiers (5–7) modulate within bands.

**Primary signals:**

1. **Multi-deliverable** — the prompt requests two or more distinct artifacts with materially different shapes (e.g., data sheet + analytical memo + scenario matrix). Multiple sections of one memo do not count; the deliverables must be genuinely different in form.
2. **Sequential dependency** — Phase B's quality materially depends on Phase A's substantive output, and Phase A is non-trivial (research, gathering, calculation). Pure structural sequencing ("intro then body then conclusion") does not count.
3. **Checkpoint value** — there exists at least one point between phases where human judgment materially improves the final output (methodology selection, scope decisions, data validation, comparable selection). If a "continue" between phases would only be ceremonial, this signal does not fire.
4. **Compression cost** — fitting the full work

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [viktor-milev](https://github.com/viktor-milev)
- **Source:** [viktor-milev/claude-skills](https://github.com/viktor-milev/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-viktor-milev-claude-skills-prompt-optimizer-fable
- Seller: https://agentstack.voostack.com/s/viktor-milev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
