Short answer

A flow file is versioned YAML (or JSON) with version: 1, a startUrl, and a steps array. Each step has n, action, selector, and optional fallbacks, value, titles, and dwell. Validate against schema/flow.schema.json in the skill package.

Top-level fields

Field Required Notes
version yes Must be 1
startUrl yes Absolute URI the replay opens
steps yes Non-empty array
title / description no Human labels
authoredAt no ISO timestamp

Step fields

Field Required Notes
n yes 1-based step number (matches drift “broken at step N”)
action yes goto, click, fill, hover, scroll, wait_for, assert_text, press
selector yes Primary locator string
fallbackSelectors no Tried if primary fails
value no Fill text, assert text, or key for press
title / detail no Shown in numbered markdown steps
dwellMs no Pause after the action (ms)

Selector durability

Use exact-match patterns the skill documents: role=button[name="…"], quoted text="…". Avoid substring text= that keeps matching after copy changes and defeats drift detection.

Minimal example

version: 1
startUrl: https://demo.playwright.dev/todomvc/
title: Add a todo
steps:
  - n: 1
    action: fill
    selector: 'input.new-todo'
    value: Buy milk
    title: Type a new todo
    dwellMs: 800
  - n: 2
    action: press
    selector: 'input.new-todo'
    value: Enter
    title: Submit

Hard rule

Never put passwords, API keys, or session tokens in the flow file. See logins and test accounts.