← Files ClayARCHIVED FILE
skills/workflows/presenting.md
3.36 KB · Nov 18, 2026 · 06:19 UTC
# Presenting workflow work to the user
Building, testing, and editing a workflow is a back-and-forth. The user can only
follow along if you **narrate what you're doing in plain language** and **show a
visual whenever structure matters**. These are the defaults for every workflow
skill (building, testing, simplifying, optimizing, snapshots); each skill adds
its own skill-specific visual on top.
## Defaults
- **Narrate each meaningful step.** Before a change, say what you're about to do
and why; after it, say what happened. One or two plain sentences per step —
refer to nodes and actions by their **human-readable names** (e.g. "Find Work
Email (Clay)"), never internal `actionKey`s or raw node ids.
- **Summarize, don't dump.** Never make raw JSON, `jq`, or `diff` output the
primary answer. Turn it into a short Markdown table, a count, or a one-line
takeaway. Reserve raw output for when the user explicitly asks for it.
- **Prefer a visual when structure matters.** Reach for the right one:
- **Mermaid graph** — for the workflow's shape (nodes and how data flows).
- **Markdown table** — for records, per-node results, or a list of findings
(e.g. node → inputs → output → status).
- **Status checklist / progress line** — for long-running work (a run you're
polling, a batch of edits).
## Workflow editor link
When a workflow exists — immediately after `clay workflows create`, or when you
first `clay workflows get` one you're about to edit — **post a clickable Markdown
link near the top of your reply**, e.g. `[Open workflow](<url>)`, using the `url`
from the command response. Do not dump raw JSON, paste the URL only inside a code
block, or tell the user to look for the `url` field. In this headless skill the
link is how they open the canvas and follow along live.
## Show the user the graph
The user has no canvas here, so render the structure yourself.
`clay workflows diagram <workflowId>` returns
`{ "format": "mermaid", "diagram": <string> }` — a Mermaid `flowchart TD` where
node shape encodes node type and conditional edges are labelled with their branch.
Present it as a mermaid fenced code block so it renders inline:
```bash
clay workflows diagram <workflowId> | jq -r '.diagram'
```
Do this at the natural checkpoints (after `graph get`, after building/editing,
after `graph format`, and when narrating a run) — redraw for changes that
visually change the graph (nodes or edges added, removed, or rewired), and for
prompt-only or config-only edits just narrate what you changed. Whenever you
render, surface the workflow's `url` (from `clay workflows get`/`create`) so the
user can open the real editor, and pair the diagram with a one-paragraph
walkthrough of what each node does and where its inputs come from.
## Annotating a diagram with run status
When narrating a test run, don't just list node results — locate them in the
graph. Either annotate each node label with a status marker or place a small
"node → status" table beside the `clay workflows diagram` render, so the user
sees **where** in the flow a result (or failure) came from:
| Marker | Meaning |
| ------ | --------------- |
| `[x]` | completed |
| `[!]` | failed |
| `[~]` | running |
| `[ ]` | not yet reached |
Pair the annotated graph with the node-by-node walkthrough (see `testing.md`),
then call out any failures and what you'll change.
SHA-256: 377d085b28130f26bb5b4684e822da616c86a1cac2dfdb63db3cc23d51669d97