/llm-author:prompt-engineeringfrom llm-author
Creates, refines, and migrates prompts across LLM models (Claude, GPT, Gemini, GLM). Optimizes LLM-targeted content like skills, agents, and system prompts.
Ships in llm-author. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Deliverable: Deliver the artifact and never carry out the task it describes — a prompt, or the ruleset an invoking session authors prompts from. Its recipient is a person who copies it, a process an invoking workflow passes it to, or the invoking session itself; dispatching it is that workflow's own next step, not execution by this skill. Shape the delivery to the recipient via the Output Format table.
A prompt is any content containing information, context, or directives intended for LLM consumption. This includes:
Traditional prompts:
LLM-targeted content:
Recognition signals:
description, tools, allowed-toolsOptimization principle for LLM-targeted content:
These documents are created with clear scope and intention—often by an LLM—and contain everything required for their purpose. Optimization improves clarity, structure, and effectiveness WITHOUT removing information, context, or directives.
Apply reasoning to understand:
Then optimize for clarity and impact while preserving all substantive content. Personas and "You are …" identity openers are not substantive content.
Because Claude 5 is the default target, apply "less is more" by default: Claude 5 exercises judgment, so cutting over-constraint (absolute rules, repetition, worked examples that narrow exploration) improves output. This relaxes the preserve-everything default above — keep substantive directives, but drop scaffolding that compensated for weaker instruction-following. For Claude 4 or earlier targets, keep the preserve-everything default. See references/claude-5-guide.md#optimizing-llm-targeted-content-for-claude-5.
digraph prompt_engineering {
"Prompt request" [shape=doublecircle];
"Refining a prompt already generated this conversation?" [shape=diamond];
"Refinement mode: ask what changes, deliver the full refined prompt" [shape=box];
"Migrating existing content between model versions?" [shape=diamond];
"Migration mode: use per-model guide checklists, deliver before/after" [shape=box];
"Distilled ruleset for the invoking session to author prompts from?" [shape=diamond];
"Ruleset mode: derive rules from the target-model guide and the session's artifact types" [shape=box];
"Traditional prompt or LLM-targeted content?" [shape=diamond];
"Phase 1: scope the prompt (purpose, audience, success criteria, platform, target model)" [shape=box];
"Phase 2: design strategy (techniques by complexity + target-model adaptation)" [shape=box];
"Target model?" [shape=diamond];
"Claude 5 default -> claude-5-guide" [shape=box];
"Claude 4 -> claude-4-guide" [shape=box];
"GPT-6 / GPT-5.x (OpenAI) -> openai-gpt-guide" [shape=box];
"GLM 4.7 -> glm-47-guide" [shape=box];
"Gemini 3 -> gemini-3-guide (Deep Research -> gemini-3-deep-research-guide)" [shape=box];
"Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?" [shape=diamond];
"Phase 3: deliver the artifact (format by type, recipient, and platform)" [shape=doublecircle];
"Prompt request" -> "Refining a prompt already generated this conversation?";
"Refining a prompt already generated this conversation?" -> "Refinement mode: ask what changes, deliver the full refined prompt" [label="yes"];
"Refinement mode: ask what changes, deliver the full refined prompt" -> "Phase 3: deliver the artifact (format by type, recipient, and platform)";
"Refining a prompt already generated this conversation?" -> "Migrating existing content between model versions?" [label="no"];
"Migrating existing content between model versions?" -> "Migration mode: use per-model guide checklists, deliver before/after" [label="yes"];
"Migration mode: use per-model guide checklists, deliver before/after" -> "Phase 3: deliver the artifact (format by type, recipient, and platform)";
"Migrating existing content between model versions?" -> "Distilled ruleset for the invoking session to author prompts from?" [label="no"];
"Distilled ruleset for the invoking session to author prompts from?" -> "Ruleset mode: derive rules from the target-model guide and the session's artifact types" [label="yes"];
"Ruleset mode: derive rules from the target-model guide and the session's artifact types" -> "Target model?";
"Distilled ruleset for the invoking session to author prompts from?" -> "Traditional prompt or LLM-targeted content?" [label="no"];
"Traditional prompt or LLM-targeted content?" -> "Phase 1: scope the prompt (purpose, audience, success criteria, platform, target model)" [label="traditional"];
"Traditional prompt or LLM-targeted content?" -> "Phase 2: design strategy (techniques by complexity + target-model adaptation)" [label="LLM-targeted (skip Phase 1)"];
"Phase 1: scope the prompt (purpose, audience, success criteria, platform, target model)" -> "Phase 2: design strategy (techniques by complexity + target-model adaptation)";
"Phase 2: design strategy (techniques by complexity + target-model adaptation)" -> "Target model?";
"Target model?" -> "Claude 5 default -> claude-5-guide";
"Target model?" -> "Claude 4 -> claude-4-guide";
"Target model?" -> "GPT-6 / GPT-5.x (OpenAI) -> openai-gpt-guide";
"Target model?" -> "GLM 4.7 -> glm-47-guide";
"Target model?" -> "Gemini 3 -> gemini-3-guide (Deep Research -> gemini-3-deep-research-guide)";
"Claude 5 default -> claude-5-guide" -> "Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?";
"Claude 4 -> claude-4-guide" -> "Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?";
"GPT-6 / GPT-5.x (OpenAI) -> openai-gpt-guide" -> "Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?";
"GLM 4.7 -> glm-47-guide" -> "Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?";
"Gemini 3 -> gemini-3-guide (Deep Research -> gemini-3-deep-research-guide)" -> "Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?";
"Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?" -> "Phase 3: deliver the artifact (format by type, recipient, and platform)" [label="person: full wrapper, usage + testing"];
"Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?" -> "Phase 3: deliver the artifact (format by type, recipient, and platform)" [label="process: body only, no wrapper"];
"Recipient: a person, a process a workflow dispatches it to, or the invoking session itself?" -> "Phase 3: deliver the artifact (format by type, recipient, and platform)" [label="invoking session: ruleset only"];
}
Before generating the prompt, understand its intended purpose. Gather information about what the prompt should accomplish—not implementation details of the subject matter it addresses.
Required clarifications about the prompt:
Clarify prompt ambiguities (stay at the prompt level, don't dive into subject matter):
When the user is modifying a prompt that was previously generated in this conversation:
Detection signals:
Streamlined workflow:
When an invoking session asks for the distilled prompt-authoring rules it will write to a session file and re-read at each later authoring step:
references/output-formats.md#14-session-scoped-rulesets.Select appropriate techniques based on task complexity:
For simple tasks:
For complex tasks:
references/techniques/chain-of-thought.mdreferences/techniques/multishot-prompting.mdreferences/techniques/prompt-chaining.md; ready template: examples/prompt-chain-template.mdFor optimization:
examples/optimization-report.mdDeliver the artifact as a markdown block optimized for its recipient and target platform. Choose the structure from the Output Format table below (details in references/output-formats.md); for a system prompt, adapt examples/system-prompt-template.md.
Person as recipient (Claude Web / Claude Desktop) — default:
Process as recipient (an invoking workflow dispatches the artifact):
references/output-formats.md#13-dispatched-promptsAPI format (only when explicitly requested):
references/techniques/be-clear-and-direct.md<instructions>, <context>, <examples><thinking>, <answer>, <analysis>references/techniques/xml-tags.md<thinking> and <answer> tags<thinking>/<answer> scaffolding and manual budget_tokens are Claude 4 / earlier patterns (see references/claude-5-guide.md#adaptive-thinking)
→ Deep dive: references/techniques/chain-of-thought.md<examples> tags with nested <example> tagsreferences/techniques/multishot-prompting.mdreferences/techniques/system-prompts-and-roles.md{ for JSONreferences/techniques/prefilling.mdClaude 5 (Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.1; legacy Opus 5, Sonnet 5, Fable 5) is the default target; Opus 5.5 is the recommended default model. Claude 4 (Opus 4.x, Sonnet 4.x) prompts often over-steer Claude 5, so re-tune them when migrating. Existing Haiku 4.5 prompts should perform well on Haiku 5.5 without changes.
Claude 5 exercises more judgment and needs less scaffolding. Steer with the effort parameter and targeted, positive instructions.
Control length on Opus 5 — Opus 5 runs longer by default and effort doesn't reliably change visible length, so prompt for concision (Sonnet 5 is already concise; Fable 5 can over-elaborate at high effort):
Provide concise, focused responses. Skip non-essential context, and keep examples minimal.
Remove carried-over verification on Opus 5 — Opus 5 self-verifies and self-corrects, so "double-check your answer", "add a verification step", and "use a subagent to verify" cause over-verification. Delete them. Do not generalize this: Fable 5 long-horizon runs keep verification explicit with fresh-context verifier subagents, and Sonnet 5 has no finding either way — leave its verification instructions alone (see the guide).
Guide subagent delegation — Claude 5 spawns subagents without being told to; give explicit criteria. Opus 5 and Fable 5 delegate more readily than prior models (Sonnet 5 has no such finding). Cap spawn counts for cost-sensitive Opus 5 work; Fable 5 is built to delegate freely (see the guide):
Delegate to a subagent only for large, genuinely independent, parallelizable tasks.
Keep spawn counts low.
Soften aggressive language — CRITICAL: You MUST... over-triggers; use "Use ... when ...".
Re-sweep effort on Sonnet 5.5, and write for the level: its levels are recalibrated against Sonnet 5, so never carry the Sonnet 5 level over (Claude API default high; start well-specified agentic coding at medium, harder or longer work at high). At low/medium it can check in before long agentic work is done, and at xhigh/max it can start its own review rounds, sometimes with subagents; add the guide's carry-through or review-restraint paragraph to match the level.
Haiku 5.5 is a Claude 5 target, not a Claude 4 one: effort replaces budget_tokens (default medium). At low in long agent prompts it can skip a search, stop early, or skip a check; add the guide's early-stopping and verification paragraphs, and give it today's date when it has a search tool.
Breaking changes: assistant prefill, budget_tokens, and non-default temperature/top_p/top_k return a 400 error; on Opus 5.5, Sonnet 5.5, and Fable 5.1 so does forced tool_choice (any / tool). Use adaptive thinking with effort, Structured Outputs instead of prefill, and tool_choice: auto plus strict tool use instead of forced tool choice.
→ Full guide, per-model specifics (Opus 5.5 / Sonnet 5.5 / Haiku 5.5 / Fable 5.1 / Opus 5 / Sonnet 5 / Fable 5), the Opus 5 → Opus 5.5, Sonnet 5 → Sonnet 5.5, and Haiku 4.5 → Haiku 5.5 checklists, and Claude 4 → 5 migration: references/claude-5-guide.md
Claude 4 needs "above and beyond" behavior requested explicitly:
→ Full guide: references/claude-4-guide.md
When the user asks to migrate, re-tune, or update existing Claude 4 content (a prompt, skill, agent, or rules file) for Claude 5: diagnose and remove the carried-over Claude 4 scaffolding that now over-steers, rather than rewriting from scratch. Apply the re-tuning moves from the Claude 5 sections above: remove verification scaffolding when the target is Opus 5 (Fable 5 long-horizon runs keep it; Sonnet 5 keeps what it has; Sonnet 5.5 at low and Haiku 5.5 at low/medium take the guide's verification paragraph when they report code changes done without a check), soften aggressive triggers, give and cap subagent-delegation criteria, replace the 400-error API parameters (assistant prefill, budget_tokens, non-default temperature/top_p/top_k, and forced tool_choice on Opus 5.5, Sonnet 5.5, and Fable 5.1), plus, for LLM-targeted content, the "less is more" optimization principle. For Haiku 4.5 → Haiku 5.5, keep the prompt as it is, apply every item of the guide's Haiku 4.5 → Haiku 5.5 checklist, and tune prompt wording only for behavior you observe.
For migrations between model versions, use the per-model checklists in references/claude-5-guide.md or references/openai-gpt-guide.md. Deliver a before/after so each change and its rationale stay visible: references/output-formats.md#10-claude-4-to-claude-5-migrations. Worked transformations: examples/claude-4-to-5-migration.md. Full per-model detail and the Claude 4 → 5 migration reference: references/claude-5-guide.md.
When the user explicitly targets the GPT-6 family (GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna), GPT-5.6 (Sol, Terra, Luna), or another OpenAI GPT-5-family model: define the outcome, constraints, evidence, and completion bar, then leave the path to the model.
text.verbosity for the default level of detail.reasoning.effort (none, low, medium, high, xhigh, max; default medium; GPT-6 Astra and GPT-6.1 Sol have no none; for existing minimal requests, start with low and compare), reasoning.mode: "pro" for quality-first single answers.→ Full guide, API parameters, per-tier selection, the October 2026 GPT-6 Luna update, GPT-6, GPT-6.1, and GPT-5.x migration, and pre-5.6 baseline: references/openai-gpt-guide.md; transformation examples: examples/openai-gpt-adaptation.md
When the user explicitly targets GLM 4.7: it treats polite, buried instructions as optional, so make directives firm and front-loaded.
ALWAYS respond in English.→ Full adaptations, patterns, and API config: references/glm-47-guide.md; transformation examples: examples/glm-47-adaptation.md
When the user explicitly targets Gemini 3: it defaults to minimal output and handles long context differently than Claude.
Deep Research mode — if the user mentions "deep research", citation-backed literature reviews, or extended autonomous web research, use references/gemini-3-deep-research-guide.md and examples/gemini-3-deep-research.md (autonomous 5–60 min runs, plan review, ~10% citation-error, explicit scope/temporal/source constraints). Otherwise apply standard adaptations:
temperature, top_p, and top_k unset: Gemini 3.6 and later ignore them, and on earlier Gemini 3 models non-default values risk degraded reasoning.→ Full adaptations, model selection, and API config: references/gemini-3-guide.md; transformation examples: examples/gemini-3-adaptation.md
Select the appropriate format based on artifact type:
| Type | Format | Reference |
|---|---|---|
| Traditional prompts | Full wrapper (Purpose, Best Used For, etc.) | references/output-formats.md#1-traditional-prompts |
| LLM-targeted content | Optimized content only, no wrapper | references/output-formats.md#2-llm-targeted-content |
| Refinements | Add "Changes Made" section | references/output-formats.md#3-refinements |
| Prompt chains | Chain Overview with steps | references/output-formats.md#4-prompt-chains |
| GLM 4.7 prompts | Add API Configuration | references/output-formats.md#5-glm-47-prompts |
| Claude-to-GLM adaptations | Before/After comparison | references/output-formats.md#6-claude-to-glm-adaptations |
| Gemini 3 prompts | Add API Configuration | references/output-formats.md#7-gemini-3-prompts |
| Claude-to-Gemini adaptations | Before/After comparison | references/output-formats.md#8-claude-to-gemini-adaptations |
| Gemini Deep Research prompts | Add Deep Research Notes + Iteration Suggestions | references/output-formats.md#9-gemini-deep-research-prompts |
| Claude 4 → Claude 5 migrations | Before/After comparison | references/output-formats.md#10-claude-4-to-claude-5-migrations |
| GPT-6 and GPT-5.6 prompts | Add API Configuration | references/output-formats.md#11-gpt-6-and-gpt-56-prompts |
| Claude-to-GPT adaptations (GPT-6, GPT-5.6) | Before/After comparison | references/output-formats.md#12-claude-to-gpt-adaptations-gpt-6-gpt-56 |
| Dispatched prompts (process recipient) | Prompt body only, no wrapper or usage sections | references/output-formats.md#13-dispatched-prompts |
| Session-scoped rulesets | Rules only, no wrapper and no prompt | references/output-formats.md#14-session-scoped-rulesets |
Before delivering any artifact, verify:
For traditional prompts, ask the user for clarification when:
Example clarification:
Before I create this prompt, I have a few questions:
- Should this prompt handle [specific edge case]?
- Do you want the output in [format A] or [format B]?
- Would you like me to provide alternative variations?
references/prompt-patterns/code-generation.mdreferences/prompt-patterns/code-review.mdreferences/prompt-patterns/comparative-analysis.mdreferences/prompt-patterns/root-cause-analysis.mdreferences/prompt-patterns/structured-analysis.mdreferences/prompt-patterns/chain-patterns.mdreferences/prompt-patterns/comparative-analysis.mdreferences/prompt-patterns/structured-content-generation.mdreferences/prompt-patterns/documentation-generation.mdreferences/prompt-patterns/text-rewriting.mdexamples/claude-4-to-5-migration.md (opens in a new tab)examples/gemini-3-adaptation.md (opens in a new tab)examples/gemini-3-deep-research.md (opens in a new tab)examples/glm-47-adaptation.md (opens in a new tab)examples/openai-gpt-adaptation.md (opens in a new tab)examples/optimization-report.md (opens in a new tab)examples/prompt-chain-template.md (opens in a new tab)examples/system-prompt-template.md (opens in a new tab)references/claude-4-guide.md (opens in a new tab)references/claude-5-guide.md (opens in a new tab)references/gemini-3-deep-research-guide.md (opens in a new tab)references/gemini-3-guide.md (opens in a new tab)references/glm-47-guide.md (opens in a new tab)references/openai-gpt-guide.md (opens in a new tab)references/output-formats.md (opens in a new tab)references/prompt-patterns/README.md (opens in a new tab)references/prompt-patterns/api-design.md (opens in a new tab)references/prompt-patterns/chain-patterns.md (opens in a new tab)references/prompt-patterns/code-generation.md (opens in a new tab)references/prompt-patterns/code-review.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub it-bens/ai-tools --plugin llm-author5 skills in this plugin
/content-editingEvaluates proposed changes to LLM-targeted content (skills, agents, commands) and guides toward corrections over additions. MUST invoke when editing SKILL.md files, modifying agent markdown in agents/, updating command markdown in commands/, adding new sections or instructions, expanding skill content, user says "is this too long", "content bloat", "should I add this", or improving/enhancing skills./rule-file-writingUse when creating or optimizing a rule file for per-token behavioral steering. Rule files are instruction files that an AI coding assistant automatically loads for a matching user, project, or directory scope; they are NOT skills, agents, or commands. Trigger on "write a rule about X", "create a rules file", "optimize this rules file", "cut ballast from this rule file", or any request to author or refine an auto-loaded file whose purpose is persistent behavioral steering./writing-handoff-promptsUse when the user explicitly asks to write a handoff prompt for a fresh, new, separate, or other session — for example to start a spec's implementation, apply review or report fixes, turn review findings into a change proposal, or continue work — in a session that will have none of this session's context. Invoke on such an explicit request or when an invoking workflow's step calls for a handoff body to dispatch — never proactively otherwise. Produces a self-contained handoff prompt (every needed fact stated inline or reachable by an explicit file reference; the work type, branch, commit and verification policy, and scope deduced from context), then offers to save it to a file or copy it to the clipboard — or, when a workflow step invoked it for a body to dispatch, hands the finished prompt back to that workflow instead of asking./writing-session-feedbackUse when the user explicitly asks to write feedback, a report, or a note for another session — typically the upstream session that defined the work this session just executed (it wrote the spec, performed the review, or made the plan), so that session can confirm the work was done correctly and calibrate its future specs and reviews. Invoke on such an explicit request or when the dispatch message that defined this session's work directs a feedback note as part of its report contract — never proactively otherwise. Produces a calibration note addressed to that session, anchored to the concrete change (branch, commit(s), verification state), then offers to save it to a file or copy it to the clipboard — or, when a dispatch's report contract directed the note, sends it to the directing session per that contract instead of asking.Other plugins' skills for the same job