ui-metrics

ui-metrics is a command for Claude Code from ShipWithAI/shipwithai-plugins. It costs 36 tokens per session (479 once invoked), scanned A, original, MIT.

A read-only report that measures whether a UI testing process is improving over time.

In plain words
What is it for?
It helps review the results of the harness, find screens needing structural fixes, and check whether added safeguards prevent recurring problems.
Why use it?
It replaces guesswork with three numbers showing how quickly screens pass, how often they pass on the first try, and whether known problems return.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 harness/bin/metrics_ledger.py # writes harness/ledger/metrics.md (gitignored).

Part of the shipwithai-mobile-ui-harness plugin — 2 skills, 3 commands, 1 agent shipped together

Good fit It helps review the results of the harness, find screens needing structural fixes, and check whether added safeguards prevent recurring problems.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShipWithAI/shipwithai-plugins
agentmods
npx agentmods add commands/shipwithai/shipwithai-plugins/ui-metrics

Made for: Claude Code.

Or install shipwithai-mobile-ui-harness, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 1 agent.

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-metrics

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/shipwithai/shipwithai-plugins/ui-metrics"><img src="https://agentmods.dev/badge/commands/shipwithai/shipwithai-plugins/ui-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 479 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00036 $0.00479
Opus 5.5 $0.00014 $0.00192
Sonnet 5.5 $0.00007 $0.00096
Haiku 4.5 $0.00004 $0.00048

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

Security

Grade A, and why

ui-metrics 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 1mo 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.

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.

plugins/mobile-ui-harness/commands/ui-metrics.md · 27 lines

What it actually says

Show whether the harness is getting better over time. This is read-only analysis — the work is in the deterministic script; you just run it and interpret.

1. Compute

python3 harness/bin/metrics_ledger.py    # writes harness/ledger/metrics.md (gitignored)

Read harness/ledger/metrics.md.

2. Interpret the three numbers

  • Iterations-to-pass per screen (↓): how many loop iterations a screen needed before it stopped surfacing findings. Falling over time means prevention (rails, gates, reused components) is catching things earlier. A screen that needs 4 every time is a candidate for a structural fix.
  • First-pass yield (↑): share of screens that came in with zero Tier-1 structural blockers on the first render. Rising means the upstream rails (Konsist boundaries, tokens, designsystem reuse) are working — fewer broken-before-tasteless first drafts.
  • Recurrence after deposit (→ 0): for each promoted category, how many findings appeared after it was deposited. This is the key health signal. Zero = the promotion stuck. Non-zero (flagged ⚠️) = the deposit isn't holding — the finding slipped past the gate you added, so harden it further down the ladder (rubric line → deterministic assertion → structural impossibility). Recurrence rising after a promotion is the cue to re-open it in /ui-distill.

3. Act on it

If any category is flagged ⚠️, that's the most valuable thing the metrics surfaced: re-run /ui-distill for it and push the deposit one rung deeper. Everything else is trend-watching — re-run after each batch of /ui-iterate work; the ledger is the durable history, this report is the current snapshot.

These need data to be meaningful — they read what /ui-iterate (capture) and /ui-distill (deposit) write. On an empty ledger the report just says so.

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. 1mo ago First seen · 27 lines · 36 tokens per session scan A 180cec0f2b5d

Subscribe to this mod's changes

ui-metrics is a command published in the GitHub repository ShipWithAI/shipwithai-plugins (9 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 479 once invoked, about $0.0001 per session on Opus 5.5. 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-31.