# LLM Prompt Authoring

> Use when writing or editing a prompt that another model consumes—system prompts, tool/function descriptions, extraction or classification instructions, image-generation prompts, LLM-judge rubrics, or any multi-stage AI pipeline. Triggers on "the prompt", "tune the prompt", "the extractor/judge/curator anchors on", "prompt is too long", "cache_control", "prompt caching", "which model should this call". For the prose itself, pair with `/write`; for model ids, pricing, and caching mechanics, read the provider's current model docs.

- Skill: `aias/llm-prompt-authoring` (Agent Skill)
- Install (CLI): `npx skillmds@latest add aias/llm-prompt-authoring`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aias/llm-prompt-authoring/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: Aias (https://skillmd.com/u/aias)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/aias/llm-prompt-authoring

---


# LLM Prompt Authoring

Craft for prompts that a downstream model reads, distinct from prose a human reads (`/write`). The reader is a sampler over tokens, so framing, ordering, and cost behave differently.

## Framing

<!-- @> Prompt the model toward the target, never away from a distractor: "not X" anchors it on X. Affirmative instructions; describe the wanted output, not the banned one -->
**Prefer affirmative instructions.** State what the output should be, not what it should avoid. A negative instruction injects the excluded concept into the context, and the model anchors on it: image and language models alike sample toward salient tokens and weight `not` weakly. "Render an empty room" beats "render a room with no people"; "extract only verifiable claims" beats "don't extract opinions." This is the bag-of-words skim from `/write`, sharpened. Here the reader literally conditions on every token you write, so a banned concept you name becomes a concept you summoned.

**When you must exclude, name the positive alternative.** If a constraint is unavoidable, pair it with the wanted target so the model has something to move toward: "use a neutral gray background" rather than "avoid colored backgrounds." First try collapsing the pair into the positive half alone — if the wanted description already implies the exclusion, keep only it; retain an explicit negative only when no positive phrasing covers the constraint.

<!-- @> Audit absolutes for edge cases: a standing rule that's 90% true is wrong 10% of the time — state the condition instead of "always/never"; reserve bare absolutes for genuine invariants -->
**Audit absolutes for edge cases.** A standing instruction ships with every request, so a rule that's 90% true is wrong 10% of the time. Before committing "always X" or "never Y" to a prompt, ask how a well-intentioned reader following it literally would misfire; if real exceptions exist, state the condition instead of the absolute — "update the changelog when behavior changes," not "always update the changelog." Reserve bare absolutes for genuine invariants.

**Keep examples on-target.** Few-shot examples and counter-examples both teach by demonstration; a vivid counter-example can be imitated as readily as a positive one. Lead with examples of the output you want.

## Cost and Caching

**Cache only what you reuse.** Prompt caching (`cache_control`) pays a write premium to amortize a stable prefix across calls. Mark a span cacheable only when later requests reuse that exact prefix: a fixed system prompt, a shared rubric, a tool schema. Turn it off for per-call payloads that never recur, such as a one-shot image or document handed to a single extraction or judging stage, request-specific user content, or anything downstream of the cache breakpoint. Caching unrepeated content adds the write surcharge with no hit to recover it. See the provider's current model docs for breakpoint placement and pricing.

**Flag a stale model id when touching a pipeline.** When editing an AI pipeline, check its model ids against the provider's current model docs and call out any that are behind the current stable release. Migrate only on request: a model change alters behavior and needs its own task justification.

## Length

**Trim while editing.** Long prompts dilute attention and cost tokens every call. On any pass, cut redundancy: instructions repeated across the system prompt and the user turn, restated constraints, hedges, throat-clearing. State each instruction once, in the place the model reads it. Apply `/write` density rules: every sentence in a prompt earns its place the same way every sentence in prose does.

