kiro-rails: Command for Claude Code

.claude/commands/review-ux-preflight.md

review-ux-preflight is a command for Claude Code from sourjya/kiro-rails. It costs 37 tokens per session (618 once invoked), scanned A, original, MIT.

A pre-coding review for user-interface work that checks layout, interaction placement, information hierarchy, and other usability decisions.

In plain words
What is it for?
Use it before building or changing a UI screen to define the main user goal, prioritize elements, place controls, and assess pointer travel.
Why use it?
It catches design problems before implementation by deciding whether a screen should proceed, be revised, or be blocked.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is sourjya/kiro-rails's own configuration. It tells Claude Code how to work on kiro-rails 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 kiro-rails configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sourjya/kiro-rails. 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/sourjya/kiro-rails/main/.claude/commands/review-ux-preflight.md
Clone the repo
git clone --depth 1 https://github.com/sourjya/kiro-rails

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 review-ux-preflight

README.md
[![agentmods](https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-ux-preflight/github.svg)](https://agentmods.dev/commands/sourjya/kiro-rails/review-ux-preflight)
Your own site
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-ux-preflight"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-ux-preflight/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 review-ux-preflight

Your own site · 80×15
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-ux-preflight"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-ux-preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 618 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.00037 $0.00618
Opus 5 $0.00018 $0.00309
Sonnet 5 $0.00007 $0.00124
Haiku 4.5 $0.00004 $0.00062

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

Security

Grade A, and why

review-ux-preflight 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 11d 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.

.claude/commands/review-ux-preflight.md · 76 lines

How it starts

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

UX Preflight Review

Before reviewing, read docs/decisions/ ADRs and any UX/design documentation if they exist. Use documented UX decisions to calibrate recommendations.

Run this BEFORE writing implementation code for any UI feature or screen modification.

Input (fill before running)

SCREEN: [What screen or component is being built/modified] PRIMARY_USER: [Who uses this screen most] PRIMARY_TASK: [What the user came here to do] REFERENCE_PATTERN: [Product + screen to compare against, e.g. "Asana task detail"]


Preflight Checklist

Produce answers for ALL 10 points. Do not skip any.

1. Primary User Goal

What is the single most important thing the user wants to accomplish on this screen?

2. Most Common Action

What will the user do most frequently? This action must have the lowest friction.

3. Information Hierarchy

Rank the top 5 elements by importance. The visual weight must match this ranking.

4. Control Placement Rationale

For every interactive control, state: what does it act on, and how far is it from that object? Flag any control that is more than 200px from its target.

5. Pointer Travel Risk

Identify any interaction that requires the user to move across the full screen width. Each such interaction is a friction point.

6. Density Assessment

Is this a data-dense screen (grid, table, list) or a content-focused screen (detail, form, reading)? Apply the matching density rule from UX Non-Negotiables.

7. Reference Pattern Comparison

Compare against the stated reference pattern:

  • Is primary content equally or more readable?
  • Are actions closer or farther from their target?
  • Is whitespace similar or better?
  • Is interaction cost lower, equal, or higher?

8. Required States

List all states this screen must handle: default, empty, loading, error, permission-restricted, success. Flag any missing from the current plan.

9. UX Risks

List specific risks this implementation introduces. Examples: "section menu pushed to far-right increases pointer travel", "description area compressed below metadata".

Read the full file on GitHub · 76 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. 11d ago First seen · 76 lines · 37 tokens per session scan A 243f594a61e7

Subscribe to this mod's changes

review-ux-preflight is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 618 once invoked, about $0.0002 per session on Opus 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.