skills/reflex-browser/SKILL.md
Use this skill for browser automation through Reflex Agent using the reflex CLI, including session handling, command flow, selectors, screenshot-assisted discovery, visual QA, and protocol-safe request patterns.
npx skillsauth add fruffel/reflex-browser-skill reflex-browserInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the task involves a website or browser: navigating pages, clicking elements, reading content, filling forms, scraping data, or automating a web flow.
This skill covers interactive browser work via reflex browser ... CLI commands. Each command is a single stateless action — run one, inspect the JSON response, then decide the next step.
When the end goal is a reusable Lua or Python browser automation script, still start here first: use reflex browser ... to inspect the site, verify the flow, and stabilize selectors before writing script code. Then switch to the reflex-scripting skill for the script itself.
reflex-scripting for the script)reflex-scriptingreflex-scriptingreflex-scriptingreflex-scriptingnpm config set @reflexautomation:registry "https://git.bqa-solutions.nl/api/packages/reflex/npm/" --location=usernpm config set "//git.bqa-solutions.nl/api/packages/reflex/npm/:_authToken" "YOUR_DEPLOY_TOKEN" --location=usernpm install -g @reflexautomation/reflex-clireflex browser start--session on follow-up commandsreflex browser open https://example.com--session only for deterministic override:
reflex browser open https://example.com --session <sessionId>reflex browser session-kill in auto-session mode.
reflex browser session-kill --session <sessionId> (or reflex browser session-kill <sessionId>)Use the CLI itself as the command/protocol source of truth:
reflex browser --helpreflex browser help --json--session by habit after start; normal flows should stay in scoped auto-session mode.summary first and fine-tune it (-i -c, then -s, -C, -d) for selector discovery and recovery before trying eval or html; treat html as last-resort evidence, not normal recovery. Start with count 20; increase only when the page has many repeated items.summary --state --screenshot when selector recovery or page review needs visual evidence; keep screenshots opt-in instead of adding them to every pass.reflex browser help --json for exact command/response/schema details instead of duplicating those rules here.start -> open -> summary.reflex lua libs, repeated help calls, external doc hunts, or speculative output-format work.reflex agent statusreflex agent startreflex agent downloadreflex agent runtime installreflex agent start or reflex agent download.reflex agent ... commands directly instead of only telling the human what to do.reflex agent ... command the human should run.Recommended recovery flow:
reflex agent status
reflex agent start
reflex agent download
reflex agent runtime install
&&, long shell pipelines, or opaque wrappers.--session on commands unless explicit override is required.reflex browser session-kill when done unless the user explicitly asks to keep the session open.jq | head) as the only observable output; this hides critical context.ok, action, session) as source-of-truth; mirrored duplicates may be compacted out of response.response.state and response.artifacts as optional add-ons when explicitly requested; existing summary parsers can ignore them.response.data.summary.targets[]; do not replace the parser contract with screenshot-only reasoning when actionable selectors are needed.summary.targets[], use reflex browser help --json as the contract reference.summary first.response.data.summary.targets[] as the primary selector feed:
selectorselectorTypeconfidencereasonstatushintfallbackref — short-lived element ref (@r1, @r2, …); prefer over selector when presentsummary.version + summary.targets[] as the stable parser contract; avoid parsing deep fields from full summary output by default.elements/actions/candidates-style fields from summary output.click/text/attribute/etc.)The positional count argument controls how many targets (ranked actionable elements) and snapshot lines are returned. It does not control how much of the DOM is scanned — the agent always scans up to 2000 nodes regardless.
summary 20 -i -c. This is enough for most pages.-s, -C, -d), not by increasing the count.summary 80 as a general "show me everything" — it adds low-confidence targets and more snapshot noise without improving discovery quality.When the first summary pass is weak, noisy, or incomplete, stay in summary mode and refine it before escalating:
summary 20 -i -c for normal interactive discovery.-s "<container>" to scope discovery to the relevant region.-C.-d <n>) and scope (-s) instead of increasing count or switching tools.summary after DOM-changing actions and continue from fresh refs/targets.html only after at least 2 materially different summary passes still fail to expose enough structure for a targeted click/text/attribute/property call.html, immediately switch back to targeted commands; do not keep planning from raw HTML dumps.reflex browser screenshot for pure visual review when no selector discovery is needed.reflex browser summary 20 -i -c --state --screenshot when the task needs both selector recovery and visual confirmation.summary, do not add screenshot payloads on every pass.summary.targets[] as the action feed.When summary only surfaces cookie/consent/chat widgets or other overlays:
summary immediately after the overlay changes the DOM.html or other last-resort evidence after overlay cleanup plus the normal summary refinement ladder still fails.Each summary call assigns short-lived refs (@r1, @r2, …) to interactive elements:
targets[].ref and inline in snapshot lines as [ref=@rN].click "@r10", fill "@r5" "text", attribute "@r3" href.click, fill, type, enter, tab, open, back, forward, refresh, tab switches). Re-run summary after such actions to obtain fresh refs.errorCode: ELEMENT_STALE with a recoveryHint — always re-run summary on that error.# summary returns: - link "Fiction" [ref=@r10]
reflex browser click "@r10" # navigate using ref
# after navigation, refs are invalidated — re-run summary
reflex browser summary 20 -i -c
# - link "Soumission" [ref=@r150]
reflex browser attribute "@r150" title # read without re-discovering selector
reflex browser attribute "@r150" href
Helper script:
scripts/capture_json.sh provides rb_capture, rb_jq, and rb_pick_selector for safe full-response handling.source skills/reflex-browser/scripts/capture_json.sh (from project root).The reflex browser lua command generates a Lua trace of the current browser session:
reflex browser lua after the browser flow is already stable and validated.response.data.generationGuidance is present, apply it when producing the script.reflex browser lua to rescue an unstable discovery session; the trace will mirror dead-end navigation.reflex-scripting skill.start to get-or-create the scoped auto-session.start, continue commands without --session in normal flows.--session <id> only when:
--session (no value) only on start or open when a fresh backend-assigned session id is explicitly required.--session by habit in single-flow tasks.--profile only when persistent browser state is intentionally needed.--engine selenium|playwright (aliases: sel, play) before bootstrapping when the task specifically needs one engine.options.engine as the canonical engine field.options.browser.summary.
-i for interactive discovery.-C for cursor-interactive components.-c to reduce structural noise.-s <selector> to scope discovery to a container.start/open, which recreate the same inferred auto-session id when needed.ok: false) to avoid cascading selector errors.open; CLI resolves them against current session URL.no such element or timeout on the same intent as a selector-state mismatch, not a transient flake.reflex agent status / reflex agent start before switching selector strategy.click, fill, type, and open include waiting behavior; avoid redundant waits.wait for real state transitions:
back / forward / refreshsummary again with tighter flags and continue with updated selectors.wait/visible/enabled/selected, pass per-check timeout as the positional argument (wait "<selector>" 8000); reserve global --cli-timeout for transport/command envelope timeout.eval as default extraction when text, summary, attribute, or property can answer the task.open.article:nth-of-type(n) when siblings are actually li elements).html dumps after the first weak summary instead of fine-tuning summary scope/flags first.--session by habit in single-flow tasks that should use default auto-session behavior.--help mid-task as a substitute for the documented selector/session workflow.reflex lua libs, repeated help calls, external doc hunts) before trying start -> open -> summary on the target page.eval, html, or external fetching instead of clearing the overlay and re-running summary.When browser commands alone are not enough to complete the task:
reflex xlsx ..., reflex csv ...) or reflex lua exec "..." — see the reflex-scripting skill.reflex-scripting skill after browser discovery is done. Carry forward all discovered selectors, refs, URLs, and page transitions.Use reflex browser help --json for the exact machine-readable response schema, including:
selector, ref, text, and hrefresponse.data.valueresponse.state and response.artifacts.screenshotresponse.errorCode and response.recoveryHintcss=ol.row > li).wait or visible.... > li:nth-of-type(2) h3 a).attribute ... title for titles when presenttext ... .price_color for visible price textUse this only when writing shell wrappers around CLI JSON output.
For normal CLI usage, prefer open <href> directly (relative URLs are auto-resolved).
get_value() { jq -r '.response.data.value // empty'; }
get_url() { reflex url | get_value; }
open_target() {
local href="$1"
reflex browser open "$href" >/dev/null
get_url
}
Use the same pattern in PowerShell when running on Windows.
function Get-Value {
param([Parameter(ValueFromPipeline = $true)] $obj)
process { $obj.response.data.value }
}
function Get-Url {
reflex url | ConvertFrom-Json | Get-Value
}
function Open-Target {
param([string]$Href)
reflex browser open $Href | Out-Null
Get-Url
}
references/commands.mdreferences/protocol.mdreferences/selectors.mdreferences/session-management.mdexamples/books-to-scrape-summary.mdexamples/page-to-export-one-off.mdexamples/careers-to-xlsx-lua.mddevelopment
Use this skill for Reflex library commands and scripting — direct one-off commands (reflex xlsx, reflex rest, reflex csv, ...), inline Lua/Python scripts, and saved reusable scripts.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------