kiro-rails: Command for Claude Code

.claude/commands/review-css-architecture.md

review-css-architecture is a command for Claude Code from sourjya/kiro-rails. It costs 30 tokens per session (1,909 once invoked), scanned A, original, MIT.

A CSS and design-token audit checks styling code against the project's documented design rules. It looks for inconsistent values, overrides, and patterns that make visual changes risky.

In plain words
What is it for?
Use it to review CSS architecture, spacing, colors, typography, borders, icons, and selected states against a design system. It can support maintenance reviews of frontend code.
Why use it?
It helps find styling problems before they cause visual regressions, specificity conflicts, or unexpected cascading effects. Documented exceptions are considered so intentional choices are not mistaken for errors.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

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-css-architecture.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-css-architecture

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-css-architecture"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-css-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,909 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.00030 $0.01909
Opus 5 $0.00015 $0.00955
Sonnet 5 $0.00006 $0.00382
Haiku 4.5 $0.00003 $0.00191

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

Security

Grade A, and why

review-css-architecture 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 10d 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-css-architecture.md · 156 lines

How it starts

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

Before scanning, read docs/decisions/ ADRs if they exist. Use documented design system decisions (intentional overrides, chosen methodology) to distinguish intentional patterns from accidental inconsistency.

Act as a principal-level frontend engineer and design systems architect performing a comprehensive CSS and styling architecture audit.

Your mission is not to enforce a preferred methodology. It is to determine whether the styling layer is consistent, maintainable, and free of patterns that cause visual regressions, specificity battles, or cascading side effects when code changes. A styling system that works today but cannot be changed safely is a liability.


House Standard: Console-Idiom Rubric

Before scanning, load the "UX Console-Idiom Rubric" rules in CLAUDE.md. The D (Density & Type) and K (Consistency & Tokens) families define the quantitative thresholds for this review. Specifically:

  • D-1/D-2: body text size range and font weight count - flag violations with rubric IDs
  • K-1/K-2/K-3: border-radius set size, color palette adherence, spacing scale
  • K-4/K-5: icon style consistency, active/selected state treatment

Every finding that maps to a rubric check MUST carry the rubric ID and severity. The token audit (Section C of output) should validate against the design tokens declared in user-project-overrides.md.

Evidence from scripts/style-survey.js (computed-style census) is preferred over manual inspection for D and K family checks.


Review Objectives

Identify:

  1. Design token usage and consistency. Colors, spacing, typography, border radii, shadows, and z-index values that are hardcoded instead of referencing design tokens or CSS custom properties. Flag where the same value appears in multiple places with no shared source of truth. Flag token families that are partially adopted - some files using tokens, others hardcoding equivalent values.

  2. Utility class sprawl vs. component encapsulation. In utility-first codebases (Tailwind, etc.): flag where class lists have grown beyond readability, where the same long utility combination is repeated across components without extraction, and where utility classes are used to patch component styles rather than define them. In component-scoped styling: flag where global selectors leak into component scope or where styles are duplicated across components that should share a base.

Read the full file on GitHub · 156 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. 10d ago First seen · 156 lines · 30 tokens per session scan A 8b78bbf1acbb

Subscribe to this mod's changes

review-css-architecture is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 1,909 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.