kane-cli
Browser automation + AI test authoring via kane-cli - run browser objectives, generate & refine test scenarios/cases from a description, design requirement-linked test suites from a PRD/spec (assurance), parse NDJSON output, inspect logs, save runnable _test.md. Use for any task requiring a real browser (navigate, click, fill forms, test web UI, take screenshots), or to author test cases, quick cases from a description via kane-cli generate; a designed, coverage-accounted suite from requirement documents via the assurance commands. Never write test cases by hand. Also runs mobile app tests on macOS Apple Silicon - native Android app on a virtual emulator or iOS app on a simulator via --target emulator|simulator (desktop browser stays the default target).
Get
https://deepseekmodel.com/api/download.php?id=lambdatest-kane-cli-agents-skills-kane-cli-skill-md&format=skill
name kane-cli description Browser automation + AI test authoring via kane-cli - run browser objectives, generate & refine test scenarios/cases from a description, design requirement-linked test suites from a PRD/spec (assurance), parse NDJSON output, inspect logs, save runnable _test.md. Use for any task requiring a real browser (navigate, click, fill forms, test web UI, take screenshots), or to author test cases, quick cases from a description via kane-cli generate; a designed, coverage-accounted suite from requirement documents via the assurance commands. Never write test cases by hand. Also runs mobile app tests on macOS Apple Silicon - native Android app on a virtual emulator or iOS app on a simulator via --target emulator|simulator (desktop browser stays the default target). Kane CLI — Browser Automation Skill Use kane-cli for any task that requires a real browser : navigating websites, clicking elements, filling forms, searching, testing web UI, taking screenshots, or verifying deployments. Do NOT use Playwright, Puppeteer, or Selenium directly. Always run with --agent so output is structured NDJSON you can parse. Authoring test cases or scenarios? Never write them by hand — kane-cli has two authoring pipelines, and the routing matters: The user describes what to test in a sentence or two, or wants quick scenario/case ideas → kane-cli generate (§6). The user has requirement documents (a PRD, a spec, acceptance notes) and wants a designed suite, requirement-linked coverage, or "what exactly is covered?" answers → the assurance commands — Read references/assurance.md first. Don't draft test cases in chat or scratch files: both pipelines produce structured, refinable, runnable _test.md output. 1. Narration and results presentation — READ THIS FIRST A one-line "Test passed" instead of the results table is a bug. This section is first so you don't miss it. Follow it exactly. 1.1 How to launch kane-cli All platforms use Bash to launch kane-cli. Do NOT use Monitor — it creates excessive noise. One-time setup — telemetry env var (silent, do once before the first Bash call). Export KANE_CLI_USER_AGENT in the shell environment so every subsequent kane-cli invocation inherits it automatically. Pick a short, stable identifier for the AI assistant or IDE running this skill (e.g. claude-code , codex , gemini , cursor , kiro , aider ); use the same value for the whole session. Run this once, silently — do not surface the export to the user, and do not repeat the prefix in any command you show: export KANE_CLI_USER_AGENT=<your-runtime> After that, run kane-cli normally — the variable is inherited: kane-cli run "<objective>" --agent <other-flags> Bash blocks until kane-cli exits, then hands you the complete stdout. Parse it, summarize what happened, and present the results table. Same pattern for kane-cli testmd run and kane-cli generate . Set a generous timeout (up to 600000ms) since browser runs can take a while. 1.2 Before you launch Before invoking Bash, emit: Starting browser task: <one-line restatement of the user's objective>. That single line tells the user something is in progress. No todos needed — Bash returns all output at once and you summarize it below. 1.3 After the run — summarize what happened Once Bash returns, parse the captured NDJSON stdout and present a concise summary of what happened. Not every event deserves a line — surface what matters and skip the noise. Progress events have step / status / remark fields and no type field . What to surface Show Which events How Failures Any step with status: "failed" Step <n> failed: <remark> Flow changes bifurcation , child_agent_start , child_agent_end Plain-language one-liner (e.g. "The agent split the objective into 2 sub-tasks") Errors error typed events Error: <message> Overall progress All passing steps One summary line: <total> steps completed — <2–4 key actions from remarks> What to skip Individual passing steps — fold them into the overall progress line Internal field names ( step , status , remark , run_end , final_state , bifurcation , session_dir , project_folder_auto_defaulted , etc.) — translate to plain language. A project_folder_auto_defaulted event fires before progress when the run-startup gate auto-resolves a project/folder; surface it as one line ("kane-cli auto-selected project X / folder Y for this run") and move on. Details: references/test-manager.md . Example output for a 15-step run with one failure Starting browser task: Search for laptop on Amazon and add to cart. <Bash runs…> 15 steps completed — navigated to amazon.in, searched for 'laptop', filtered results, added to cart. Step 6 failed: Could not find Add to Cart button — the agent retried successfully. | | | |-------|-------| | 🟢 **Result** | Passed | | …results table… | For short runs (≤ 3 steps), you may list each step individually since there's nothing to fold. 1.4 After run_end — present the results table The terminal event has type: "run_end" and stable fields: status , summary , one_liner , duration , credits , final_state , test_url , session_dir , run_dir . For a passing run, always emit this exact table (substituting the field values): | | | |-------|-------| | 🟢 **Result** | Passed | | 🎯 **Task** | < one_liner > | | ⏱️ **Duration** | < duration > s | | 👣 **Steps taken** | < count of progress events > | | 📝 **What happened** | < summary > | | 🔗 **View details** | [ Open in KaneAI Dashboard ]( <test_url> ) | If final_state has values (the user used "store as X" — see §4), append a second table: | 📦 What was found | Value | |-------------|----------------| | < key from final_state , humanized > | < value > | If the objective used assertions ("assert …", "verify …"), append a pass/fail table per assertion derived from the run summary and step remarks. 1.5 On failure For exit code 1 (or status: "failed" in run_end ), present a plain-language failure report — never raw paths or NDJSON. Template: 🔴 **Failed** at step < n > of < total > (after < duration > s) **What happened:** < plain-language description of the failing step ' s remark > . **Likely cause:** < your diagnosis: missing element , slow page , ambiguous objective , auth wall , etc. > **Suggested fix:** < one concrete next step the user can take > . The failing step's screenshot lives inside the run's evidence pack (the stderr hint names the pack path): extract it with unzip <pack> "tests/*/steps/*/screenshot.png" -d <tmpdir> , Read it, and show it inline before the suggested fix. For the pack layout and deeper diagnosis, see references/debug.md . 2. Decision tree When the user's request involves a browser — or writing test cases: Is kane-cli installed and authenticated? Unknown → kane-cli whoami No / errors → Read references/setup-and-config.md Yes ↓ What does the user want? A single one-shot browser task → build a kane-cli run --agent command (§3 + §4) A test they want to save / re-run / commit → Read references/testmd.md first, then use kane-cli testmd Run a suite of saved tests (several _test.md at once) → Read references/testrun.md first, then use kane-cli testrun run Need test cases or scenarios from a short description — because the user asked, or because the task needs them (no browser) → don't hand-write them ; Read references/generate.md first, then use kane-cli generate (§6) Has requirement documents (PRD/spec) and wants a designed suite, coverage accounting, or suite upkeep → Read references/assurance.md first — the assurance commands ( context / design / cover / maintain reconcile , kane-cli 0.6.1+; several features need newer releases, up to 0.8.6+ — the reference marks each), NOT generate Multiple independent browser tasks → Read references/parallel.md first View, share, or validate run evidence ( .evidence packs) → Read references/evidence.md Debug a failed run → Read references/debug.md Configure kane-cli or check directory layout → Read references/setup-and-config.md Browse / create / pick a Test Manager project or folder, or interpret the auto-default event → Read references/test-manager.md You need the full NDJSON event schema (rare — §5's summary covers 90% of cases) → Read references/parsing.md Compare / evaluate / justify kane-cli against another tool or approach (cost, tokens, effort, ROI) → Read references/fair-evaluation.md first — comparisons are only honest like-for-like across the test lifecycle Mobile (macOS Apple Silicon only) : drive a native app on a virtual Android emulator or iOS simulator instead of the browser → Read references/mobile.md first. Desktop (the browser) stays the default target; mobile is opt-in via --target emulator|simulator and always drives an app you provide ( --app <build|APPid> ), never a URL. kane-cli testrun does not support mobile. Not available on Intel Macs, Linux, or Windows, so keep those hosts on desktop runs. Every run, always: follow §1 above. 3. Building a run command kane-cli run "<objective>" --agent [options] The run subcommand is mandatory . kane-cli "<objective>" (no run ) does not work — unknown first tokens exit 2 with a "did you mean" suggestion. Same rule applies to kane-cli testmd run … and kane-cli generate … . --agent is mandatory — it switches stdout to NDJSON. Most-used flags: Flag Purpose Default --headless No visible browser window Off --max-steps <n> Cap agent reasoning steps 30 --timeout <s> Hard kill after N seconds No limit --url <url> Start URL for the run (overrides config default_url ; bare domains get https:// ) Config default_url --variables <json> Inline variables JSON (for {{key}} in objective) None --variables-file <path> Load variables from a JSON file None --ws-endpoint <url> Remote browser (LambdaTest grid) Local Chrome --code-export Generate code export after upload Off --bug-detection <mode> Flag suspected product bugs while authoring: off / stop / continue ( stop halts on a confirmed bug; continue records and keeps going) config value ( off ) Other flags ( --global-context , --local-context , --cdp-endpoint , --allow-missing-url ) and the full variables precedence chain live in references/setup-and-config.md . Start URL: every run needs a start URL for the first navigation. Provide it the simplest way — start the objective with the site ("Go to https://… and …") — or pass --url <url> ; a configured default_url is the fallback ( kane-cli config set-url ). There is no silent default site: if none of these supply one, a non-TTY run fails rather than guessing (pass --allow-missing-url to start from the current page instead). Exit codes: 0 passed · 1 failed · 2 auth/infra error · 3 timeout/cancelled. Examples # One-shot kane-cli run "Go to https://www.amazon.in and search for 'laptop'" --agent # Headless with timeout kane-cli run "Go to https://app.example.com and verify login page loads" --agent --headless -- timeout 60 # With inline credentials kane-cli run "Go to https://app.example.com and login with {{username}} and {{password}}" --agent \ --variables '{"username":{"value":"alice"},"password":{"value":"s3cret","secret":true}}' 4. Writing objectives How you phrase the objective string determines what the agent does. Four patterns: For the full catalog — every action verb, every assertion analyze method (Visual / Textual-DOM / URL / Title / DevTools→Network/Console/Performance/Cookies/localStorage/Clipboard), direct API calls, operators, chaining, conditional/negative patterns, and worked examples — Read references/objectives-cookbook.md . Same grammar applies to one-shot kane-cli run objectives and _test.md step bodies. Pattern Trigger words Behavior 🎯 Action "go to", "click", "type", "search", "fill" Performs browser actions ✅ Assertion "assert", "verify", "confirm", "check that" Pass/fail check on a condition 📦 Extraction "store X as 'name'" Persists a value into run_end.final_state 🔌 API call "call", "POST/GET a URL", a pasted curl The agent makes the HTTP request itself; "save the response as X", then assert/reference {{X.status}} / {{X.response_body…}} Two rules that make an objective replayable End every flow in a terminal assertion. Close with a check of the resulting page state ( verify the cart shows 1 item ), not a bare submit or confirm the dialog . A run only earns a replayable pass/fail from a verify/assert — a pure-action objective ( add a laptop to the cart ) gets none. If the objective has several phases, each ends in its own check. Two traps: confirm the dialog is an action, not a check; and verify the Submit button is visible fails exactly when the action worked (the control disappears on success) — assert the outcome, not the trigger. Intent for the actions, literal for the data. Phrase actions as goals ( Log in with {{user}} ) so the run absorbs layout drift; keep exact values literal or in {{variables}} . An expected-optional branch (a sometimes-there cookie banner) goes in an if/else , not assumed away. Shape: an intent action carrying literal data, then a verify of an observable end state — Search for "{{query}}" and open the first result, then verify the title contains "{{query}}" . Full grammar in references/objectives-cookbook.md §1 . The "store as" rule (critical for extraction) Vague phrasing like "read", "tell me", "report" does NOT reliably extract data — the agent may see the value but won't capture it. Use "store as". ❌ "go to example.com and read the page title" ✅ "go to example.com, store the page title as 'page_title'" Stored values appear in run_end.final_state and become the second results table per §1.4. Calling APIs directly The agent can make API calls itself — not just observe the page's traffic. Phrase an explicit call and name the response:
This skill does not provide trigger words.
| Field | Description |
|---|---|
| format | Format tag (skill/v1) |
| skill_id | Unique skill ID |
| name | Skill name |
| version | Version |
| description | Description |
| category | Categories (array) |
| trigger_words | Trigger words |
| tags | Tags |
| source | Source |
| source_url | Source URL (this page) |
| exported_at | Exported at (set per download) |
| system_prompt | System prompt body |
| model_config | Model config: provider / model / temperature / max_tokens / top_p |
| examples | Examples |
| install_guide | Import guide for Coze / Dify / Claude / custom frameworks |