argent-create-flow

software-mansion/argent

Запись повторяемого сценария вызовов MCP-инструментов для воспроизведения одной командой.

Argent сохраняет последовательности шагов в .yaml-файлы в каталоге .argent/flows/, выполняя каждый записанный шаг сразу при добавлении, а готовый flow воспроизводится через flow-execute или headlessly командой argent flow run name. Инструмент рассчитан на инженеров, пишущих e2e- и fragment-флоу: e2e начинается с launch: и даёт детерминированный вердикт из чистого состояния, поэтому только он годится для CI. Подводный камень: Chromium-раннер поднимает один Electron-инстанс на запуск, так что вложенный chromium e2e-флоу не может загрузить свой и падает — такие флоу держат верхнеуровневыми.

Звёзды3 206
Авторsoftware-mansion
Установок25,6K

Установка

SKILL.md

Overview

A flow is a sequence of steps saved to a .yaml file in the .argent/flows/ directory. Each recorded step is executed live as you add it, so you verify it works before it becomes part of the flow. Replay a finished flow with flow-execute, or — for an e2e flow — headlessly with argent flow run <name>.

Flows store no device id: the runner binds a device (the single booted one, or pass device/platform). A recorded coordinate gesture-tap is captured as a portable tap: { selector } step whenever the tapped element has stable text/identifier.

