/biloba-go:look-at-pagesfrom biloba-go
Captures screenshots of your UI across color schemes (light/dark) and viewport sizes (phone/desktop) using Go/Ginkgo Biloba. Also provides text-based DOM and accessibility outlines for agent review.
Ships in biloba-go. 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.
For seeing what a page looks like while you work on it, not for testing it. The harness is the throwaway spec from explore-unfamiliar-page, so you get the suite's Chrome, app server and seeding for free. That skill is for drafting a spec against a page you haven't seen; this one is for reviewing one you're building. Sibling skills are named here without a prefix; invoke one with the same plugin prefix you loaded this skill under.
package <suite>_test
import (
"fmt"
"github.com/onsi/biloba"
. "github.com/onsi/ginkgo/v2"
)
var _ = Describe("scratch", func() {
It("looks at the page", func() {
sizes := []struct {
name string
width, height int
opts []biloba.DeviceOption
}{
{"phone", 390, 844, []biloba.DeviceOption{b.Mobile(), b.TouchScreen()}},
{"desktop", 1280, 800, nil},
}
for _, scheme := range []string{"light", "dark"} {
for _, size := range sizes {
b.SetMedia(biloba.Media{ColorScheme: scheme})
b.SetWindowSize(size.width, size.height, size.opts...)
b.Navigate("<TARGET_URL>")
Eventually("<readiness anchor>").Should(b.Exist())
fmt.Println(b.CaptureScreenshotToFile(fmt.Sprintf("./tmp/look/%s-%s.png", scheme, size.name)))
}
}
})
})
ginkgo --no-color --focus="scratch"
Read each printed PNG. Gate on a readiness anchor before every capture, or you are looking at a half-rendered page. Put tmp/ in .gitignore.
When an image isn't enough, or you need numbers, print these next to the screenshot:
b.Outline() — the DOM, pruned; b.A11yOutline() — roles and accessible names (does the button have a name?).b.GetBoundingBox(sel) — Top/Left/Width/Height/Bottom/Right. Checks "does it fit at 390px?" without eyeballing.b.GetComputedStyle(sel, "background-color") — the colour the dark scheme actually resolved to.b.AllConsoleMessages() / b.AllPageErrors() — a page that looks fine but logged an error.A page at rest is the easy case. Drive it into each state before capturing:
b.Focus(sel), to see the focus ring.b.Click(trigger), then wait for the menu.:hover: b.Realistic().Hover(sel). The fast b.Hover fires JS events only, so :hover styles never show → realistic-mode.confirm/alert doesn't show in a screenshot.b.StubRequest(url, biloba.StubResponse{Status: 500}) before Navigate, to see the error state.b.Run in a long name or many rows, to see wrapping and overflow.Once it looks right, turn what you checked by eye into specs in the real suite:
Eventually(".card").Should(b.Encloses(".date-input")), BeAbove/BeLeftOf/…. Unlike a scrollWidth <= innerWidth check, Encloses doesn't go vacuous under overflow-x: clip.Eventually("body").Should(b.HaveComputedStyle("background-color", b.MatchColor("#1b1513"))) after SetMedia.b.HaveScreenshot with b.InColorSchemes("light", "dark") against a committed baseline → visual-assertions.rm zz_scratch_test.go
rm -rf ./tmp/look
Leave nothing behind in the suite: a scratch spec that stays becomes a slow spec that asserts nothing.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub onsi/biloba --plugin biloba-go12 skills in this plugin
/apiOne-line reference for every Biloba Go method and matcher, grouped by area — selectors/locators, lifecycle, poll-config (WithTimeout/WithPolling/WithContext/Immediate), capturing a matcher's observed value (.Capture), navigation (GetLocation/GetTitle), cookies/storage, tabs, cross-origin iframes (b.Frame frame handles), DOM existence/visibility/contents/properties/forms, clicking and interactions (incl. drag/scroll/tap/modifiers/text-selection), realistic mode, keyboard, uploads, element JS, dialogs, downloads, arbitrary JS (incl. the GetJSValue app-state barrier), network stubbing/aborting/modifying/observing/holding (HoldResponse + Limit/ReleaseNext), screenshots/screencasts/outline/window, the page clock (InstallClock/Clock + PauseAt/Resume/RunFor/FastForward/SetFixedTime/SetSystemTime), and visual regression (HaveScreenshot + Mask/Tolerance/ChannelTolerance/Animated/InColorSchemes). Use to look up the exact Go method or matcher name and shape. Methods marked (dual) poll until they succeed when fully applied and return a pollable matcher when under-applied./debug-failuresSee why a Go/Ginkgo Biloba spec failed or flaked — the on-failure artifacts (DOM outline + screenshots + poll trajectory of the timed-out read + the visual-regression diagnosis with its .actual.png/.diff.png, the "never settled" warning an update run prints + the detached-node "matched then stopped matching" signal + the occluded-click diagnosis naming what covered the target), how Biloba auto-adapts to humans vs CI vs AI agents, the env vars and config knobs that surface them (BILOBA_SCREENSHOTS_DIR, BILOBA_SCREENSHOT_BASELINES_DIR, BILOBA_UPDATE_SCREENSHOTS, BILOBA_INLINE_SCREENSHOTS, BILOBA_OUTLINE_MAX, BILOBA_INTERACTIVE, BilobaConfig*), attaching app/store state to a failure, headless quirks (stale innerText, unscheduled requestAnimationFrame), and using b.Outline()/b.A11yOutline() to understand why a selector did not match. Use when a browser spec is failing or flaky and you need visibility, or to configure failure output for CI/agents. For *preventing* flakes (single-shot reads, avoiding b.Immediate(), optimistic-UI) see this plugin's flaky-specs skill./explore-unfamiliar-pageOrient to an unfamiliar page, then draft a starter Go/Ginkgo Biloba spec from its DOM outline, accessibility tree, and screenshot. Use when writing browser tests against a URL or fixture you have not seen. Covers the orient-author-cleanup loop and accepts a URL or fixture argument when invoked explicitly./flake-huntRun a flake hunt on a Biloba Ginkgo suite — run the whole browser suite many times (60 by default), every run to completion with its own JSON report, then read each spec's failure rate, the seeds, and Biloba's failure evidence out of those reports instead of re-running. Covers the hunt script (compile once, --procs at the measured knee, --randomize-all, --poll-progress-after, a per-run BILOBA_SCREENSHOTS_DIR), why --repeat and --until-it-fails can't measure a rate, 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, wedges, a long tail that clusters by run), and the performance record a hunt produces (spec timing, parallel efficiency, per-spec 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-specsDiagnose and prevent flaky Go/Ginkgo Biloba specs — specs that pass locally but fail in CI, fail intermittently under `-p` or load, or fail somewhere other than the line that is actually wrong. Biloba polls by default, so the headline rule is "don't reach for b.Immediate()". Covers the residual smells — single-shot `b.Run(expr,&x)` reads and gate-then-re-read pairs (fix with .Capture); the non-polling SendKeysToWindowImmediately and `*Immediately` verbs; optimistic-UI and server-reconciliation traps (barrier on app state with b.GetJSValue, force the arrival order with b.HoldResponse + Limit/ReleaseNext); async-settling geometry, layout, and document-order reads; AllowMissing for properties absent on the element type; network handlers accumulating across an Ordered container; vacuous assertions that can never fail (an unresolved locator scope, BeNetworkIdle before the request starts, an empty Current*ForEach under a negation, a visual baseline written without ever being reviewed, a screenshot tolerance widened until nothing can fail, BILOBA_UPDATE_SCREENSHOTS left set in CI); gating on a DOM anchor instead of the URL; 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 (b.InstallClock, PauseAt/RunFor/FastForward), including why a poll never advances a paused clock. Use when a browser spec is flaky, nondeterministic, order-dependent, load-sensitive, or CI-only, or when reviewing a suite for latent races./overviewThe Biloba mental model for writing browser tests in a Go Ginkgo/Gomega suite — pragmatic simulation, poll-by-default, dropping to chromedp, and visual regression against committed baselines. Use first when starting with Biloba or deciding whether it fits a Go browser-testing task. Routes to the other skills in this plugin.Other plugins' skills for the same job