From 9fc0cac7317f8b3d00bd646bfa648db633a2f4cd Mon Sep 17 00:00:00 2001 From: Wayner Barrios Date: Wed, 27 May 2026 14:16:41 -0400 Subject: [PATCH 1/3] Add design specifics and a self-critique rubric to frontend-design The skill was pure aesthetic prose with no self-review. This adds three sections, reworded from cited sources and kept under 500 lines: - Concrete anti-default moves: font-by-vibe picks, layout archetypes, type contrast, semantic CSS-variable tokens, one orchestrated page-load. - An objective self-critique rubric the model runs before returning (WCAG 2.2 AA contrast/semantics/alt/focus/reflow plus craft checks), framed honestly since models tend to over-praise their own output. - An optional, cross-platform validation note (html-validate static; pa11y or axe for rendered DOM), including an opt-in vision-only Playwright screenshot loop that text-only models skip. Adds tests/frontend-design.test.mjs to guard the additions. The command is regenerated from the skill and stays in sync. --- commands/frontend-design.md | 46 +++++++++++++++++++++++++++++-- skills/frontend-design/SKILL.md | 48 ++++++++++++++++++++++++++++++--- tests/frontend-design.test.mjs | 38 ++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 tests/frontend-design.test.mjs diff --git a/commands/frontend-design.md b/commands/frontend-design.md index 25ad055..6be364b 100644 --- a/commands/frontend-design.md +++ b/commands/frontend-design.md @@ -1,8 +1,8 @@ --- -description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics. +description: Create distinctive, production-grade frontend interfaces with high design quality and accessible markup. Use this skill when the user asks to build or beautify web components, pages, applications, landing pages, dashboards, artifacts, or React/HTML/CSS UI. Generates creative, polished code that avoids generic AI aesthetics, then self-checks it against an objective accessibility and quality rubric. --- -This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices. +This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices, then audit it against the self-critique rubric before returning. The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints. @@ -42,6 +42,48 @@ Interpret creatively and make unexpected choices that feel genuinely designed fo Remember: the model is capable of extraordinary creative work. Don't hold back; show what can truly be created when thinking outside the box and committing fully to a distinctive vision. +## Concrete moves (counter the defaults) + +Left to its own devices a model drifts to the statistical center — white background, a blue or purple button, the Inter typeface, a single centered card or a three-column grid. Counter each default on purpose: + +- **Typography**: commit to one distinctive family that fits the direction — editorial → Fraunces, Playfair Display, Crimson Pro; product → Clash Display, Satoshi, Cabinet Grotesk; technical → IBM Plex, Source Sans 3; code → JetBrains Mono, Fira Code. Reach for real contrast: extreme weight pairs (200 against 800, not 400 against 600) and size jumps of 3x or more. Avoid Space Grotesk — good, but a known convergence trap. +- **Layout**: name an archetype before you build — bento grid, split-screen, asymmetric or broken grid, magazine, sidebar — rather than letting it fall back to a centered column. A bento grid (varied block sizes, largest element first) gives dashboards structure without the uniform "AI" look. +- **Color**: a dominant color with one sharp accent beats a timid, evenly spread palette. Anchor it to a concrete reference — an IDE theme, a cultural or era aesthetic — not generic brand-blue, and give color semantic meaning where it helps. +- **Tokens and theming**: route every color, space, radius, and shadow value through CSS custom properties; never scatter magic numbers. Implement dark mode by redefining those variables under `.dark`, not by restyling. If the user already has a brand or design system, inject its tokens and skip your defaults entirely. +- **Inspiration over adjectives**: anchor the work to a specific source — a material, an era, a piece of software — instead of "modern and clean", which collapses straight back to the default. + +## Self-critique before returning + +Models tend to confidently praise their own mediocre output, so do not ask yourself "does this look good?" Instead run the concrete pass/fail checks below and fix every failure before returning the code. These target WCAG 2.2 AA and basic craft — things checkable from the markup, not matters of taste. + +Accessibility: + +- Body-text contrast is at least 4.5:1; large text (24px+, or 18.66px+ bold) and the borders of UI controls and meaningful icons are at least 3:1. Meaning is never carried by color alone. +- Semantics are native: `