Skip to content
Back to skills

Ui Visual Critic

ASecurity

Evaluates rendered user interfaces and component source code for optical defects, spatial misalignments, density incongruities, and aesthetic clichés. Executes static AST and DOM pattern matching to flag nested radius violations, unconstrained line lengths, lack of interactive affordances, and ungrounded AI visual slop.

  • 7 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 9, 2026
ai-agentsjavascriptgojavabashrailsdebuggingdatabase

Works with

  • cli

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add Harmitx7/tribunal-kit --skill ui-visual-critic --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ui Visual Critic?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ui Visual Critic
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-ui-visual-critic/badge)](https://www.skillsdirectory.com/skills/harmitx7-ui-visual-critic)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ui-visual-critic
description: 'Evaluates rendered user interfaces and component source code for optical defects, spatial misalignments, density incongruities, and aesthetic clichés. Executes static AST and DOM pattern matching to flag nested radius violations, unconstrained line lengths, lack of interactive affordances, and ungrounded AI visual slop.'
version: 1.0.0
last-updated: 2026-10-30
skills:
  - critique
  - better-ui
  - better-colors
tools: Read, Grep, Glob, Bash, Edit, Write
scripts-binding:
  - .agent/scripts/lint_runner.js
  - .agent/scripts/verify_all.js
inputs:
  componentMarkup: 'string'
  visualBaseline: 'object'
outputs:
  critiqueScore: 'number'
  defects: 'array'
  remediationSuggestions: 'array'
trigger:
  - 'visual-critic'
  - 'ui-critique'
  - 'optical-inspection'
  - 'visual-quality-audit'
---

# UI Visual Critic — Optical Inspection & Defect Analysis

## Mandatory Pre-Flight Context Inspection

Before reviewing component markup or issuing visual critiques, inspect these 5 critical parameters:

1. **Mathematical Geometry Invariants**: Check container vs inner element radius math ($R_o = R_i + P$). Flag any child whose radius is greater than or equal to its parent without appropriate padding.
2. **Optical Balance & Density**: Verify that text line lengths adhere to reading ergonomics ($45\text{ch} \le W \le 75\text{ch}$) and table cells prevent text wrapping collisions.
3. **AST Defect Signals**: Scan for hardcoded hex codes (`#fff`, `#3b82f6`), indiscriminate transitions (`transition: all`), scale collapsing (`scale-0`), and outline suppression (`outline-none`).
4. **Anti-Slop Cliché Audit**: Flag purple/violet gradients on generic SaaS cards, floating centered hero pills, and unbordered dark mode elevated surfaces.
5. **Actionable Remediation**: For every visual flaw detected, provide the exact drop-in CSS / Tailwind class replacement.

## Activation Boundaries

- **Activate when:** Reviewing UI code changes, evaluating visual quality in PRs, running visual health audits, or verifying design compliance during the Design Quality Loop.
- **DO NOT activate when:** Writing database migrations, debugging server-side runtime errors, or generating initial design tokens.

## 🔁 Multi-Pass Visual Critique Protocol

| Pass       | Phase                          | Core Action                                                                                | Observable Target    |
| :--------- | :----------------------------- | :----------------------------------------------------------------------------------------- | :------------------- |
| **Pass 1** | **Static AST Scan**            | Execute `analyzeVisualDefects()` to find structural, transition, and color anti-patterns.  | AST Defect List      |
| **Pass 2** | **Geometric Inspection**       | Verify 8pt grid alignment, nested radii formulas, and padding symmetry.                    | Geometry Conformance |
| **Pass 3** | **Contrast & Lightness Audit** | Verify perceptual lightness difference ($\Delta L \ge 0.45$) on all text/background pairs. | Contrast Scorecard   |
| **Pass 4** | **Typography & Readability**   | Audit line lengths, heading-to-body ratios, and tabular number formatting.                 | Ergonomics Scorecard |
| **Pass 5** | **Remediation Compilation**    | Produce actionable critique score (0–100) and exact code fix suggestions.                  | Critique Report      |

---

## 🛠️ Technical Architecture & Critique Recipes

### 1. Programmatic Defect Analysis

```javascript
const { analyzeVisualDefects } = require('../../src/design_intelligence/visual_defect_analyzer');

const markup = `
<div className="p-4 bg-[#111827] rounded-lg">
  <button className="transition-all outline-none bg-purple-600">Save</button>
</div>
`;

const defects = analyzeVisualDefects(markup);
// Output array containing:
// 1. RAW_HEX_VALUE (flagging #111827 -> replace with var(--surface-0))
// 2. INDISCRIMINATE_TRANSITION (flagging transition-all -> replace with specific properties)
// 3. OUTLINE_SUPPRESSED (flagging outline-none -> require focus-visible outline)
// 4. PURPLE_SLOP_CLICHE (flagging purple-600 -> replace with category accent)
```

### 2. Defect Severity & Remediation Matrix

| Defect Type                 |  Severity  | Failure Rationale                                            | Approved Remediation                                         |
| :-------------------------- | :--------: | :----------------------------------------------------------- | :----------------------------------------------------------- |
| `NESTED_RADIUS_MISMATCH`    |   `HIGH`   | Inner radius larger than parent causes visual dissonance.    | Set $R_i = \max(0, R_o - P)$                                 |
| `INDISCRIMINATE_TRANSITION` |  `MEDIUM`  | `transition: all` incurs layout recalculation overhead.      | `transition-[color,background-color,border-color,transform]` |
| `OUTLINE_SUPPRESSED`        | `CRITICAL` | `outline-none` breaks keyboard navigation for accessibility. | `focus-visible:outline-2 focus-visible:outline-offset-2`     |
| `PURPLE_SLOP_CLICHE`        |   `LOW`    | Overused AI trope dilutes brand identity.                    | Use category preset accent (e.g. emerald or amber)           |

---

## 🏛️ Tribunal Verification & Guardrails

### 🛑 Verification-Before-Completion (VBC) Protocol

1. Critique must run against `analyzeVisualDefects` and report all matches.
2. Every critique failure must specify line number / class string and the exact replacement class.
3. No UI code may be certified if any `CRITICAL` or `HIGH` severity defects remain unresolved.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.