Two flow types

  • e2e — begins with a launch: step, which starts that app from scratch (terminate + relaunch), so the flow controls its own start state. No executionPrerequisite. May run: other flows, and (on iOS/Android) may itself be a run: target — when nested, its launch runs inline, restarting the app for that sub-scenario. Chromium is the exception: the runner boots one Electron app per run (the top-level flow's), so a nested chromium e2e flow's launch can't boot its own instance and fails the run — keep chromium e2e flows top-level. Record one by adding a restart-app of the app under test as the first step — it is captured as the launch step.
  • fragment — doesn't begin with a launch; runs against the device's current state. May declare an executionPrerequisite (a documented entry-state contract). Invoked from other flows via a run: step, or directly by you at any time.

Both run via argent flow run <name> — a fragment simply runs against whatever is on screen (its prerequisite is printed as a reminder). Only e2e flows are meaningful CI/suite entries, since only they give a deterministic verdict from a clean start.

Step directives

Beyond raw tool: steps and echo:, flows support declarative directives interpreted by the runner (they are not agent-callable tools). Every directive hard-stops the flow on failure; later steps are reported skip.

DirectiveYAMLMeaning
launch- launch: com.acme.app or - launch: { ios: …, android: … }start the app from scratch (terminate + relaunch) and wait until ready
tap- tap: Login, - tap: { x: 0.5, y: 0.57 }, - tap: { on: Login, times: 2 }, - tap: { on: { x: 0.5, y: 0.57 }, times: 2 }tap by selector (auto-waits) or raw point; times (2 = double-tap) needs the target nested under on: — a selector or a point ({ x, y, times } is rejected)
long-press- long-press: Row 3, - long-press: { x: 0.5, y: 0.6 }, - long-press: { on: <sel>, duration: 1200 }, - long-press: { on: { x: 0.5, y: 0.6 }, duration: 1200 }press and hold an element or raw point (default 800ms; Chromium: mouse press-hold); duration needs the target nested under on: — a selector or a point
type- type: { into: email, text: "a@b.com" }focus a field, type, then press Enter to submit + dismiss the keyboard
scroll-to- scroll-to: "Order #1234" (scrolls down) or - scroll-to: { target: …, direction: right, within: … }momentum-free scroll until the target is visible
pinch- pinch: { on: "Map", scale: 3 } or - pinch: { scale: 0.5 }two-finger zoom in (scale > 1) or out (< 1); big scales chain gestures; on optional — defaults to screen center; open-loop — assert the visible result
rotate- rotate: { on: "Map", by: 90 } or - rotate: { by: -45 }two-finger rotation by degrees (+ CW, − CCW, within ±3000°; options map only); on optional — screen center default; not tool: rotate (orientation)
await- await: { visible: Home }wait for a UI condition
wait- wait: 500pause for a fixed number of milliseconds (last resort — prefer await)
assert- assert: { visible: Welcome }check a condition, hard-fail if it never holds
snapshot- snapshot: home or - snapshot: { name: home, maxMismatch: 0.5 }diff a screenshot against a stored baseline
run- run: loginexecute another flow's steps inline (fragment or e2e)
when- when: { visible: "What's new" } + steps: [...]run a guarded step block only when the condition holds (no else)

Selectors

A selector is { text?, id?, role? } (all-must-match; text/role are case-insensitive substrings, id matches the element's testID / accessibilityIdentifier / resource-id exactly, case-insensitive, also accepting the unqualified Android resource-id name — submit matches com.example.app:id/submit) — the same semantics await-ui-element uses, though that tool spells the id field identifier (flow YAML also accepts identifier as an alias for id, but id is the canonical spelling and what the recorder writes). A bare string is a loose selector: it resolves identifier-first, then falls back to text (label/value), so tap: Login matches a testID="Login" or, failing that, visible text "Login" — no need to know which. Loose fallback applies uniformly to every selector slot (tap, type.into, await, assert, scroll-to). Use the map form to be strict: { id: submit-btn } (identifier only) or { text: Login } (text only, no fallback).

text also takes a regex matcher map — { text: { matches: '^Order #\d+$' } }, in any selector slot — for dynamic text no literal can pin. It tests each node's native own label/value (not the adapter-hoisted subtreeText), though on iOS a container's own label may itself aggregate descendant text, so a wrapper and its leaf can both match. Same regex rules as text.in's matches (see await and assert): unanchored, case-sensitive, single-quoted, invalid pattern fails at parse. So assert: { visible: { text: { matches: '^Taps: \d+$' } } } asserts a counter is on screen with no locator at all, and tap: { text: { matches: '^Order #\d+$' } } taps a dynamic row — though a stable id stays the more robust action target.

Selectors resolve against the full native hierarchy (iOS: the UIView tree; Android: the complete accessibility hierarchy including not-important views) — strictly more than describe or the raw await-ui-element tool see (both use the trimmed tree), with complete testID/resource-id coverage. So an id selector works even when describe collapses or omits the element — don't fall back to coordinate taps just because a testID isn't visible in describe output. And when several elements match — including wrappers whose native text aggregates descendant content — the action directives (tap, type, scroll-to) pick the most specific match: an exact text/identifier match beats a substring hit (for a regex matcher, a pattern consuming the element's whole text counts as exact), then the smallest frame wins.

Quote strings YAML would mangle. An unquoted # starts a YAML comment — tap: Order #1234 silently parses as tap: Order — and bare yes/no/on/off/numbers coerce to non-strings. When a selector or typed text contains #, :, quotes, or could read as a boolean/number, wrap it: tap: "Order #1234".

await and assert

The condition is the key, and its value is the selector:

  • { visible: Home }, { exists: { id: row } }, { hidden: spinner }
  • { text: { in: <selector>, contains: "Taps:" } } or { text: { in: <selector>, equals: "Taps: 0" } } — text locates an element (in) and checks its rendered content against exactly one of contains (case-insensitive substring) or equals (case-insensitive exact match — use it when boundaries matter: contains: "Taps: 3" is also satisfied by "Taps: 30"). Reach for text only when the locator is an identifier/role; to assert a string is simply on screen, prefer { visible: "Taps: 0" }.
  • { text: { in: total, matches: 'Total: \$\d+\.\d{2}' } } — the third comparator: a JS regex for dynamic content (counters, prices, dates) that neither literal mode can pin. Unanchored like contains (anchor with ^…$ for the equals analog) and — unlike the literal modes — case-sensitive: the pattern carries its own semantics. An invalid pattern fails at parse time. Quote the pattern in single quotes: single-quoted and plain YAML scalars keep backslashes; double quotes would need \\d. To assert a dynamic string is simply on screen with no locator, prefer a regex selector — { visible: { text: { matches: '^Taps: \d+$' } } } (see Selectors); text.in + matches is for checking a specific element's aggregated text.
  • A container's text aggregates its descendants' text (space-joined), so text can assert what a testID wrapper visibly shows even when the string lives in a child node. That also means equals against a wrapper must match everything it shows or exactly the wrapper's own label/value — targeting the leaf holding exactly the value (or using contains) stays the clearer spelling.

This condition-as-key form is the only spelling. await also accepts an optional timeout sibling key in milliseconds — - await: { visible: Home, timeout: 15000 } — for a transition that legitimately needs longer than the default budget. Omit timeout by default: the default budget covers normal transitions, and a habitual generous override just delays failure reporting on every broken step. Add one only after a step demonstrably needs it — it timed out at the default and the wait is legitimately slow (a cold start, a network round-trip, a long animation). assert has no timeout override: a check that needs seconds to become true is a wait — spell it await.

For a custom poll interval or bundleId, drop to an explicit - tool: await-ui-element step — but the raw tool polls the trimmed describe tree, so a testID it reports as not found can still resolve fine as an await: directive (see Selectors). Prefer the directive.

type and scroll-to

type presses Enter after typing to commit the value and dismiss the keyboard, so it can't cover later targets. For a chained form whose fields feed one explicit submit — e.g. email then password then a tap: "Log in" — set submit: false on the intermediate fields so a premature Enter doesn't fire the form early: type: { into: password, text: "hunter2", submit: false }.

Never record a real credential into a flow — the YAML is committed to the repo. Use a secret placeholder instead: type: { into: password, text: "{{secret:APP_PASSWORD}}" }. The placeholder is stored verbatim (the YAML stays secret-free) and is resolved at run time by the tool-server from the ARGENT_SECRET_APP_PASSWORD environment variable — including agent-less argent flow run in CI, where the variable comes from the job's secrets.

scroll-to takes an optional direction (up | down | left | right, default down — so the common case is just - scroll-to: <selector>) and optionally a within: <selector> that anchors the scroll inside a specific container — required to drive a nested scroller (e.g. a horizontal carousel inside a vertical list), since the device can't be asked which container to scroll. It scrolls in bounded momentum-free increments, re-checks after each, and stops if a scroll reveals nothing new (end of the container). tap/type do not scroll — add a scroll-to before any target that may be off-screen. It's a no-op when the target is already visible, so a defensive scroll-to costs nothing on replay and keeps the flow working on smaller screens.

TV targets (Vega)

A Vega (Fire TV) device is remote-driven — there is no touch input, so the touch directives (tap, long-press, type, scroll-to, pinch, rotate) fail on it with guidance. Drive focus with tool: tv-remote steps and type with tool: keyboard instead; everything else (launch, await, assert, wait, snapshot, echo, run, selectors) works unchanged — the tree comes from the on-device automation toolkit, which attaches at app launch (the launch step waits for it, so a leading launch also guarantees selectors resolve).

steps:
  - launch: com.example.app.main # the interactive component id from manifest.toml
  - await: { visible: Home }
  - tool: tv-remote
    args: { button: [down, select] } # move focus, then confirm — one step per navigation
  - await: { visible: Explore Screen }
  - snapshot: explore

Since a tv-remote path is positional (like a coordinate tap), gate each navigation with an await on the destination screen and echo where focus should be — that is what makes the flow diagnosable when the focus order changes.

Standalone runner

argent flow run <name> [--device <id>] [--platform ios|android|chromium|vega] [--update-baselines] [--output <dir>] [--json] runs a flow with no LLM in the loop and exits non-zero on any failure — suitable for CI (e2e flows; a fragment runs against the current device state, useful while authoring). snapshot baselines live in .argent/flows/__baselines__/<flow>/, keyed by platform + resolution; a snapshot step fails when no baseline exists for the run's device class, so seed baselines with --update-baselines and have the user review and commit __baselines__/ — and pin the device class in CI (--device/--platform, same simulator model) so runs compare against the committed key. The status bar is pinned (iOS simctl status_bar, Android demo mode) for the run so it doesn't drive visual diffs. --output <dir> writes each failed snapshot's baseline/current/diff images to <dir>/<flow>/ — a stable path for CI artifact upload.

Tools

ToolPurpose
flow-start-recordingStart recording — takes a name and (fragments only) an optional executionPrerequisite; creates the file
flow-add-stepExecute a tool call live and record it if it succeeds
flow-add-echoAdd a label/comment that prints during replay
flow-finish-recordingStop recording and get a summary
flow-read-prerequisiteRead a flow's execution prerequisite without running it
flow-executeReplay a saved flow by name

Every tool during recording returns the current flow file contents, so you can track what has been recorded. Rules:

  • Every step runs live. You see the real tool result (including screenshots) — verify the step worked before continuing. Only successful steps are recorded: a failed call writes nothing to the flow file; fix the issue and try again.
  • Pass project_root once. Give the absolute project_root (an error is returned if the path is not absolute) to flow-start-recording — it is stored for the session and used by all subsequent flow tools. You do not pass a flow name to flow-add-step, flow-add-echo, or flow-finish-recording — the active flow is tracked automatically.
  • Start before adding. Calling those tools without an active recording returns "No active flow. Call flow-start-recording first."
  • One flow at a time. flow-start-recording while already recording switches to the new flow — the response tells you which flow was abandoned and which is now active; the old flow's file remains on disk.
  • Mistakes can be edited out. Edit the .yaml file directly to remove or reorder steps.

flow-add-step arguments

The command parameter is the MCP tool name; args is a JSON string (not an object), omitted entirely for tools with no arguments:

command: "gesture-tap"
args: "{\"udid\": \"<UDID>\", \"x\": 0.5, \"y\": 0.35}"

command: "await-ui-element"
args: "{\"udid\": \"<UDID>\", \"condition\": \"visible\", \"selector\": {\"text\": \"Continue\"}}"

Record an await-ui-element step to gate the next step on a screen transition — it blocks until the element is visible/hidden (or contains text), so the following step runs only once the screen has actually settled; prefer this over a fixed delayMs. If its condition is not met before the timeout, replay stops at that step (the steps after it assume the transition happened). See the await-ui-element section of argent-device-interact for the full condition/selector reference. The live call sees only the trimmed describe tree — if it can't find an identifier you know exists, gate on visible text to get the step recorded, then retarget the identifier in the await: form during polish (the directive resolves the full hierarchy — see Selectors); don't conclude the testID is unusable in the flow.

Recording

  1. Start, then launch as the first step (e2e) or set the stage yourself (fragment). Call flow-start-recording with a descriptive name and the absolute project_root. For an e2e flow, record a restart-app of the app under test as the first step — it runs live (resetting the device for the rest of the recording) and is captured as the flow's launch step. For a fragment, bring the device to the entry state before recording and pass an executionPrerequisite describing it (e.g. "App on the login screen") to flow-start-recording instead.
  2. Build step-by-step: for each action, call flow-add-step with the tool name and args. The tool runs immediately — check the result before moving on, and gate each navigation with an await-ui-element step.
  3. Add labels: use flow-add-echo between steps — echo the expected state, not just the action (see Making flows resilient).
  4. Finish: call flow-finish-recording. It returns the file path where the flow was saved and a summary of all steps.
  5. Polish: read the saved .yaml file and convert the raw tool: steps that have a cleaner directive form (the recorder leaves these as tools):<!-- -->
    • tool: keyboard typing into a field → type: { into: "<field>", text: "…" }, folding in the tap that focused the field.
    • tool: await-ui-element gating a transition → await: { visible: "…" } / { hidden: … } / { text: { in: …, equals: … } }, carrying a custom timeoutMs over as a timeout sibling key. Converting also upgrades the wait from the trimmed describe tree to the flow's full-hierarchy tree (see Selectors). Keep the raw tool: await-ui-element step only when it sets a custom pollIntervalMs/bundleId the directive can't express.
    • A scroll-to-reach-an-element — a tool: gesture-swipe (or its chromium analog, gesture-scroll) used to bring a specific element on screen before interacting with it (a tap, type, assert, …) → scroll-to: { target: "<that element>", direction: … }, dropping the swipe. This is far more robust than a fixed-distance swipe: it scrolls momentum-free and stops exactly when the target appears, so it survives layout and content changes. (tap/type do not scroll, so a raw swipe whose fling lands differently on another device leaves the following tap unresolved — always prefer the scroll-to rewrite.) Keep a gesture-swipe as a raw tool: step when it isn't scrolling toward a specific element — especially a velocity-dependent gesture like swipe-to-dismiss, edge-swipe-back, or swipe-to-reveal a row action, which a momentum-free scroll-to would not reproduce.
    • tool: gesture-pinch → pinch: { on: "<target>", scale: … }, deriving scale as endDistance / startDistance. Set on: to the element under the pinch center when the pinch was aimed at one (the map or image being zoomed); omit it for a screen-center pinch. Don't carry the recorded distances/angle over — the directive re-derives the geometry (finger placement, system-edge avoidance, chaining of large scales) at run time, so the conversion swaps device-specific coordinates for a portable selector with auto-wait. Keep the raw tool: gesture-pinch step when the pinch is anchored at a specific point inside a large element (zooming toward a particular map location, not the map's center) or deliberately pans via endCenterX/endCenterY — on: takes only a selector and re-centers the pinch on the element's frame center, so converting would silently move the zoom anchor.
    • tool: gesture-rotate → rotate: { on: "<target>", by: … }, deriving by as endAngle − startAngle (the tool's endAngle > startAngle turns clockwise, matching the directive's positive by). Set on: to the element under the rotation center when the rotation was aimed at one (the map or image being rotated); omit it for a screen-center rotation. Don't carry the recorded centerX/centerY, radii (radius or radiusX/radiusY), startAngle, or durationMs over — the directive re-derives the geometry (finger placement, physical-circle radius, system-edge avoidance) and runs at a fixed pace (~90° per 300 ms), so the conversion swaps device-specific coordinates for a portable selector with auto-wait. Keep the raw tool: gesture-rotate step when the rotation is anchored at a specific point inside a large element rather than its center (the directive re-centers on the element's frame center, so converting would silently move the pivot), when the gesture's speed itself matters (the directive's pace is fixed), or when the sweep exceeds the directive's ±3000° bound.

