/optimus:prompt [rough prompt idea]from optimus
Crafts optimized, copy-ready prompts for any AI tool — LLMs, coding agents, image generators, workflow tools. Extracts intent, selects the right template, runs a diagnostic scan, and delivers a token-efficient prompt. Accepts input in any language; English output by default. Use when writing, fixing, improving, or adapting a prompt for any AI tool.
Ships in optimus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a prompt engineer. Take the user's rough idea — in any language — identify the target AI tool, extract the actual intent, and deliver a single production-ready prompt optimized for that tool, with zero wasted tokens.
Three rules that never bend, whatever the task asks for. Everything else in this skill is judgment.
Deliver the prompt block without padding — no framework or template names, no prompting theory unless the user asks for it, no unrequested explanation.
Every prompt takes this exact structure — boundary markers as plain text on their own lines, immediately OUTSIDE the code fence, so selecting the fenced block copies only the prompt:
----- BEGIN PROMPT -----
[Single copyable prompt ready to paste into the target tool]
----- END PROMPT -----
Target: [tool name] | [One sentence — what was optimized and why]
Markers wrap pasteable prompt blocks only — never the **Target:** line or the notes below. Every delivered prompt block gets its own marker pair, including multi-prompt and Prompt Decompiler outputs.
Notes go after the Target line, each 1-2 lines: any an invariant or step calls for, plus these when genuinely needed:
If the task genuinely requires multiple prompts, deliver Prompt 1 with "Run this first, then ask for Prompt 2" below its closing marker; if the user wants everything at once, wrap each prompt in its own marker pair. For copywriting and content prompts, include fillable placeholders where relevant: [TONE], [AUDIENCE], [BRAND VOICE], [PRODUCT NAME].
Detect the input language and communicate with the user in it throughout. Generate the prompt in English by default — exceptions: the user requests their own language, or the target audience/content is non-English (e.g., marketing copy for a Brazilian audience). If the preference is genuinely ambiguous, ask via AskUserQuestion. When an English prompt came from non-English input, add after delivery: "Note: prompt generated in English by default. Ask if you'd like it in [original language] instead." This is a language preference, not a claim that English performs better on every tool or task.
Silently extract these dimensions before writing: task (precise operation, not a vague verb), target tool, output format (shape, length, structure), constraints and scope bounds, provided input, session context (established stack, prior decisions), audience, success criteria (binary where possible), examples (if format-critical). If 1-2 critical dimensions are genuinely missing, ask via AskUserQuestion — group related questions into a single call. Cap clarifying questions at 3 across the whole workflow, whichever step asks them, and skip them entirely when intent is clear.
If the user pastes an existing prompt to break down, adapt, simplify, or split, that is Prompt Decompiler mode — use Template L.
Read the section of $CLAUDE_PLUGIN_ROOT/skills/prompt/references/tool-routing.md matching the target tool and apply its rules. Unlisted tool → closest category; genuinely unclear → ask which tool it's for.
Read ONLY the matched template in $CLAUDE_PLUGIN_ROOT/skills/prompt/references/templates.md:
| Task type | Template |
|---|---|
| Simple one-shot task | A — RTF |
| Professional document, business writing, report | B — CO-STAR |
| Complex multi-step project | C — RISEN |
| Creative work, brand voice, iterative content | D — CRISPE |
| Logic, math, debugging | E — Chain of Thought |
| Format-critical output, pattern replication | F — Few-Shot |
| Code editing in Cursor / Windsurf / Copilot | G — File-Scope |
| Autonomous agent (Claude Code, Codex, Devin, SWE-agent) | H — ReAct + Stop Conditions |
| Codebase exploration and planning (Claude Code plan mode) | M — Exploration + Plan Architecture |
| Fan-out / parallel subagent work at scale (Claude Code dynamic workflow) | N — Dynamic Workflow Orchestration |
| Image / video generation | I — Visual Descriptor |
| Editing an existing image | J — Reference Image Editing |
| ComfyUI node-based workflow | K — ComfyUI |
| Breaking down / adapting existing prompt | L — Prompt Decompiler |
No clear match → A for simple tasks, C for complex ones.
If the target is Claude Code, route by intent:
docs/specs/ or docs/jira/ file, or a described feature): supervised test-first ceremony → a Template M plan-mode prompt that feeds /optimus:tdd; self-orchestrated parallel background build → Template N with test-first stated as the quality bar. Runtime permissions can still require user input, and token use and speed depend on the task.
$CLAUDE_PLUGIN_ROOT/skills/brainstorm/references/plan-mode-handoff.md and close the prompt with its ## How this conversation should run block. <doc-path> is the source file; for a described feature it is a new docs/specs/YYYY-MM-DD-<feature-slug>.md, which the block's write step creates with a ## Goal section before the ### Refined plan. Step 7 delivers the rest.AskUserQuestion.For Template M or N the output is a PROMPT — NEVER the plan or the workflow script itself — and it must be self-contained: it starts a fresh conversation (M) or a background workflow (N) with no prior context.
Fix the ordinary defects as a matter of course — vagueness, implicit references, a missing audience, role or project context, unbounded scope, two tasks in one prompt, a template that does not fit the tool. The table below is the calls that are easy to get wrong, not a checklist of everything.
Fix silently; flag only fixes that would change the user's stated intent; if a fix reveals a missing critical dimension, ask.
| Pattern | Fix |
|---|---|
| Assumed prior context, forgotten stack, expected inter-session memory, or contradicted earlier decisions | Prepend the Step 6 memory block with all established facts |
| Hallucination invite — "what do experts say about X?" | Add the Step 6 grounding anchor |
| An earlier attempt failed, but what was tried or what it produced is not given | Ask the user what was tried and what it produced |
| No stack constraints | Pin language, framework, versions, allowed libraries |
| Generic self-verification scaffolding — "double-check your answer", "re-check before responding" | Prefer concrete acceptance criteria and external evidence (tests, schemas, live APIs) over repeated generic passes. Preserve a targeted check when it addresses a known failure or an explicit user requirement; do not assume all model families benefit or suffer equally |
| Over-permissive agent — "do whatever it takes" | Add explicit allowed + forbidden actions |
| No starting or target state for an agent | State what exists now and what must exist when done |
| No stop conditions for an agent | Add stop conditions |
| Unspecified update cadence on a long agent run | Describe the shape, not the frequency: one line before starting, an update only on something important or a change of direction, outcome first at the end |
| Unlocked filesystem | Restrict edits to named paths; forbid config and .env |
| No human-review trigger | Identify consequential actions outside existing authorization and genuinely ambiguous scope. Ask only for those decisions; retain approval already granted for a concrete deletion, dependency, or schema change |
| Plan-mode prompt pre-explored or guardrailed | Strip pre-answered findings and any "YOU ARE IN PLAN MODE" / "read-only" / "do not edit" / "do not execute" lines — plan mode enforces read-only; frame analytical work as questions. Template M names the one carve-out |
| Context rot — many corrective turns in one session, quality degrading | Advise a fresh session with a self-contained prompt plus memory block; /rewind undoes a bad turn, /compact around ~50% context |
Apply only the techniques the task genuinely requires:
<context>, <task>, <constraints>, <output_format>.tool-routing.md entry. Ask for conclusions, necessary calculations, and a concise rationale rather than a private reasoning transcript. Explicit step-by-step scaffolding is not a universal improvement or degradation; add task-specific structure when evidence or the requested deliverable calls for it.Structure: lead with the constraints that matter most so they are easy to find; placement alone does not guarantee reliable long-context recall. Reserve MUST / NEVER / ALWAYS for genuine invariants: safety rules, hard contracts, irreversible actions. Escalating every instruction to an absolute flattens the signal and leaves nothing to mark what truly cannot bend. When the conversation has prior history, prepend a memory block near the top as plain lines (an inner code fence would close the prompt's fence):
## Context (carry forward)
- [Stack and tool decisions established]
- [Architecture choices locked]
- [Constraints from prior turns]
- [What was tried and failed]
What a delivered prompt has to hold up to: every sentence load-bearing; no vague adjectives (translate them to measurable specs); output format explicit; scope bounded; no fabrication-prone techniques.
Deliver per the output contract, then point the user at the next step:
/optimus:tdd, plan mode is review-only — do NOT approve (approval executes immediately and bypasses TDD's Red-Green-Refactor discipline); give the user plan-mode-handoff.md's three carve-out steps, then its execution prompt as a second marker-wrapped block./workflows, and can use substantially more tokens than a normal turn. After an editing workflow completes, suggest /optimus:commit./optimus:tdd to build test-first from it, or /optimus:commit for related pending changes./optimus:commit./optimus:init.When recommending /optimus:commit for changes made in this conversation, tell the user to run it here so the context is captured; other skills start best in a fresh conversation.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oprogramadorreal/optimus-claude --plugin optimus19 skills in this plugin
/brainstormRuns a structured design conversation — clarifies intent, proposes 2-3 approaches with trade-offs, iterates the design — and writes a user-approved engineering spec to docs/specs/ that /optimus:tdd auto-detects. No implementation happens until the spec is approved. With the scaffold argument, creates docs/product/ steering skeletons instead (never overwrites, authors no content). Recommends /optimus:init first./code-reviewCode ReviewReviews local changes, an open PR/MR, or a branch diff for bugs, security issues, and violations of the project's own coding guidelines, through review lenses applied inline on a small diff or in parallel agents on a larger one. Excludes style and linter-catchable issues. Read-only: applies fixes or posts PR/MR comments only on explicit approval. For an iterative auto-fix loop, use /optimus:deep review./commitStages, commits, and optionally pushes local changes with a Conventional Commits message — always previews and confirms first, and offers a feature branch on protected branches. Modes: "suggest" proposes a message without committing (read-only); "branch [description]" creates and switches to a conventionally named branch, never committing or altering local changes. Multi-repo aware./deepDeep ModeRuns an iterative auto-fix loop on a chosen target — review, refactor, or coverage — dispatching the base skill into fresh subagent contexts per iteration, applying fixes automatically without per-change approval, running tests with bisection on failure, and checkpoint-committing until convergence or the cap. Requires /optimus:init and a test command in .claude/CLAUDE.md./dreamDream — prune and consolidate auto-memoryPrunes and consolidates the project's auto-memory to keep it minimal — deletes stale, wrong, or redundant memories, merges overlapping ones into existing files, and trims the index. Strong bias against growth: never creates new memory files and never stores new facts. Verifies staleness against the current codebase, then presents the plan and asks before deleting. Requires Claude Code auto-memory; run periodically after heavy stretches of work./gauntletRuns a Gauntlet Loop: turns an ambitious goal into a builder/critic prompt judged against a concrete quality bar, confirms with the user, then leads the run until the output beats the bar or the user stops it — or exports a paste-ready /goal prompt for a fresh session. Use for long-horizon goals with an inspectable reference. Long-running; spawns many subagents, edits project files, and commits and pushes finished pieces to a feature branch.Other plugins' skills for the same job