From godmode
Use when constructing frontend components, selecting layout strategies, orchestrating state, or assembling interactive UI - spans component architecture, responsive adaptation, accessibility compliance, and rendering performance across any frontend framework
npx claudepluginhub noobygains/godmode --plugin godmodeThis skill uses the workspace's default tool permissions.
Construct UI components with disciplined architecture, not improvised markup.
Builds production-quality, accessible, performant UIs using composable components, proper layouts, and state management. Use for creating or modifying user-facing interfaces.
Guides frontend UI/UX development with patterns for component architecture, responsive design, accessibility, state management, visual consistency, performance, and testing.
Builds accessible, responsive, performant frontend components using design systems, modern CSS, WCAG patterns, and React/Vue/Svelte examples.
Share bugs, ideas, or general feedback.
Construct UI components with disciplined architecture, not improvised markup.
Core principle: Every component decision -- layout strategy, state ownership, accessibility posture, responsive behavior -- follows established patterns. The UX Patterns skill tells you WHAT to build. This skill tells you HOW to build it with structural integrity.
PREREQUISITE: Invoke godmode:ux-patterns first to identify applicable patterns and token values. This skill assumes tokens and patterns are already established.
Mandatory when:
Sequenced after:
NO COMPONENT WITHOUT STRUCTURE, STATES, AND ACCESSIBILITY DEFINED FIRST
Before writing component code, establish: semantic structure (correct HTML elements), all visual states (empty, loading, error, populated, disabled), and accessibility requirements (ARIA attributes, keyboard interaction, contrast ratios).
Assemble components from smaller, composable units rather than monolithic prop-heavy blocks.
``` Dialog DialogHeader DialogTitle DialogDescription DialogBody DialogFooter ``` Each unit is independently useful and independently styleable. ``` Dialog (title, description, body, footer, headerAlign, footerAlign, showCloseButton, variant, size, overlayOpacity, titleSize, ...) ``` Prop explosion, unmaintainable, impossible to extend.Before writing any component:
button not div onClick, nav not div className="nav")digraph layout_choice {
rankdir=TB;
q1 [label="What is being\narranged?", shape=diamond];
q2 [label="Single axis or\ntwo axes?", shape=diamond];
q3 [label="Are items\nuniform in size?", shape=diamond];
grid [label="Use CSS Grid\ngrid-template-columns\ngrid-template-rows", shape=box];
flex [label="Use Flexbox\nflex-direction\njustify/align", shape=box];
grid_auto [label="Use CSS Grid\nauto-fill/auto-fit\nminmax()", shape=box];
q1 -> q2;
q2 -> grid [label="two axes\n(rows AND columns)"];
q2 -> q3 [label="single axis\n(row OR column)"];
q3 -> grid_auto [label="yes\n(uniform cards)"];
q3 -> flex [label="no\n(nav items,\nform row)"];
}
Example patterns:
/* Self-adjusting card grid */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: var(--space-6);
}
/* Dashboard scaffold */
.dashboard {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto 1fr;
gap: var(--space-6);
}
.dashboard .wide-chart { grid-column: span 2; }
Example patterns:
/* Navigation row */
.nav-row {
display: flex;
align-items: center;
gap: var(--space-4);
}
/* Inline form group */
.inline-group {
display: flex;
align-items: flex-end;
gap: var(--space-3);
}
.inline-group .input-field { flex: 1; }
digraph state_ownership {
rankdir=TB;
q1 [label="Where does this\nstate belong?", shape=diamond];
q2 [label="Consumed by\nmultiple components?", shape=diamond];
q3 [label="Server-originated\nor client-only?", shape=diamond];
q4 [label="Prop-drilling\nexceeds 3 levels?", shape=diamond];
local [label="Component-local state\nuseState / ref", shape=box];
server [label="Server state manager\nTanStack Query / SWR", shape=box];
context [label="Context / Provider\nReact Context / provide-inject", shape=box];
global [label="Global store\nZustand / Pinia / Signals", shape=box];
q1 -> q2;
q2 -> local [label="no\n(isolated component)"];
q2 -> q3 [label="yes"];
q3 -> server [label="server-originated\n(API responses,\ncached data)"];
q3 -> q4 [label="client-only\n(UI flags,\npreferences)"];
q4 -> context [label="no\n(2-3 levels)"];
q4 -> global [label="yes\n(application-wide)"];
}
Governing principles:
Write mobile styles as the baseline, then layer complexity at wider breakpoints.
/* Mobile baseline */
.wrapper {
padding: var(--space-4);
}
/* Tablet tier */
@media (min-width: 768px) {
.wrapper {
padding: var(--space-6);
max-width: 768px;
margin: 0 auto;
}
}
/* Desktop tier */
@media (min-width: 1024px) {
.wrapper {
padding: var(--space-8);
max-width: 1280px;
}
}
| Element | Mobile | Tablet | Desktop |
|---|---|---|---|
| Navigation | Hamburger or bottom sheet | Tab bar or collapsed sidebar | Expanded sidebar |
| Card grid | Single column | Two columns | Three to four columns |
| Data table | Stacked card view or horizontal scroll | Full table, fewer columns | Complete table |
| Sidebar + Main | Main only; sidebar in drawer | Icon-only sidebar | Fully expanded sidebar |
| Form | Single column, inputs stretch full width | Single column, max-width 560px | Two columns for paired fields |
| Modal | Full-screen sheet | Centered, 80% viewport width | Centered, max-width 480px |
| Hero | Stacked (image below headline) | Stacked, larger type | Side-by-side |
:focus-visible, 2px outline minimum)aria-label, or aria-labelledby)aria-disabled<label> (placeholder alone is insufficient)aria-required="true")aria-describedby)aria-live)alt textalt="" or aria-hidden="true"aria-labelrole="img" with aria-label or aria-hidden="true"prefers-reduced-motionprefers-color-scheme if dark mode is offered| Interaction | Duration | Easing |
|---|---|---|
| Hover response | 150ms | ease |
| Button press | 100ms | ease-out |
| Modal entrance | 200ms | ease-out |
| Modal exit | 150ms | ease-in |
| Drawer slide | 250ms | ease-out |
| Fade entrance | 200ms | ease |
| Page transition | 200-300ms | ease-in-out |
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
<fieldset> and <legend>(required) for screen readerswidth/height attributes (prevents CLS), loading="lazy" for below-fold images, srcset for responsive delivery.loading="lazy"| Mistake | Correction |
|---|---|
div for everything | Use semantic HTML (button, nav, main, section, article) |
| Placeholder as sole label | Always provide visible <label> elements |
| Pixel literals everywhere | Use token variables from the design system |
| Fixed widths on containers | Use max-width + percentage or auto margins |
| Removing focus outlines | Style :focus-visible instead of eliminating outline |
| Click handlers on divs | Use <button> or <a> for interactive elements |
| Margins for layout spacing | Use gap with Grid or Flexbox |
| Importing entire icon libraries | Import individual icons; enable tree-shaking |
| Only implementing the happy path | Design all states before building the happy path |
| Testing only on desktop | Test mobile-first, verify desktop afterward |
Prerequisite:
Complementary skills:
Supporting files:
component-patterns.md -- Reusable component blueprints with accessibility built in