Every other recorded tool (a velocity-dependent gesture-swipe, a fixed-distance gesture-scroll not aimed at an element, button, screenshot, …) has no directive form — leave it as a tool: step. The recorder already handles the rest: coordinate gesture-taps are captured as portable tap: selector steps, a restart-app is captured as a launch: step, a flow-execute of a sibling fragment is captured as a run: <name> composition directive, and device ids are stripped. Captured selectors are emitted in the strict map form (tap: { text: General }), never as a loose bare string — the recorder verified the exact element the tap hit, and a bare string would re-parse as loose and route through the identifier-first fallback it was never checked against. After editing, re-run with flow-execute to confirm the cleaned flow still passes.

Example session

flow-start-recording  { name: "open-about", project_root: "/Users/dev/MyApp" }
flow-add-echo  { message: "Start Settings from scratch" }
flow-add-step  { command: "restart-app", args: "{\"udid\": \"ABC\", \"bundleId\": \"com.apple.Preferences\"}" }   # ⇒ captured as `- launch: com.apple.Preferences` — this is now an e2e flow
flow-add-echo  { message: "On the Settings root list, tapping the 'General' row" }
flow-add-step  { command: "gesture-tap", args: "{\"udid\": \"ABC\", \"x\": 0.5, \"y\": 0.35}" }   # ⇒ captured as `- tap: { text: General }` (portable selector, no udid)
flow-add-step  { command: "await-ui-element", args: "{\"udid\": \"ABC\", \"condition\": \"visible\", \"selector\": {\"text\": \"About\"}}" }   # gate the transition
flow-add-echo  { message: "On Settings > General, tapping 'About'" }
flow-add-step  { command: "gesture-tap", args: "{\"udid\": \"ABC\", \"x\": 0.5, \"y\": 0.17}" }
flow-add-step  { command: "await-ui-element", args: "{\"udid\": \"ABC\", \"condition\": \"visible\", \"selector\": {\"text\": \"Model Name\"}}" }
flow-finish-recording  {}

