/biloba-vitest:overviewfrom biloba-vitest
Explains Biloba's TypeScript/Vitest mental model: shared Chrome, daemon per worker, isolated sessions, server-side polling, fast vs realistic input, and structured diagnostics. Use when adopting biloba or structuring a Vitest browser suite.
Ships in biloba-vitest. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Biloba's TypeScript client drives Chrome through bilobad. Each Vitest worker owns a daemon; all daemons attach to one Chrome started by global setup:
vitest worker 1 ──▶ bilobad ──┐
vitest worker 2 ──▶ bilobad ──┼──▶ one shared Chrome
vitest worker 3 ──▶ bilobad ──┘
This preserves parallelism without launching a browser per test file. Each root Session owns an isolated browser context. Reuse it across tests with session.prepare(); open sibling tabs only for flows that need them.
expect.poll, waitFor, sleeps, or a retry loop..realistic() only for behavior that depends on real pointer/keyboard input, occlusion, hover, scrolling, drag, or touch.prepare() resets cheaply; root sessions isolate cookies and storage between workers.BilobaError carries codes, locator/expected/observed values, polling trajectory, outlines, screenshots, and context-wide diagnostics.| Task | Skill |
|---|---|
| Wire the daemon, shared browser, and Vitest lifecycle | biloba-vitest:setup |
| Write locators, actions, assertions, tabs, frames, network, pointer gestures, screencasts, or time-dependent UI (the page clock) | biloba-vitest:write-tests |
| Create or diagnose screenshot baselines | biloba-vitest:visual-assertions |
| Read a failure, console output, artifacts, or crash code | biloba-vitest:debug-failures |
| Remove races, order dependence, or redundant polling | biloba-vitest:flaky-tests |
| Measure failure rates or suite performance across many runs (a flake hunt) | biloba-vitest:flake-hunt |
Canonical docs: https://onsi.github.io/biloba/vitest.html. npm install -D vitest biloba also pulls in the bilobad daemon via a per-platform package — no Go toolchain needed (macOS/Linux, x64/arm64; Windows isn't supported yet). The package is pre-1.0; pin the plugin and client to the same Biloba version.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub onsi/biloba --plugin biloba-vitest7 skills in this plugin
/debug-failuresDiagnose Biloba failures in TypeScript/Vitest — BilobaError codes and fields, polling trajectories, DOM outlines, screenshots and visual artifacts, context-wide session.captureDiagnostics(), console/warning streams, debug logs, Vitest hooks, and renderer/browser/daemon crash distinctions. Use when a Biloba Vitest test fails, hangs, flakes, or needs CI/agent artifact configuration./flake-huntRun a flake hunt on a Biloba Vitest suite — run the whole browser suite many times (60 by default), every run to completion with its own JSON report, then read each test's failure rate, the seeds, and the failure evidence out of those reports instead of re-running. Covers the hunt script (vitest run with shuffle and a recorded seed, maxWorkers at the measured knee, no retry or bail, a per-run BILOBA_SCREENSHOTS_DIR, and the seed, wall clock, and exit status the JSON reporter doesn't record), the runs the JSON reports as clean when they aren't (unhandled errors, failed beforeAll hooks, killed runs), logging BilobaError's code and trajectory, what keeps a hunt a valid measurement (one hunt at a time on an idle machine, nothing editing the tree, focused hunts for iterating only, stale visual baselines), how many clean runs it takes to call a flake dead, reading the results (one systemic race behind many names, stalled tabs, a long tail that clusters by run), and the performance record a hunt produces (test timing, the longest file, per-test cost, drift between hunts). Use before declaring a flake fixed, after changing shared test helpers or fixtures, at the end of a batch of work, or to measure a suite's performance./flaky-testsDiagnose and prevent flaky Biloba TypeScript/Vitest tests — redundant client-side retry loops, immediate mode, single-shot evaluate reads, optimistic UI, async layout, first-match-wins network handlers, held responses, vacuous assertions, visual update/tolerance hazards, lifecycle leakage, never waiting out a clock for a fact you can observe (durations clustered at one timer's period give it away), and timer-driven UI (debounces, countdowns, expiries) taken off real time with the page clock, including why polling never advances a paused clock. Use when a Biloba Vitest test is intermittent, order-dependent, load-sensitive, or only fails in CI/parallel workers./setupWire Biloba's TypeScript client into Vitest — install biloba and its platform package, install chrome-headless-shell, start one shared Chrome in global setup, provide its connection to workers, create one daemon and reusable root Session per test file, prepare between tests, close cleanly, and choose launch modes/options. Use when installing biloba or changing suite-level browser/daemon lifecycle./visual-assertionsCreate and maintain Biloba screenshot assertions in TypeScript/Vitest — page and locator captures, committed baselines, update mode, masks, pixel and channel tolerances, animation freezing, light/dark schemes, diff artifacts, and structured visual diagnosis. Use when adding expectScreenshot(), reviewing baselines, or diagnosing a visual mismatch./write-testsAuthor Biloba browser tests in TypeScript/Vitest — sessions, tabs, frames, CSS/semantic/XPath locators, polling actions and assertions, realistic input, cookies/storage, dialogs/downloads/network, time-dependent UI with the page clock (installClock + pauseAt/runFor/fastForward), screenshots, and structured failures. Use when writing or reviewing tests against biloba. For wiring the daemon and shared Chrome, use biloba-vitest:setup.Other plugins' skills for the same job