Decide whether a task requires code execution + file/command operations (Execution Path), an inline rendered widget/artefact (Artefact Path), or a direct streamed text response (Text Path). Use this skill at the START of every non-trivial response where the right output modality is not immediately obvious. Trigger on any task that involves: producing files, running computations, transforming data, building UIs, making API calls, writing scripts, creating documents - OR on analysis/explanation/design/ advice tasks where it is unclear whether artefacts are needed. Also trigger when the user says things like "create", "build", "generate", "make me", "run", "process", "convert", "fix", "analyse", "explain", "plan", "compare", "show me", or "write". Do NOT skip this skill just because the request feels "simple" - under-routing is the primary failure mode.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Decide whether a task requires code execution + file/command operations (Execution Path), an inline rendered widget/artefact (Artefact Path), or a direct streamed text response (Text Path). Use this skill at the START of every non-trivial response where the right output modality is not immediately obvious. Trigger on any task that involves: producing files, running computations, transforming data, building UIs, making API calls, writing scripts, creating documents - OR on analysis/explanation/design/ advice tasks where it is unclear whether artefacts are needed. Also trigger when the user says things like "create", "build", "generate", "make me", "run", "process", "convert", "fix", "analyse", "explain", "plan", "compare", "show me", or "write". Do NOT skip this skill just because the request feels "simple" - under-routing is the primary failure mode.
Response Dispatch
A routing layer that runs once, at the start, before generating any output.
It produces exactly one decision from four possible outcomes:
Path
Symbol
When
Text Path
[T]
Answer is prose/markdown, streamed inline
Artefact Path
[A]
Output is an interactive or visual widget rendered in the chat
Execution Path
[E]
Output requires tools, code execution, or produces a downloadable file
Clarify First
[C]
Ambiguity is high enough that proceeding would waste effort or produce the wrong thing
Work through the gates in order. First gate that fires wins. Stop immediately.
Gate 0 — Clarify First [C]
Ask a single focused clarifying question before dispatching if ALL of the
following are true:
The request names an output type that has multiple plausible forms
(e.g. "a report" could mean inline markdown, a Word doc, or a dashboard).
Getting it wrong would cost more than asking (long execution tasks, binary
file generation, complex multi-step workflows).
No prior message in the conversation resolves the ambiguity.
Do not ask if the answer can be reasonably inferred from context, from the
user's tool choices already visible in the conversation, or from stated
preferences. Defaulting and noting the assumption is almost always better
than blocking with a question.
Rule: One question maximum. If you'd need two questions to disambiguate,
default to the most common interpretation and state your assumption.
Gate 1 — Hard Execution Signals [E]
Choose Execution Path immediately if ANY of the following is true:
The output is a downloadable file of any kind:
.docx, .xlsx, .pptx, .pdf, .png, .jpg, .svg (saved),
.csv, .zip, .json (saved), any code file the user wants to keep.
The task requires running code whose output is the deliverable:
data transformation, computation, parsing, rendering a static image,
running tests, executing a script.
The task involves reading an uploaded or binary file whose content is
NOT already visible in context (check for a documents block or inline
text — if absent, the file must be read via tools).
The task requires external tool/MCP calls that assemble structured data
into the response: Drive fetch, calendar query, sending email, posting to
Slack, querying a database, calling an API endpoint.
The task is a multi-step workflow where intermediate outputs gate later
steps: "parse → filter → chart", "read PDF → summarise → email".
The user says "save", "download", "export", "as a file",
"I want to keep this", "send it to me".
Gate 2 — Hard Artefact Signals [A]
Choose Artefact Path if the output should render interactively inside the
chat window and does NOT need to be saved as a file. This path uses
visualize:show_widget (React/HTML) or inline SVG.
Choose [A] if ANY of the following is true, AND Gate 1 did not fire:
The request is for a chart, graph, or data visualisation where the user
wants to see and interact with it (not download it).
The request is for an interactive UI component: calculator, quiz, game,
form, simulator, kanban board, timer, converter.
The request is for a diagram (flowchart, architecture, ERD, sequence)
that benefits from being rendered rather than described in text.
The request is for a dashboard displaying metrics, tables, or progress
where interactivity adds value over a static list.
The request is for a React component or HTML snippet that the user wants
to see rendered — not just the source code inline.
[A] vs [E] distinction: If the user says "build me a React component"
and wants to see it working → [A]. If they say "create the .jsx file" or
"save it" → [E]. When ambiguous, prefer [A] (lower cost, immediate
feedback), then offer to package as a file if needed.
Gate 3 — Hard Text Signals [T]
Choose Text Path if ALL of the following are true:
The answer is knowledge, analysis, explanation, or advice that could be
written from training knowledge (possibly with web grounding).
The entire response fits in ~2–3 screenfuls (≈ 800–1 200 words) or is a
short code snippet (≤ 20 lines, no execution needed).
No file, rendered widget, or tool result is needed to assemble the answer.
The user is asking a question, requesting feedback, or wants a
plan / recommendation — not a built thing.
Gate 4 — Ambiguous Cases
When Gates 0–3 leave the decision open, apply this table.
Scenario
Decision
Rationale
"Write a blog post about X"
[T] (inline markdown)
Text is the deliverable
"Write a blog post and save it as a Word doc"
[E]
File output → Gate 1
"Explain how X works"
[T]
Explanation = prose
"Show me a diagram of X"
[A]
Visual output, render inline
"Show me a diagram and export it as SVG"
[E]
Save → Gate 1
"Analyse this dataset" (file attached, not in context)
[E]
Must read file via tools
"Analyse this dataset" (data pasted inline, short)
[T] or [A]
Interpretation only → [T]; chart → [A]
"Write a SQL query for X" (short, conceptual)
[T] (inline code block)
≤ 20 lines, no execution
"Run this SQL against my DB"
[E]
Execution required
"Fix my code" (file attached)
[E]
Must read + return corrected file
"Fix my code" (snippet inline, ≤ 40 lines)
[T]
Inline edit is sufficient
"Compare A and B" (both concepts)
[T]
Conceptual = prose
"Compare A and B" (both uploaded files)
[E]
Must read files
"Build a React component" (show me working)
[A]
Render inline first
"Build a React component" (give me the file)
[E]
File requested
"Quick React snippet" (≤ 20 lines)
[T]
Inline code block
"Create a presentation on X"
[E] (via pptx skill)
.pptx = file
"Show me a slide layout"
[A]
Visual preview, no file
"Summarise this article" (URL given)
[T] after web_fetch
Fetch is grounding; output is prose
"Make me a dashboard for X"
[A]
Interactive = widget
"Make me a dashboard and save it"
[E]
Save → Gate 1
Long creative writing > 1 500 chars
[E] (.md artefact)
Long-form = persistent file
Short creative writing (poem, paragraph)
[T]
Fits inline
"Draw a chart from this data" (data inline)
[A]
Render inline
"Give me a chart as a PNG"
[E]
File output
"What does this image show?" (image in context)
[T]
Vision is grounding; output is prose
"Edit this image and give it back"
[E]
File transformation
Hybrid Responses
Some tasks are legitimately two-phase. Handle them as:
Phase 1 → [T] grounding (web_search / web_fetch / Drive lookup)
Phase 2 → [E] or [A] using the grounded data
Examples:
"Research competitor pricing and put it in a spreadsheet" → search first [T], then build xlsx [E]
"Find our Q3 report and visualise the revenue trend" → Drive fetch [E] + chart widget [A]
For hybrids: complete Phase 1 inline (brief summary of findings), then proceed to Phase 2 without asking again. Do not create a file from Phase 1 alone unless explicitly asked.
Tie-Breaker
When still ambiguous after Gate 4:
"Is the thing the user wants the text itself, or is the text a step toward something else?"
Text is the deliverable → [T]
Text feeds a visual → [A]
Text feeds a file or computation → [E]
Cost order:[T] < [A] < [E] in both latency and risk. When two paths are equally valid, choose the cheaper one and note the assumption. Offer the alternative at the end of the response.
Dispatch Output Format
State the decision once, concisely. Place it in your thinking block or as a
one-line silent preamble. Never as a verbose paragraph that delays the response:
[DISPATCH → T] Reason: conceptual explanation, no artefact needed.
[DISPATCH → A] Reason: interactive chart requested, no save needed.
[DISPATCH → E] Reason: .xlsx output requested.
[DISPATCH → C] Question: "Do you want this as an inline preview or a .pptx file to keep?"
Path Entry Checklists
[T] Text Path
Check user formatting preferences: prose > bullets unless content is list-shaped
Is web grounding needed? If topic may have changed post-cutoff → web_search first
Will the response exceed ~1 500 chars of creative/structured content? If yes → reconsider [E] for a .md artefact
Code blocks: inline only if ≤ 20 lines and no execution needed
No excessive headers — use conversational tone unless content is document-shaped
[A] Artefact Path
Call visualize:read_me first with the relevant module (chart, diagram, interactive, data_viz, art, mockup)
Use Tailwind core utilities only for React (no JIT compiler available)
localStorage / sessionStorage are NOT supported in claude.ai — use useState / useReducer
Default export required for React components; no required props without defaults
Available libraries: recharts, lucide-react@0.383.0, d3, three (r128), lodash, mathjs, shadcn/ui, Tone, tensorflow
After rendering, offer to package as a downloadable file if the user might want to keep it
Single-file output: CSS and JS inline, no separate files
[E] Execution Path
Scan available_skills — is there a skill for this output type? (see Skill-Chaining Map below)
If a relevant skill exists: read its SKILL.md via view before writing any code