Then polish the saved file: the two await-ui-element steps become await: directives (see the file below).

Replaying

Call flow-execute with the flow name (and project_root, unless a recording this session already stored it). If the flow has an execution prerequisite, the tool returns a notice with the prerequisite text instead of running — verify the prerequisite is met (you can also inspect it beforehand with flow-read-prerequisite) and call flow-execute again with prerequisiteAcknowledged: true. A flow without a prerequisite runs immediately. The run executes all steps in order and returns a structured report: { ok, passed, failed, skipped, errored, steps }.

What each step reports. Raw tool: steps include the underlying tool's full result (screenshots and other outputs render as usual). The directive steps are summarized: tap/type/await/assert report only status + reason, and snapshot adds artifacts only when there is something to look at — a failed comparison (baseline/current/diff paths), a missing-baseline failure (current only), or a baseline write; a clean pass reports just status + reason. So converting a tool: gesture-tap into a tap: directive during cleanup drops only that tap's (uninteresting) raw result — output-bearing tools like screenshot have no directive form and stay tool: steps, so their results keep flowing through.

Flow file format

The top-level is an object with steps (array) and — fragments only — executionPrerequisite (an e2e flow, one beginning with launch:, has none). Besides the directives above:

  • - echo: <message> — a label printed during replay
  • - tool: <name> with optional args: — a raw tool call. A tool step may also carry delayMs: <ms> to sleep that long before it runs. (await-ui-element is an ordinary tool step; see flow-add-step arguments and Making flows resilient for when to gate a transition with one.)
  • when: blocks handle one-sided divergences (interstitials, coach marks): - when: { visible: "What's new" } with a sibling steps: [...] list runs the block only if the condition holds — checked once with the short assert grace (~1s), so a skipped block barely costs a clean run. Guards are one condition key (exists/visible/hidden/text, the await/assert shapes) or platform: ios|android|chromium|vega. No else (parse-rejected): a block exists to dismiss the divergence and reconverge, never to test two paths — two paths are two flows. Failures inside an entered block are real failures; a skipped block reports skip lines. Tap-if-present is a one-step block (when: { visible: "Got it" } + steps: [tap: "Got it"]); there is NO per-step optional: key — it is rejected at parse with a pointer to when:.

