agentleFS
matthewdonsemail-labmatthewdonsemail-lab/log/skills/flow/SKILL.md

flow

Skill63 starsChanged yesterdayMITView on GitHub

Turn a `log inspect` recording into a flow (rule 31) - a definition built from the recording, its documentation, an XState machine, the `log flow run` command and an MCP tool of its own - and run it on any account. Use after recording a procedure with inspect, when the owner says "make it a state machine", "run it on another account", "register it as an MCP", or to run a saved flow.

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use grill, implement and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • renatorozasSkill

    grill

    Adversarial code review. Don't let me ship until the changes pass your scrutiny.

    Also in 3 projects that use this

  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 5 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 6 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run it live (rule 26): Monitor.

    line 32
  2. Very specific:

    Before a flow's first click, fill, upload or location, clearOverlays reads the page and presses Escape for each known overlay over it …

    line 79
  3. Very specific:

    When a platform changes a page, add its snapshot excerpt to python/fixtures/controls/ (no names, no page copy) and a case to …

    line 87

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

flow

Record once, then run anywhere: recording → definition → docs → machine → command → MCP tool.

Hard boundaries

  1. Built from a recording, never by hand (rules 25, 29). Each step's element is the role and accessible name the recorded snapshot gave it; each step's confirming request is the mutation the recorded step sent. A confirming request only proves the call happened. What it answered decides the step (rule 73): a step's answers name the call and what its answer must say (a value, what we sent, present, the account's home city, country or id), with the error code it raises, written from the request's doc ("What it sent and what came back"). Every step with a confirming request checks the field its request doc says it answers, and a test refuses a flow step that waits on a call without checking its answer. A streamed answer is read from its first part. The flow's doc shows every check, and recording the flow again keeps them.
  2. Dry run unless --live (rule 8); over MCP, live is its own tool (the flow's tool name ending in Live), with confirmLive.
  3. Every gate (rules 19, 35): a run is one launch through the inspect session, so every step is recorded again (snapshot, screenshot, HAR, rea) and mapped.
  4. No credential in a step or param: sign-in is signIn/code, which read the private login.json; typed values are redacted in snapshots.
  5. Run it live (rule 26): Monitor; every machine state prints.

The routine

The example is a Facebook flow, profileSetup:

# 1. record (skills/inspect)
log inspect start --account <a> --url <url> --bypass --now
log inspect do click <ref> --live ...   # one step at a time
log inspect do stop

# 2. recording → definition + docs (params renamed from text1/file1)
log flow fromInspect ~/.logCli/runs/inspect/<run> --name profileSetup \
  --rename text1=firstName --rename text2=lastName --rename file1=profilePhoto --rename file2=coverPhoto

# 3. run it on another account (dry run first: lists the filled steps, opens nothing)
log flow run profileSetup --account <a> --set firstName=<first> --set lastName=<last> \
  --set profilePhoto=<path|url> --set coverPhoto=<path|url>
log flow run profileSetup --account <a> ... --live --bypass --now

Over MCP the same run is the flow's own tool with account and the params by name, and its live twin with confirmLive: true. The CLI words (log flow run <name>) are the same on every platform.

A failed step ends the run (failedAt): read that step's folder in the new recording (rule 25), re-record the changed part with inspect, rebuild the flow.

Deterministic steps (rule 79)

A step never guesses which control to press: python/browser/controlMatch.py scores every visible control by role, then name, inside the step's dialog (within). The exact requirements (and their error codes) are in docs/specs/flows.md. A Dismiss button with no accessible name is found by its text.

fromInspect writes what keeps a step deterministic:

  • within: the dialog around the control in the snapshot before the step.
  • expect: the call the step must cause, a mutation first, else a plain endpoint, else a …DialogQuery. The session waits for it, and the step fails without it.
  • answers: what that call must say (rule 73), added from the recording's exchanges before the flow ships; answers.test.ts refuses a step with expect and no answers.

Before a flow's first click, fill, upload or location, clearOverlays reads the page and presses Escape for each known overlay over it (OVERLAY_CLEARS, src/browser/flow/helpers/overlays.ts), then reads the page again. One still there after its Escape, or a clear call that answers otherwise, stops the flow at that step with overlayNotCleared. An overlay no known state names stays unknown, for SubQ to read (rule 73). A new overlay is added there with its page state, fixture and answer.

When a platform changes a page, add its snapshot excerpt to python/fixtures/controls/ (no names, no page copy) and a case to src/browser/flow/controlMatch.test.ts, so the next change fails a test, not a live run.

Rebuild the platform's request docs after a run.

Facebook's flows, their tools, checks and overlays: skills/facebookFlows/SKILL.md (the facebookFlows guide).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.