agentleFS
xsovad06xsovad06/sova/.claude/skills/visual-audit/SKILL.md

visual-audit

Skill3 starsChanged 5 days agoApache-2.0View on GitHub

Audit dashboard templates for visual hierarchy violations, spacing inconsistency, anti-slop violations, design system drift, and common AI-generated UI defects. Use when asked to audit, review, or check templates for visual quality. Reports findings without auto-fixing.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before a major UI PR (run alongside /review)

    line 14
  2. Distinctive:

    After bulk template changes to catch regressions

    line 15
  3. Distinctive:

    When a page "looks off" but the issue is not obvious

    line 16
  4. Very specific:

    Full audit: All templates in sova/dashboard/templates/ and sova/dashboard/static/

    line 23
  5. Very specific:

    Diff audit: Only templates changed in the current branch (git diff --name-only main -- sova/dashboard/templates/ sova/dashboard/static/)

    line 25
  6. Distinctive:

    Before auditing, read these files to understand the baseline:

    line 29
  7. Very specific:

    Start the dashboard and load the affected page(s).

    line 86
  8. Distinctive:

    If the PR claims "manually verified," verify independently anyway.

    line 88
  9. Distinctive:

    Do NOT auto-fix findings. Report them for human review.

    line 191

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Visual Audit Protocol

Audit existing templates for design quality issues. Reports findings in a structured format for human review. Does not auto-fix.

When to Use

Invoke this skill when:

  • Asked to audit templates for visual quality
  • Before a major UI PR (run alongside /review)
  • After bulk template changes to catch regressions
  • When a page "looks off" but the issue is not obvious

Audit Procedure

Step 1: Scope

Determine which templates to audit:

  • Full audit: All templates in sova/dashboard/templates/ and sova/dashboard/static/
  • Targeted audit: Specific templates (e.g., agents.html, queue.html)
  • Diff audit: Only templates changed in the current branch (git diff --name-only main -- sova/dashboard/templates/ sova/dashboard/static/)

Step 2: Read References

Before auditing, read these files to understand the baseline:

  1. docs/design-system.md: palette, typography, components
  2. sova/dashboard/static/style.css: CSS variables, component classes
  3. .claude/skills/dashboard-design/SKILL.md: quality rules and anti-slop bans

Step 3: Run Automated Checks

# Color violations: hardcoded hex/rgb/hsl outside Catppuccin palette
grep -rn --include='*.html' --include='*.js' --include='*.css' -E '(#[0-9a-fA-F]{3,8}|rgb\(|rgba\(|hsl\(|hsla\()' sova/dashboard/templates/ sova/dashboard/static/ | grep -v '{#' | grep -v 'style.css' | grep -v '_head.html'

# Inline event handlers in templates (except onclick with stopPropagation in JS-rendered HTML)
grep -rn --include='*.html' -E 'onchange=|onsubmit=|onkeydown=|onload=' sova/dashboard/templates/

# Native title attribute instead of data-tooltip
grep -rn --include='*.html' --include='*.js' 'title="' sova/dashboard/templates/ sova/dashboard/static/app.js | grep -v '<title>' | grep -v 'data-tooltip'

# transition: all (should specify properties)
grep -rn --include='*.html' --include='*.css' --include='*.js' 'transition:\s*all\b' sova/dashboard/templates/ sova/dashboard/static/

# Arbitrary spacing values
grep -rn --include='*.html' -E '(p|m|gap)-\[' sova/dashboard/templates/

# Font sizes below minimum (use text-xs or a token; JS-rendered markup counts, so include *.js)
grep -rn --include='*.html' --include='*.css' --include='*.js' --exclude='*.min.js' -E 'text-\[(9|10|11)px\]|font-size:\s*(9|10|11)px' sova/dashboard/templates/ sova/dashboard/static/

# Raw fetch( instead of fetchAPI (fetchAPI owns the non-2xx error path).
# Expect hits: the fetch( inside fetchAPI itself, and pages that predate it. Report a hit in a file in
# scope; list a hit in an untouched page as pre-existing instead of counting it against the change.
grep -rn --include='*.html' --include='*.js' --exclude='*.min.js' -E '\bfetch\(' sova/dashboard/templates/ sova/dashboard/static/

# Raw setInterval( instead of visibilityAwarePoll (a raw timer keeps polling in a hidden tab).
# Expect hits: the setInterval( inside visibilityAwarePoll itself, a few timers in static/app.js that its
# own visibility handler manages (read the surrounding code), and pages that predate the helper. Apply the
# same in-scope versus pre-existing split.
grep -rn --include='*.html' --include='*.js' --exclude='*.min.js' 'setInterval(' sova/dashboard/templates/ sova/dashboard/static/

# Banned shadow classes (SOVA uses border-based depth)
grep -rn --include='*.html' -E 'shadow-(md|lg|xl|2xl)' sova/dashboard/templates/ | grep -v '{#'

# Overflow hidden/auto/scroll on containers (may clip tooltips/popovers)
grep -rn --include='*.html' --include='*.css' -E 'overflow-(hidden|auto|scroll)|overflow:\s*(hidden|auto|scroll)' sova/dashboard/templates/ sova/dashboard/static/ | grep -v 'overflow-x-auto'