The polished result of the example session above:

steps:
  - echo: Start Settings from scratch
  - launch: com.apple.Preferences
  - echo: On the Settings root list, tapping the 'General' row
  - tap: { text: General }
  - await: { visible: About }
  - echo: On Settings > General, tapping 'About'
  - tap: { text: About }
  - await: { visible: Model Name }

Note there is no device id anywhere in the file — the recorder strips them and the runner injects the bound device.

When to proactively record a flow

Proactive recording is part of this skill's scope (see the description). Record a flow without waiting to be asked — telling the user you are doing so — when you recognize any of these patterns:

  • About to re-profile: You completed a profiling session and are about to apply a fix and re-profile. Record the interaction steps now so the re-profile replays them identically (see argent-react-native-profiler and argent-native-profiler skills).
  • Repeating steps: You have already performed a multi-step interaction sequence once and the task requires doing it again (comparison, retry, re-test).
  • Complex path discovered: You worked through a non-trivial sequence of taps/swipes/navigation to reach a desired app state. Capture it before it is lost.
  • User says "again" / "one more time": Any request to redo what you just did is a signal to record first, then replay.

Flow self-improvement

Flows break. UI layouts change, coordinates drift, screens get added or removed. When flow-execute returns a failure, follow this procedure to diagnose and fix the flow instead of silently re-recording or giving up.

