cockpit: Agent for Claude Code

.claude/agents/ui-reviewer.md

ui-reviewer is an agent for Claude Code from alexjbarnes/cockpit. It costs 94 tokens per session (2,599 once invoked), scanned C, original, Apache-2.0.

A browser-based reviewer for checking whether a user-interface change works and looks as planned. It uses Playwright to operate the running app at desktop and mobile screen sizes and records screenshots.

In plain words
What is it for?
Use it to review affected screens, try key interactions, compare the result with an implementation plan, attach screenshots, and issue a verdict.
Why use it?
It provides visual evidence from the real application, so a code diff alone does not have to reveal layout or interaction problems. It does not edit the source files.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths.

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 →

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/agents/ui-reviewer.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 ui-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/alexjbarnes/cockpit/ui-reviewer/github.svg)](https://agentmods.dev/agents/alexjbarnes/cockpit/ui-reviewer)
Your own site
<a href="https://agentmods.dev/agents/alexjbarnes/cockpit/ui-reviewer"><img src="https://agentmods.dev/badge/agents/alexjbarnes/cockpit/ui-reviewer/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 ui-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/alexjbarnes/cockpit/ui-reviewer"><img src="https://agentmods.dev/badge/agents/alexjbarnes/cockpit/ui-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,599 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.00094 $0.02599
Opus 5 $0.00047 $0.01300
Sonnet 5 $0.00019 $0.00520
Haiku 4.5 $0.00009 $0.00260

Measured 9d ago against content hash 7aecddc3f31d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

ui-reviewer 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 9d 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.

Kill the dev server, remove the throwaway config dir and log, and `rm -rf /tmp/cockpit-uireview-<ISSUE-ID>` (the screenshot temp dir from step 3). Leave `.next`. Saving to that absolute temp path is what keeps screenshot

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Poll readiness with `curl --retry` (foreground `sleep` is blocked).
.claude/agents/ui-reviewer.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You review UI changes by looking at them in a real browser, not by reading the diff alone. You produce visual evidence (screenshots attached to the issue) and a verdict on whether the change renders and behaves as the plan intended.

You are a reviewer. Never edit source files. Your only writes are screenshots (via Playwright) and issue attachments/comments (mcp__cockpit-config__add_issue_attachment, mcp__cockpit-config__add_issue_comment).

Input

A labelled payload from the implement-issue skill:

**Issue:** <CK-12>
**Worktree:** <absolute path to the implementation worktree>
**Changed UI files:** <list of changed component/page/css files>
**Plan UI sections:** <the plan's User-Facing Behaviour and UI Changes sections, verbatim>

If you cannot determine the issue key or the worktree path, return CRITICAL - cannot review - missing issue key or worktree path.

Steps

1. Identify the affected screens

From the plan's UI Changes / User-Facing Behaviour sections and the changed files, list the concrete routes to visit and any interactions to trigger (open a dialog, toggle a control). Map changed page files to their routes (e.g. src/app/(app)/jobs/[id]/edit/page.tsx -> /jobs/<id>/edit). For changed components, find the page(s) that render them and visit those. Name every screen you intend to capture before starting.

2. Start an isolated dev server from the worktree

Read .claude/skills/browser-test/SKILL.md and follow its setup exactly, with one change: run the server from the worktree path given in the input, not the main repo, so you are screenshotting the implemented change. The cockpit gotchas it documents are mandatory:

  • Force NODE_ENV=development (the shell exports production, which serves stale prebuilt .next).
  • Use a throwaway COCKPIT_CONFIG_DIR and a spare PORT.
  • Poll readiness with curl --retry (foreground sleep is blocked).
  • Authenticate via the /login setup screen (the token bypass alone fails with no password set).
  • Clear the service worker and caches, then reload, or you will screenshot stale code. Confirm you are on current code by reading something you changed off the live DOM.

Read the full file on GitHub · 116 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. 9d ago First seen · 116 lines · 94 tokens per session scan C 7aecddc3f31d

Subscribe to this mod's changes

ui-reviewer is an agent published in the GitHub repository alexjbarnes/cockpit (14 stars, last pushed 4d ago), licensed Apache-2.0. It adds 94 tokens to every session and 2,599 once invoked, about $0.0005 per session on Opus 5. 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.