visual-test

A command for checking how changes to Radar look in a running Kubernetes cluster. It uses Playwright to take and organize screenshots, then reports visual issues.

In plain words
What is it for?
Use it to review changed views, components, and renderers in Radar, compare their appearance, and investigate cluster or browser access when visual testing cannot start.
Why use it?
It helps catch interface problems that ordinary code checks may miss. It also confirms the changes work against a reachable cluster.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/skyhook-io/radar/visual-test
Clone the repo
git clone --depth 1 https://github.com/skyhook-io/radar

Made for: Claude Code.

Per session 0 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,332 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02332
Opus 5 $0.00000 $0.01166
Sonnet 5 $0.00000 $0.00466
Haiku 4.5 $0.00000 $0.00233

Measured yesterday against content hash cdd534660b52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

visual-test scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/visual-test.md · 195 lines

How it starts

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

Visual Test

Visually test Radar changes against a real cluster using Playwright MCP. Takes screenshots, organizes them, and reports what looks right or wrong.

Step 1: Verify Playwright MCP

Check if Playwright MCP tools are available (e.g., mcp__playwright__browser_navigate). If NOT available, tell the user "Playwright MCP is not available -- please add it to your MCP config and restart" and stop.

Step 2: Understand What to Test

Determine what changed and what needs visual verification:

git status
git branch --show-current
git log main..HEAD --oneline
git diff main..HEAD --name-only

If on main with no branch commits, check unstaged changes instead. Summarize what changed and what UI areas are affected (which renderers, which views, which components).

Step 3: Verify Cluster Access

This is critical -- Radar is useless without a live cluster. Check in order:

# 1. Check current kubeconfig context
kubectl config current-context

# 2. Verify actual connectivity (not just config)
kubectl cluster-info --request-timeout=5s

If cluster is not reachable, try to diagnose:

# GKE:
gcloud container clusters list 2>/dev/null | head -5
# EKS:
aws eks list-clusters 2>/dev/null | head -5

If auth is expired or cluster is unreachable:

  • Tell the user which context is configured and that it's not reachable
  • Suggest the auth command (e.g., gcloud container clusters get-credentials ... or aws eks update-kubeconfig ...)
  • Ask them to run ! <auth-command> in the prompt to authenticate
  • Stop and wait -- don't proceed without a working cluster

Step 4: Check Required Resources Exist

Based on what changed, verify the cluster has the CRD resources needed to test:

# Check if the CRD exists
kubectl api-resources --verbs=list 2>/dev/null | grep -i <kind>

# Check if instances exist
kubectl get <kind> -A --no-headers 2>/dev/null | head -5

If CRDs exist but no instances:

  • Tell the user: "The cluster has the CRD but no instances. Want me to create a test resource?"
  • Wait for confirmation before creating anything
  • If creating: use a clearly labeled test namespace/name (e.g., radar-test/test-<kind>)

Read the full file on GitHub · 195 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. yesterday First seen · 195 lines · 0 tokens per session scan A cdd534660b52

Subscribe to this mod's changes

visual-test is a command published in the GitHub repository skyhook-io/radar (3,168 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,332 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.