# Missing escapeHtml on dynamic content in innerHTML
grep -rn --include='*.html' --include='*.js' 'innerHTML.*+.*\b(item\.|agent\.|data\.|pr\.)' sova/dashboard/templates/ sova/dashboard/static/ | grep -v 'escapeHtml'

# Cost values without parseFloat guard
grep -rn --include='*.html' --include='*.js' '\.toFixed(' sova/dashboard/templates/ sova/dashboard/static/ | grep -v 'parseFloat'

# ASCII characters used as icons (arrows, checks, dots)
grep -rn --include='*.html' -E "'&#x2[0-9a-fA-F]{3};|&rarr;|&larr;|&check;|\\\\u2" sova/dashboard/templates/

Step 3.5: Live Verification (mandatory for any audit ahead of approving a PR)

Static grep checks and code reading cannot catch browser-only bugs (layout timing, focus handling, JS runtime errors): a change can look correct on review and still be completely broken in the browser. Before signing off on a frontend/dashboard PR:

  • Start the dashboard and load the affected page(s). Do not start or stop the user's own make dev instance: if it's already running, use it; otherwise start an isolated instance on an alternate port (e.g. uvicorn sova.dashboard.app:create_app --factory --port 8112).
  • Exercise the actual golden path the PR touches (click through it, don't just look at it).
  • If the PR claims "manually verified," verify independently anyway.

This step is required before the audit report can mark any finding as resolved-by-inspection, and before /review approves a UI PR based on this audit.

Step 4: Manual Inspection Checklist

For each template in scope, check:

A. Visual Hierarchy (most impactful)

CheckWhat to look forSeverity
3-level ruleDoes every content section have primary/secondary/tertiary weight?High
Stat card structureValue (primary) > Label (secondary) > Detail (tertiary)?High
Table hierarchyHeaders uppercase/medium, data normal, actions small/muted?Medium
Heading consistencySame heading level uses same size/weight across pages?Medium
Empty statesMeaningful empty-state message, not just blank space?Low

B. Spacing Consistency

CheckWhat to look forSeverity
Standard incrementsOnly Tailwind scale values (gap-2, gap-4, gap-6, p-4, p-6)?High
Card paddingAll cards use consistent p-4 to p-6 padding?Medium
Section spacingConsistent mb-6/mb-8 between major sections?Medium
Grid gap consistencySame gap value for same-type grids across pages?Low

C. Color & Theme

CheckWhat to look forSeverity
Palette complianceAll UI colors from Catppuccin Mocha CSS vars?Critical
Semantic color abusetext-accent-green/text-accent-red used only for data, not UI chrome?Medium
Opacity consistencyUsing /20 for fills, /30 for borders, text-gray-500 for muted?Low

D. Component Usage

CheckWhat to look forSeverity
Icon systemUsing {{ icon("name") }} not inline SVG or ASCII?High
Button variantsOnly `.sova-btn-primarysuccessdangerwarning` used?High
Badge shapesrounded-full for indicators, rounded for buttons?Medium
Tooltip systemdata-tooltip not native title attribute?Medium

E. Interaction Quality

CheckWhat to look forSeverity
Hover statesEvery clickable element has visible hover feedback?High
stopPropagationNested buttons inside clickable containers call it?High
External linksGitHub links have target="_blank" rel="noopener"?Medium
Transition specificityTransitions name properties (not transition: all)?Low

F. AI-Tell Detection

TellDescriptionSeverity
Side-stripe borderborder-l-4 border-accent on cardsMedium
Gradient textbg-clip-text text-transparent bg-gradient-to-rHigh
Ghost-cardborder-dashed placeholder as "add new"Medium
Identical triplet cardsThree cards, same structure, no hierarchy variationHigh
Rainbow tags4+ distinct hues in the same badge rowMedium
Over-roundedrounded-3xl or larger on content cardsLow
Gratuitous dividers<hr> between every section instead of spacingLow

G. Mechanical Pattern Checks (from the Step 3 greps)

PatternReplacementSeverity
text-[9px], text-[10px], text-[11px], font-size: 10px in a template or a .js filetext-xs or the type scale in docs/design-system.mdMedium
Raw fetch( in page codefetchAPI(url) from app.jsMedium
Raw setInterval( for pollingvisibilityAwarePoll(fn, ms) from app.jsHigh

Step 5: Report Format

Report findings as a structured list, grouped by severity:

## Visual Audit Report

**Scope**: [templates audited]
**Date**: [date]

### Critical (must fix before merge)
1. **[file:line]** [issue description] -- [fix suggestion]

### High (fix in this PR if touched, otherwise create issue)
1. **[file:line]** [issue description] -- [fix suggestion]

### Medium (fix when next touching this template)
1. **[file:line]** [issue description] -- [fix suggestion]

### Low (nice to have)
1. **[file:line]** [issue description] -- [fix suggestion]

### Summary
- Total findings: N
- Critical: N | High: N | Medium: N | Low: N
- Templates audited: N
- Templates clean: N
- Live-verified in browser: yes/no (see Step 3.5) -- if no, say why and flag the audit as incomplete

Do NOT auto-fix findings. Report them for human review. The user decides which to address.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.