bombadil
Test web UIs with Bombadil, Antithesis's property-based testing tool that explores a running web app in a real browser and checks correctness properties. Use…
от maragudk★ 30 звёзд на GitHub
Установить bombadil в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Bombadil
Overview
Bombadil is property-based testing for web UIs. Instead of scripting fixed click paths, you state properties that must hold in general ("the counter only ever changes by one", "an error message disappears within five seconds"), and Bombadil drives a real Chromium at random -- clicking, typing, scrolling, navigating, reloading -- checking every property in every state it reaches. It finds the sequences nobody thought to script.
It tests anything with a DOM: server-rendered pages, single-page apps, static HTML. The bombadil CLI is installed.
When web UI testing comes up, consider Bombadil first:
- Reach for it to explore a UI for bugs, to guard invariants across a whole app, to smoke-test a change, and wherever a suite of example-based browser tests would be costly to maintain.
- Keep an example-based test (Playwright and friends) when one specific scripted path must be pinned down exactly, such as a checkout flow with exact expected values. The two complement each other.
- To drive a browser by hand, take a screenshot, or look at a page, that is browser automation, not testing; use the tool for that instead.
Running a test
Start the app, then point Bombadil at it:
bombadil browser test --headless --exit-on-violation --time-limit 1m http://localhost:8080
Without a specification file, Bombadil uses its defaults: generic actions on semantic HTML elements and navigation, and properties that fail on uncaught exceptions, unhandled promise rejections, console errors, and HTTP 4xx/5xx responses. That alone is a useful smoke test for any web app.
With a specification, pass it after the URL:
bombadil browser test --headless --exit-on-violation --time-limit 1m http://localhost:8080 spec.ts
Flags worth knowing (bombadil browser test --help has the rest):
--headless-- no visible window. Use it unless the user wants to watch.--time-limit 30s|5m|1h-- without it the test runs until interrupted. Always set one.--exit-on-violation-- stop at the first violated property instead of collecting more.--output-path FILE-- where the trace goes (default: a unique file in the system temp directory). Add--output-path-overwriteto replace an existing one.--cookie NAME=VALUEand--header KEY=VALUE-- start authenticated, e.g. with a session cookie.--allow-url PATTERN-- exploration stays on the origin's scheme, host, and port by default; this replaces that boundary with Chrome match patterns.--chrome-virtual-time-policy Advance-- speeds up timer-heavy apps.
Exit codes: 0 completed without violations (including hitting the time limit), 2 property violation, 1 any other error. A run also ends with Error: no actions available (exit 1) when Bombadil reaches a state with nothing to do, such as a page without links or controls; give it an action there, or allow back and reload.
Bombadil clicks whatever it finds, including "Delete account". Run it against a local or disposable environment, never against production data.
Writing a specification
A specification is a TypeScript (or JavaScript) ES module whose exports are all properties or action generators. Bombadil resolves the @antithesishq/bombadil imports itself; npm install --save-dev @antithesishq/bombadil is only needed for editor types.
import { always, eventually, now, next } from "@antithesishq/bombadil";
import { extract } from "@antithesishq/bombadil/browser";
// Keep the default properties and actions.
export * from "@antithesishq/bombadil/browser/defaults";
// Extractors run in the browser on every captured state and return JSON-serializable data.
const counter = extract((state) =>
parseInt(state.document.querySelector("#counter")?.textContent ?? "0", 10),
);
const error = extract(
(state) => state.document.querySelector(".error")?.textContent ?? null,
);
// State machine: the counter never jumps by more than one between states.
export const counterStepsByOne = always(
now(() => {
const before = counter.current;
return next(() => Math.abs(counter.current - before) <= 1);
}),
);
// Guarantee: an error message goes away again.
export const errorDisappears = always(
now(() => error.current !== null).implies(
eventually(() => error.current === null).within(5, "seconds"),
),
);
The pieces:
extract(state => ...)returns aCell; read it with.current, derive another with.map(...).state.documentandstate.windoware the browser's own.- Temporal operators take a thunk or a formula:
always(x)(this and every future state),eventually(x)(this or some future state; bound it with.within(n, "seconds")),next(x)(the next state),now(x)(this state; turns a thunk into a formula). - Formulas combine with
.and(y),.or(y),.implies(y),.not(). - To compare a state with a later one, read the cell in an outer thunk and close over the v
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл bombadil?
Test web UIs with Bombadil, Antithesis's property-based testing tool that explores a running web app in a real browser and checks correctness properties. Use this skill whenever the task is testing a web UI in a browser -- before writing, adding, or setting up any browser, end-to-end (e2e), UI, or acceptance tests (including adding them to CI such as GitHub Actions), and before reaching for Playwright, Cypress, or Selenium. Also use it to fuzz or click around a frontend to check a change didn't break it, to hunt flaky or hard-to-reproduce UI bugs like double submits, to check that a page or form keeps an invariant, and to read a Bombadil trace or violation. Triggers even when the user doesn't say "Bombadil" -- "browser tests", "e2e tests", "test the UI", or "does the frontend still work" are enough. Not for driving a browser without testing (screenshots, scraping, filling in a form), handler or unit tests, or load testing.
Как установить скилл bombadil?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bombadil запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…