cockpit: Skill for Claude Code

.claude/skills/browser-test/SKILL.md

browser-test is a skill for Claude Code from alexjbarnes/cockpit. It costs 0 tokens per session (1,781 once invoked), scanned C, original, Apache-2.0.

A workflow for checking cockpit frontend changes in a real browser with Playwright, including screenshots and mobile viewport checks.

In plain words
What is it for?
Visually verifying interface changes, reproducing layout bugs, testing mobile rendering, and capturing pages or dialogs.
Why use it?
It uses an isolated development server and handles cockpit’s caching and configuration details, making visual checks reflect the current code.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is alexjbarnes/cockpit's own configuration. It tells Claude Code how to work on cockpit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cockpit configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/dev/repos/cockpit.

Reuse

Borrowing it

Nothing to install: this file belongs to alexjbarnes/cockpit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/alexjbarnes/cockpit/main/.claude/skills/browser-test/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/alexjbarnes/cockpit

Made for: Claude Code.

Wrote 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.

agentmods badge for browser-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexjbarnes/cockpit/browser-test/github.svg)](https://agentmods.dev/skills/alexjbarnes/cockpit/browser-test)
Your own site
<a href="https://agentmods.dev/skills/alexjbarnes/cockpit/browser-test"><img src="https://agentmods.dev/badge/skills/alexjbarnes/cockpit/browser-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexjbarnes/cockpit/browser-test"><img src="https://agentmods.dev/badge/skills/alexjbarnes/cockpit/browser-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,781 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01781
Opus 5.5 $0.00000 $0.00712
Sonnet 5.5 $0.00000 $0.00356
Haiku 4.5 $0.00000 $0.00178

Measured 2mo ago against content hash 139cdb8ffb27, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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`.
.claude/skills/browser-test/SKILL.md · 107 lines

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 plain tsx server.ts runs Next in production mode (serves the prebuilt .next, ignores your source). Force NODE_ENV=development.
  • A separate COCKPIT_CONFIG_DIR keeps the test server off ~/.cockpit — no job-scheduler or lock collisions, and a fresh auth state.
  • Foreground sleep is blocked in this environment; poll readiness with curl --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

Read the full file on GitHub · 107 lines

Changes

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.

  1. 2mo ago First seen · 107 lines · 0 tokens per session scan C 139cdb8ffb27

Subscribe to this mod's changes

browser-test is a skill published in the GitHub repository alexjbarnes/cockpit (16 stars, last pushed 3d ago), 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.

Related

Other skills, from other repositories

dogfood

Exploratory QA of web apps: find bugs, evidence, reports.

NousResearch/hermes-agent · 18 tokens

e2e-testing

Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.

affaan-m/ECC · 53 tokens

e2e-testing-patterns

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

wshobson/agents · 51 tokens

web-gui-tester

Use the browser automation tooling available in the session to test web frontends interactively in a purely GUI-based, black-box manner: simulate real user clicks, text input, scrolling, and other actions; use screenshots for visual verification and read-only DOM inspection for cross-validation; and produce a final…

asgeirtj/system_prompts_leaks · 0 tokens

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

browser-test-loop

Use to actually verify a web change in a real browser instead of assuming it works — click through a flow, catch console errors, check a form submits, confirm a fix on the page. Trigger when a UI change needs proof, a bug only reproduces in the browser, or the user asks to test, check, or screenshot the running app.

OneWave-AI/claude-skills · 74 tokens