Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/alexjbarnes/cockpit/browser-testnpx skills add alexjbarnes/cockpit --skill browser-testgit clone --depth 1 https://github.com/alexjbarnes/cockpitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alexjbarnes/cockpit/browser-test)<a href="https://agentmods.dev/skills/alexjbarnes/cockpit/browser-test"><img src="https://agentmods.dev/badge/skills/alexjbarnes/cockpit/browser-test.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01781 |
| Opus 5 | $0.00000 | $0.00890 |
| Sonnet 5 | $0.00000 | $0.00356 |
| Haiku 4.5 | $0.00000 | $0.00178 |
Grade C, and why
browser-test scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /tmp/cockpit-verify && mkdir -p /tmp/cockpit-verify Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Foreground `sleep` is blocked in this environment; poll readiness with `curl --retry`. How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Browser-test a cockpit UI change with Playwright
Run an isolated cockpit dev server and drive it with the Playwright MCP. Use this over the generic run/verify skills: cockpit has three caches that will serve you stale code and burn a lot of time if you don't handle them up front.
When to use
- Visually confirm a UI / layout / CSS change renders correctly.
- Reproduce a rendering bug, especially on mobile.
- Screenshot a page or dialog at a given viewport.
1. Start an isolated dev server
Never test against the live instance (port 3001, runs from a packaged tarball). Spin up your own on a spare port with a throwaway config dir.
Three things bite you, all handled below:
- The shell exports
NODE_ENV=production, so plaintsx server.tsruns Next in production mode (serves the prebuilt.next, ignores your source). ForceNODE_ENV=development. - A separate
COCKPIT_CONFIG_DIRkeeps the test server off~/.cockpit— no job-scheduler or lock collisions, and a fresh auth state. - Foreground
sleepis blocked in this environment; poll readiness withcurl --retry.
rm -rf /tmp/cockpit-verify && mkdir -p /tmp/cockpit-verify
cd /home/dev/repos/cockpit
NODE_ENV=development COCKPIT_CONFIG_DIR=/tmp/cockpit-verify PORT=3010 \
nohup npx tsx server.ts > /tmp/cockpit-verify.log 2>&1 &
curl -s -o /dev/null -w "%{http_code}" --retry 120 --retry-delay 1 \
--retry-all-errors --retry-connrefused --max-time 12 http://localhost:3010/login
First load compiles on demand (~10-30s); the retry covers it. If it never returns 200, read /tmp/cockpit-verify.log.
2. Authenticate
A fresh config has no password, so /login renders the setup screen. Set one and you get a valid signed session cookie.
The COCKPIT_TOKEN bypass alone does NOT work: validateSession returns false when no password is stored, before it checks the token. Set a password.
Load the Playwright tools first:
ToolSearch → select:mcp__playwright__browser_navigate,mcp__playwright__browser_resize,mcp__playwright__browser_evaluate,mcp__playwright__browser_take_screenshot
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 107 lines · 0 tokens per session scan C 139cdb8ffb27
browser-test is a skill published in the GitHub repository alexjbarnes/cockpit (14 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,781 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
browse
Fast headless browser for QA testing and site dogfooding. (gstack).
playwright-dev
Explains how to develop Playwright - add APIs, MCP tools, CLI commands, and vendor dependencies.
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
playwright-cli
官方Microsoft Playwright CLI网页自动化工具,支持所有主流浏览器的无头/有头自动化操作,包括页面导航、元素交互、截图、录制、测试等功能。当用户提到网页自动化、浏览器操作、爬虫、截图、录制用户操作、E2E测试时触发。.
playwright-screen-recording
Record browser test videos with Playwright for PR review and bug fix verification.