.claude/skills/frontend-designer/SKILL.md
Evidence-based frontend design: research, evaluate, and build production-grade interfaces. Audits existing UI with Chrome DevTools, documents design decisions with rationale, and applies modern design principles including AI-first patterns. Use for building, reviewing, or improving any frontend interface.
npx skillsauth add Coignite-ApS/businesslogic frontend-designerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill creates, evaluates, and improves frontend interfaces using research-backed design principles. Every design decision must have a documented rationale — we never make choices without explaining WHY.
This skill MUST be run as a sub-agent using the Agent tool. This ensures:
How to invoke from the main conversation:
Agent tool → prompt: "You are an Evidence-Based Frontend Designer Agent. Read and
follow ALL instructions in .claude/skills/frontend-designer/SKILL.md. Project root:
[cwd]. Task: [arguments]. Execute all phases as appropriate. Save design audit reports
to docs/design-decisions/. Return a summary of your work and key design decisions."
review: Audit an existing interface via Chrome DevToolsbuild <description>: Design and build a new interfaceimprove <path>: Improve an existing component/pagedocument: Generate a design decisions document for the current UIBefore ANY design work, gather evidence. This phase ensures we make informed decisions, not guesses.
Ask or determine:
Search for evidence on how similar problems have been solved:
WebSearch: "[domain] dashboard UX best practices"
WebSearch: "[component type] design patterns 2025 2026"
WebSearch: "Nielsen Norman Group [relevant topic]"
Key sources to prioritize:
Before proceeding, write a brief research summary:
## Design Research — [Component/Page Name]
### User Context
- Primary user: [who]
- Task: [what they're doing]
- Frequency: [how often]
- Environment: [where/device]
### Evidence Gathered
1. [Finding from source] — [URL]
2. [Finding from source] — [URL]
3. [Finding from source] — [URL]
### Design Implications
- Because [evidence], we should [decision]
- Because [evidence], we should [decision]
Apply these evidence-based principles to every design decision. Each principle includes its source so anyone can verify WHY we follow it.
Source: Jakob Nielsen, Nielsen Norman Group, 1994 (refined 2020) Evidence: Factor analysis of 249 usability problems across multiple studies.
| # | Heuristic | What to check | |---|-----------|---------------| | 1 | Visibility of system status | Does the UI show what's happening? Loading states, progress indicators, success/error feedback? | | 2 | Match between system and real world | Does it use the user's language? Are concepts familiar, not developer jargon? | | 3 | User control and freedom | Can users undo, cancel, go back? Is there an emergency exit? | | 4 | Consistency and standards | Do similar things look and behave the same way? Platform conventions followed? | | 5 | Error prevention | Does design prevent errors before they happen? Confirmations for destructive actions? | | 6 | Recognition rather than recall | Are options visible? Does user need to remember things across screens? | | 7 | Flexibility and efficiency | Are there shortcuts for expert users? Can workflows be customized? | | 8 | Aesthetic and minimalist design | Is every element necessary? No decorative clutter competing with content? | | 9 | Help users recognize, diagnose, recover from errors | Are error messages in plain language with suggested solutions? | | 10 | Help and documentation | Is contextual help available? Can users find answers without leaving the flow? |
Source: Wertheimer, Koffka, Kohler (1920s). Applied to web: NN/G, Interaction Design Foundation. Evidence: Decades of cognitive psychology research on how humans perceive visual groups.
| Principle | Design Application | |-----------|-------------------| | Proximity | Related items must be close together. Unrelated items must have clear separation. Spacing IS information. | | Similarity | Elements that share visual properties (color, shape, size) are perceived as a group. Use consistently for categories. | | Continuity | The eye follows smooth paths. Align elements on clear axes. Use visual lines to guide attention. | | Closure | The brain completes incomplete shapes. Cards, containers, and borders can be implied, not always drawn. | | Figure/Ground | Make the primary content the clear "figure" against the background. Avoid ambiguity about what's foreground vs. background. | | Common Region | Elements inside a shared boundary (card, box, colored area) are perceived as a group. Use containers intentionally. |
Source: NN/G "5 Principles of Visual Design in UX" Evidence: Eye-tracking studies showing how users scan interfaces.
The F-Pattern: Users scan web pages in an F-shape — top horizontal line first, then down the left side. Place critical information top-left.
Size = Importance: Larger elements are noticed first. Scale conveys hierarchy.
Contrast = Attention: High contrast draws the eye. Use it for primary actions and critical information. Low contrast for secondary content.
The Squint Test: Blur your vision (or blur a screenshot). If the most important element isn't still the most prominent, your hierarchy is wrong.
Source: Google Material Design, Spotify Design System, spec.fm Evidence: Most screen resolutions are divisible by 8. Consistent spacing reduces cognitive load.
Rules:
Source: Robert Bringhurst "Elements of Typographic Style", modular scale theory Evidence: Mathematical ratios create harmonious visual rhythm.
Recommended scale (Major Third ratio: 1.25):
| Token | Size | Weight | Use |
|-------|------|--------|-----|
| display-lg | 36-48px | 700 | Page hero, dashboard KPIs |
| display-sm | 28-32px | 700 | Section hero values |
| heading-lg | 22-24px | 600 | Page titles |
| heading-md | 18-20px | 600 | Section headings |
| heading-sm | 16px | 600 | Subsection headings |
| body-lg | 16px | 400 | Primary body text |
| body-md | 14px | 400 | Default body, form labels |
| body-sm | 13px | 400 | Secondary text, metadata |
| caption | 12px | 400-500 | Labels, timestamps, help text |
Line height: 1.15 for large display text, 1.4-1.5 for body text, 1.6 for long-form reading.
Source: WCAG 2.2 (W3C), Material Design 3, Radix Colors Evidence: WCAG AA requires 4.5:1 contrast ratio for text; large text (18px+ bold or 24px+) requires 3:1.
Semantic palette structure:
Source: Smashing Magazine "Design Patterns for AI Interfaces" (Vitaly Friedman, 2025), Groovy Web "UI/UX Trends for AI-First Apps 2026", AufaitUX "AI Design Patterns Enterprise Dashboards" Evidence: Chat interfaces are fading as the default. Task-oriented UIs with AI augmentation outperform pure conversational interfaces.
| Pattern | Description | When to use | |---------|-------------|-------------| | Insight Cards | Compact cards showing ML predictions, anomalies, or suggestions with confidence scores | Dashboards, monitoring | | Temperature Controls | Sliders/knobs that let users control AI behavior (creativity, precision, scope) | AI generation tools | | Structured Presets | Pre-built templates and starting points instead of blank canvas | Content creation, config | | Progressive Disclosure of AI | Show AI capabilities gradually as user demonstrates readiness | Onboarding, complex tools | | Ambient Intelligence | UI adapts layout/content based on user behavior — with "Personalised for you" labels and one-click reset | Dashboards, feeds | | Confidence Indicators | Visual representation of how certain the AI is (bars, percentages, traffic lights) | Search results, predictions | | Streaming Output | Typewriter-effect for AI responses with skeleton loading for structure | Chat, generation | | Explanation Layers | Expandable "why" sections that explain AI reasoning | Recommendations, scores | | Human-in-the-Loop Controls | Approve/reject/edit AI suggestions before they take effect | Automation, workflows | | Multimodal Feedback | Accept input via text, voice, image, drag-drop — not just chat | Search, creation |
Source: Rosenfeld & Morville "Information Architecture for the World Wide Web", NN/G, Figma Evidence: Poor IA is the #1 cause of user frustration in complex applications.
Key rules:
Use Chrome DevTools to evaluate existing interfaces. Run this phase when reviewing or improving UI.
1. Open the page: mcp__chrome-devtools__navigate_page
2. Take a screenshot: mcp__chrome-devtools__take_snapshot
3. Analyze the screenshot against:
- Visual hierarchy (squint test)
- Spacing consistency (8pt grid alignment)
- Typography scale (are sizes from the defined scale?)
- Color contrast (sufficient for accessibility?)
- Gestalt grouping (are related items visually grouped?)
// Run in Chrome DevTools console via evaluate_javascript
// Test at key breakpoints
const breakpoints = [
{ name: 'mobile', width: 375, height: 812 },
{ name: 'tablet', width: 768, height: 1024 },
{ name: 'desktop', width: 1280, height: 800 },
{ name: 'widescreen', width: 1920, height: 1080 }
];
// Resize viewport and screenshot at each breakpoint
// Check color contrast ratios
const elements = document.querySelectorAll('*');
const issues = [];
elements.forEach(el => {
const style = window.getComputedStyle(el);
const bg = style.backgroundColor;
const fg = style.color;
const fontSize = parseFloat(style.fontSize);
// Flag elements with potential contrast issues
if (fg === bg) issues.push({ el: el.tagName, issue: 'invisible text' });
});
console.log('Potential issues:', issues.length);
Also check:
// Get Core Web Vitals
const entries = performance.getEntriesByType('navigation');
const paint = performance.getEntriesByType('paint');
console.log('DOM Content Loaded:', entries[0]?.domContentLoadedEventEnd);
console.log('Load:', entries[0]?.loadEventEnd);
paint.forEach(p => console.log(p.name + ':', p.startTime));
// Check for layout shifts
new PerformanceObserver(list => {
list.getEntries().forEach(entry => {
console.log('Layout shift:', entry.value);
});
}).observe({ type: 'layout-shift', buffered: true });
Check if the interface follows the design system tokens:
// Audit for hardcoded colors
const allElements = document.querySelectorAll('*');
const hardcodedColors = [];
allElements.forEach(el => {
const style = el.getAttribute('style') || '';
if (style.match(/#[0-9a-fA-F]{3,8}|rgb\(|rgba\(/)) {
hardcodedColors.push({
element: el.tagName + (el.className ? '.' + el.className.split(' ')[0] : ''),
style: style.substring(0, 100)
});
}
});
console.log('Hardcoded colors found:', hardcodedColors.length);
hardcodedColors.slice(0, 20).forEach(c => console.log(' ', c.element, c.style));
Compile all findings into a structured evaluation:
## Design Audit — [Page/Component Name]
Date: [DATE]
URL: [URL]
### Heuristic Evaluation (Nielsen's 10)
| # | Heuristic | Score (1-5) | Issues | Recommendations |
|---|-----------|-------------|--------|-----------------|
| 1 | Visibility of system status | X | ... | ... |
... (all 10)
### Visual Design Assessment
- Grid compliance: X% of spacing follows 8pt grid
- Typography: X of Y text sizes match the type scale
- Color tokens: X hardcoded colors found
- Contrast: X elements below AA ratio
### Accessibility
- Keyboard navigation: PASS/FAIL
- Focus indicators: PASS/FAIL
- Alt text coverage: X%
- Heading hierarchy: PASS/FAIL
- ARIA compliance: X issues
### Performance
- First Paint: Xms
- DOM Content Loaded: Xms
- Layout shifts: X
### Top 5 Improvements (Priority Order)
1. [Most impactful change] — Rationale: [evidence]
2. ...
When creating new interfaces, follow this process:
Structure:
<nav>, <main>, <section>, <article>, <aside>)Styling:
!important unless overriding third-party stylesInteractivity:
When building within the BusinessLogic CMS (Directus), also read:
legacy-implementation/businesslogic-cms/.claude/skills/frontend-design/SKILL.md for Directus-specific components and theme variablesv-* Directus components over custom HTMLvar(--theme--*) CSS variables exclusively<style scoped> on all componentsWhen building public-facing or standalone UIs:
Every non-trivial design choice must be recorded. This creates institutional knowledge and prevents "why does it look like this?" questions later.
Save to docs/design-decisions/ or inline as comments:
## DDR-[number]: [Decision Title]
**Date:** [DATE]
**Component:** [path/to/component]
**Author:** [who decided]
### Context
[What problem or question prompted this decision?]
### Research
[What evidence did we gather?]
- [Source 1] — [Finding]
- [Source 2] — [Finding]
### Decision
[What we chose to do]
### Rationale
[WHY this choice, backed by evidence]
### Alternatives Considered
1. [Alternative A] — rejected because [reason]
2. [Alternative B] — rejected because [reason]
### Consequences
- Positive: [what improves]
- Negative: [trade-offs we accept]
- Risks: [what could go wrong]
Before considering any design work complete:
These are the authoritative sources backing this skill. When in doubt, consult these:
| Source | URL | What for | |--------|-----|----------| | Nielsen Norman Group | nngroup.com | Usability heuristics, UX research, evidence-based design | | Smashing Magazine — AI Patterns | smashingmagazine.com | AI interface design patterns, agentic AI UX | | WCAG 2.2 | w3.org/WAI/WCAG22/quickref | Accessibility requirements | | Laws of UX | lawsofux.com | Psychology-backed design principles | | Material Design 3 | m3.material.io | Component patterns, color system, spacing | | Radix Colors | radix-ui.com/colors | Accessible color scales with contrast guarantees | | Interaction Design Foundation — Gestalt | ixdf.org | Gestalt principles applied to digital | | 8pt Grid Guide | spec.fm/specifics/8-pt-grid | Spacing system rationale | | W3C Design Tokens | design-tokens.github.io/community-group | Design token specification | | Figma — Information Architecture | figma.com/resource-library | IA patterns and best practices |
When researching for a specific design decision, ALWAYS search these sources first, then branch out to domain-specific resources.
tools
Review task backlog across all services, pick next project, update status, or add new ideas
testing
Complete project health check: verify tests, documentation, database snapshots, migration progress, and suggest next steps. Run after completing any task or iteration.
development
DevOps infrastructure review agent: Terraform audit, Docker/Compose hardening, Coolify deployment assessment, networking, backup strategy, monitoring, and CI/CD pipeline review. Evaluates infrastructure like a senior DevOps engineer performing production readiness assessment — with evidence, severity ratings, and actionable recommendations.
development
CTO-level technical review agent: security audit, architecture evaluation, code quality analysis, dependency assessment, and technology fitness review. Evaluates the project like a senior technical leader performing due diligence — with evidence, severity ratings, and actionable recommendations.