Classify the result

After every flow-execute, classify the outcome before proceeding:

OutcomeSignalAction
SuccessAll steps completed, final screenshot shows expected stateContinue with task
Hard errorA step has ERROR in the result — engine stopped thereEnter Diagnose
Silent misfireAll steps completed but final screenshot shows wrong screenEnter Diagnose
Partial divergenceIntermediate screenshot shows wrong state even though later steps ranEnter Diagnose

For silent misfires and partial divergence, echo annotations (see Making flows resilient) are your reference for what each screen should look like.

Diagnose

  1. Note the failure step index and error message (if hard error).
  2. Call screenshot to see where the app actually is now.
  3. Call describe or debugger-component-tree to get the current element tree. Remember describe shows less than the flow tree — a testID missing from its output can still resolve as a selector (see Selectors).
  4. Compare current state to what the failed step expected. Classify the root cause:
Root causeSymptoms
Coordinate driftTap succeeded but hit wrong element; elements shifted positions
Missing elementTarget element not present in element tree
Wrong screenScreenshot shows entirely different page than expected
TimingElement exists in tree but tap missed; loading spinner visible
State mismatchFirst step fails — executionPrerequisite was not actually met
  1. State the diagnosis in one sentence before attempting any correction.

Correct

Choose the lightest strategy that fits:

Strategy 1 — Edit the YAML (coordinate drift, parameter changes). Read .argent/flows/<flow-name>.yaml, update the broken step's x/y, bundleId, text, or other args. Re-run flow-execute to verify.

Strategy 2 — Manual recovery + continue (timing/transient issues, one-off replay). Manually execute the failed step with corrected coordinates from the Diagnose step, then manually execute remaining steps. Does not fix the YAML — use only when re-recording is not worth it.

Strategy 3 — Re-record from failure point (structural changes, new intermediate screens). Navigate the app to the state just before the failure point. Call flow-start-recording with the same flow name (overwrites). Re-add the working prefix steps via flow-add-step, then continue recording new steps from the divergence point. Call flow-finish-recording.

Strategy 4 — Full re-record (major changes, unclear diagnosis, or 3+ broken steps). Reset the app to prerequisite state (restart-app + launch-app). Record from scratch with the same flow name.

Decision heuristic:

  • 1 step broken, parameter-only change → Strategy 1
  • 1 шаг сломан, проблема временная, сохранять не стоит → Стратегия 2
  • 2–3 шага сломаны или структура потока частично изменилась → Стратегия 3
  • 3+ шага сломаны или причина неясна → Стратегия 4
  • Поток, использованный для сравнения профилирования (должен быть идентичным) → Стратегия 4

Проверка и ограничение повторов

После применения исправления повторно запусти flow-execute для проверки.

  • Если успешно → готово. Сообщи, что изменилось (например, "Исправлен шаг 4: координаты тапа обновлены с 0.5,0.35 на 0.5,0.42").
  • Если сбой на другом шаге → вернись к Диагностике для второй попытки.
  • Если это уже вторая попытка исправления → остановись. Сообщи диагноз пользователю и порекомендуй полную перезапись или ручное исследование.

Жёсткий лимит: 2 цикла исправления. Не входи в бесконечный цикл исправлений.

Обеспечение устойчивости потоков

Применяй это при записи новых потоков, чтобы уменьшить будущие поломки:

  • Отражай ожидаемое состояние, а не только действия. Пиши "On Settings > General screen, about to tap About" не "Tap About". При диагностике это подскажет, как экран должен выглядеть.
  • Ограничивай переходы через await-ui-element, а не фиксированные задержки. После тапа, вызывающего навигацию, записывай await-ui-element шаг, который ждёт, пока элемент следующего экрана станет visible (или спиннер станет hidden) перед следующим шагом — преобразуется в await: директиву при полировке. Это устраняет режим отказа Тайминг в Диагностике (элемент есть в дереве, но тап сработал до того, как экран стабилизировался) и надёжнее, чем delayMs или дополнительный screenshot. Невыполненное ожидание останавливает воспроизведение на этом шаге, поэтому шаг с неверным таймингом никогда не выполнится вслепую.
  • Добавляй шаги скриншотов после критической навигации. Вставляй screenshot шаги после переходов между экранами. Они создают изображения в результате потока, которые можно изучить при диагностике.
  • Пиши конкретные executionPrerequisites. "App on home tab, user logged in, simulator UDID is <X>" — не "App running". Проверяй с помощью screenshot + describe перед подтверждением.
  • Предпочитай launch-app / open-url цепочкам навигации. Глубокие ссылки более устойчивы к изменениям макета, чем последовательности тапов.
  • Отражай метки доступности для тапов по координатам. При записи тапа добавляй эхо с меткой или testID цели: "Tapping 'Submit' button (testID: submit-btn) at 0.5, 0.82". При исправлении используй describe чтобы найти элемент по метке и обновить координаты. Используй screenshot только для разрешений или системных оверлеев, когда describe не может надёжно обнаружить цель.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: argent-create-flow](https://darkplay.ru/ai/skills/software-mansion-argent-argent-create-flow)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

mattpocock-skillsmattpocock · Агентские навыки Matt Pocock для настоящей инженерии: разбор задач, потоки спецификаций и…
41 комп.
eccaffaan-m · Нативный для harness операторский слой ECC: 67 агентов, 278 навыков, 94 шима устаревших…
441 комп.
Add Language Rulesaffaan-m · Каркас команды workflow для add-language-rules в everything-claude-code.
225 587 ★
Chief Of Staffaffaan-m · Личный руководитель коммуникаций, который сортирует почту, Slack, LINE и Messenger…
225 587 ★
Code Architectaffaan-m · Проектирует архитектуру функций, анализируя существующие паттерны и соглашения кодовой…
225 587 ★
Database Migrationaffaan-m · Каркас команды workflow для database-migration в everything-claude-code.
225 587 ★
E2e Runneraffaan-m · Специалист по E2E-тестам на Vercel Agent Browser и Playwright: генерация, запуск и…
225 587 ★
Feature Developmentaffaan-m · Каркас команды workflow для feature-development в everything-claude-code.
225 587 ★
Network Troubleshooteraffaan-m · Диагностирует сетевые проблемы по уровням OSI с обоснованным выводом о причине.
225 587 ★
Skill Createaffaan-m · Анализирует локальную историю Git, извлекает паттерны кодирования и генерирует файлы…
225 587 ★

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8