[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CCXJFH1KQ4CFE2VDRQ27RT":3,"skill-same:01M7CCXJFH1KQ4CFE2VDRQ27RT":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7CCXJFH1KQ4CFE2VDRQ27RT","maquina-ui-standards",null,"Build consistent, accessible UIs in Rails using maquina_components. Use this skill when implementing UI for features, creating views, building forms, or reviewing UI specs. Triggers on view creation, UI implementation, form building, layout design, or mentions of maquina_components usage.","shenyimings\u002Fskillet","shenyimings","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89332218?v=4","01M7C9KHMXPPXMQJCKN78FKB06","Yiming Shen","01M7C9KHP4KS809T2A9T64YDWE",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: maquina-ui-standards\ndescription: Build consistent, accessible UIs in Rails using maquina_components. Use this skill when implementing UI for features, creating views, building forms, or reviewing UI specs. Triggers on view creation, UI implementation, form building, layout design, or mentions of maquina_components usage.\n---\n\n# Maquina UI Standards\n\nBuild production-quality Rails UIs with maquina_components — ERB partials styled with Tailwind CSS 4 and data attributes, inspired by shadcn\u002Fui.\n\n## When to Use This Skill\n\n- Implementing UI for a feature spec\n- Creating new views or pages\n- Building forms with validation\n- Designing page layouts\n- Reviewing UI implementation for consistency\n\n## Quick Reference\n\n### Component Rendering\n\n```erb\n\u003C%# Partial components %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\" do %>\n    \u003C%= render \"components\u002Fcard\u002Ftitle\", text: \"Title\" %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Data-attribute components (forms) %>\n\u003C%= f.text_field :email, data: { component: \"input\" } %>\n\u003C%= f.submit \"Save\", data: { component: \"button\", variant: \"primary\" } %>\n```\n\n### Decision Framework\n\n| Need | Component | Why |\n|------|-----------|-----|\n| Container with header\u002Fcontent\u002Ffooter | **Card** | Structured content grouping |\n| Important message to user | **Alert** | Draws attention, semantic variants |\n| Status indicator | **Badge** | Compact, inline status |\n| Data display | **Table** | Structured rows\u002Fcolumns |\n| No data state | **Empty** | Consistent empty patterns |\n| User actions menu | **Dropdown Menu** | Accessible, keyboard-navigable |\n| Selection from options | **Toggle Group** | Visual, single\u002Fmulti select |\n| Selection from many options | **Combobox** | Searchable, filterable |\n| Date selection (inline) | **Calendar** | Always-visible date picker |\n| Date selection (popover) | **Date Picker** | Compact form date input |\n| Page location | **Breadcrumbs** | Navigation context |\n| Large result sets | **Pagination** | Pagy integration |\n| App navigation | **Sidebar** | Collapsible, persistent state |\n| Temporary notifications | **Toast** | Non-intrusive feedback |\n| Form inputs | **Form components** | Consistent styling via data attrs |\n\n## File References\n\n| File | Content |\n|------|---------|\n| [component-catalog.md](component-catalog.md) | All components with props, variants, examples |\n| [layout-patterns.md](layout-patterns.md) | Page structure, grids, responsive design |\n| [form-patterns.md](form-patterns.md) | Forms, validation, field groups |\n| [turbo-integration.md](turbo-integration.md) | Frames, Streams, Morph with components |\n| [spec-checklist.md](spec-checklist.md) | UI implementation checklist for specs |\n\n## Core Principles\n\n### 1. Composition Over Configuration\n\nComponents are small, composable building blocks. You have full flexibility in how you use them:\n\n**Option A: Use partials as-is** — Render maquina_components partials directly for standard patterns.\n\n**Option B: Compress complexity** — Wrap multiple partials into your own application-specific components that encode your conventions.\n\n**Option C: Copy and adapt** — Copy component partials into your app and customize for specific needs.\n\n```erb\n\u003C%# Option A: Direct partial usage %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\" do %>\n    \u003C%= render \"components\u002Fcard\u002Ftitle\", text: @resource.name %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Option B: Application-specific wrapper %>\n\u003C%# app\u002Fviews\u002Fcomponents\u002F_resource_card.html.erb %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: resource.name %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: resource.summary %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= yield :actions if content_for?(:actions) %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C%= yield %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Usage: \u003C%= render \"components\u002Fresource_card\", resource: @user do %>...content...\u003C% end %>\n\n\u003C%# Option C: Copied and customized for booking-specific needs %>\n\u003C%# app\u002Fviews\u002Fbookings\u002F_booking_card.html.erb - your own component %>\n```\n\nChoose the approach that best fits your use case. The goal is consistency within your application, not rigid adherence to a single pattern.\n\n```erb\n\u003C%# ✅ GOOD: Compose from parts %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: @resource.name %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: @resource.summary %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= link_to \"Edit\", edit_path, data: { component: \"button\", variant: \"outline\", size: \"sm\" } %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C!-- Content -->\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# ❌ BAD: Trying to configure everything via props %>\n\u003C%= render \"components\u002Fcard\", \n    title: @resource.name, \n    description: @resource.summary,\n    action_text: \"Edit\",\n    action_path: edit_path %>\n```\n\n### 2. Inline Errors Over Error Lists\n\n**Always prefer inline field errors with a flash message** over an alert containing a list of all validation errors.\n\n```erb\n\u003C%# ✅ RECOMMENDED: Inline errors + flash %>\n\u003C%= form_with model: @user, data: { component: \"form\" } do |f| %>\n  \u003Cdiv data-form-part=\"group\">\n    \u003C%= f.label :email, data: { component: \"label\" } %>\n    \u003C%= f.email_field :email, data: { component: \"input\" },\n        aria: { invalid: @user.errors[:email].any? } %>\n    \u003C% if @user.errors[:email].any? %>\n      \u003Cp data-form-part=\"error\">\u003C%= @user.errors[:email].first %>\u003C\u002Fp>\n    \u003C% end %>\n  \u003C\u002Fdiv>\n  \u003C%# Flash shows brief summary: \"Please fix the errors below\" %>\n\u003C% end %>\n\n\u003C%# ❌ AVOID: Alert with error list %>\n\u003C% if @user.errors.any? %>\n  \u003C%= render \"components\u002Falert\", variant: :destructive do %>\n    \u003Cul>\n      \u003C% @user.errors.full_messages.each do |msg| %>\n        \u003Cli>\u003C%= msg %>\u003C\u002Fli>\n      \u003C% end %>\n    \u003C\u002Ful>\n  \u003C% end %>\n\u003C% end %>\n```\n\nInline errors are more accessible — users see the problem next to the field that needs fixing. The flash provides a brief notification that something needs attention.\n\n### 3. Robust Input Attributes\n\n**Every input should have appropriate HTML5 attributes** for validation, accessibility, and mobile optimization:\n\n| Attribute | Purpose | Example |\n|-----------|---------|---------|\n| `type` | Correct keyboard, validation | `email`, `tel`, `url`, `number` |\n| `required` | Mark mandatory fields | `required: true` |\n| `maxlength` | Prevent overflow, guide user | `maxlength: 100` |\n| `minlength` | Minimum input | `minlength: 2` |\n| `pattern` | Custom validation | `pattern: \"[0-9]{10}\"` |\n| `inputmode` | Mobile keyboard hint | `inputmode: \"numeric\"` |\n| `autocomplete` | Autofill hints | `autocomplete: \"email\"` |\n\n```erb\n\u003C%# ✅ GOOD: Complete input attributes %>\n\u003C%= f.email_field :email,\n    data: { component: \"input\" },\n    required: true,\n    maxlength: 254,\n    autocomplete: \"email\",\n    placeholder: \"you@example.com\" %>\n\n\u003C%= f.phone_field :phone,\n    data: { component: \"input\" },\n    required: true,\n    maxlength: 20,\n    pattern: \"[+]?[0-9\\\\s\\\\-()]+\",\n    inputmode: \"tel\",\n    autocomplete: \"tel\" %>\n\n\u003C%= f.text_field :name,\n    data: { component: \"input\" },\n    required: true,\n    minlength: 2,\n    maxlength: 100,\n    autocomplete: \"name\" %>\n\n\u003C%# ❌ BAD: Missing attributes %>\n\u003C%= f.text_field :name, data: { component: \"input\" } %>\n```\n\n### 4. Data Attributes for Styling\n\nComponents use `data-component` and `data-*-part` attributes. CSS targets these, not classes:\n\n```erb\n\u003C%# Component identifies itself %>\n\u003Cdiv data-component=\"card\">\n  \u003Cdiv data-card-part=\"header\">...\u003C\u002Fdiv>\n  \u003Cdiv data-card-part=\"content\">...\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003C%# Variants via data attributes %>\n\u003C%= render \"components\u002Fbadge\", variant: :success do %>Active\u003C% end %>\n\u003C%# Renders: \u003Cspan data-component=\"badge\" data-variant=\"success\">Active\u003C\u002Fspan> %>\n```\n\n### 5. Form Components via Rails Helpers\n\nForm elements don't need partials — use data attributes directly:\n\n```erb\n\u003C%= form_with model: @user, data: { component: \"form\" } do |f| %>\n  \u003Cdiv data-form-part=\"group\">\n    \u003C%= f.label :email, data: { component: \"label\" } %>\n    \u003C%= f.email_field :email, data: { component: \"input\" } %>\n  \u003C\u002Fdiv>\n  \n  \u003Cdiv data-form-part=\"actions\">\n    \u003C%= f.submit \"Save\", data: { component: \"button\", variant: \"primary\" } %>\n  \u003C\u002Fdiv>\n\u003C% end %>\n```\n\n### 6. Icons via Helper\n\nUse `icon_for` helper, which delegates to your app's icon system:\n\n```erb\n\u003C%= icon_for :check, class: \"size-4\" %>\n\u003C%= icon_for :chevron_right, class: \"size-4 text-muted-foreground\" %>\n```\n\n### 7. Theme Variables\n\nColors come from CSS variables (shadcn\u002Fui convention):\n\n| Variable | Usage |\n|----------|-------|\n| `--primary` \u002F `--primary-foreground` | Primary actions, CTAs |\n| `--secondary` \u002F `--secondary-foreground` | Secondary elements |\n| `--muted` \u002F `--muted-foreground` | Subdued content |\n| `--accent` \u002F `--accent-foreground` | Highlights |\n| `--destructive` \u002F `--destructive-foreground` | Dangerous actions |\n| `--card` \u002F `--card-foreground` | Card backgrounds |\n| `--border` | Borders |\n| `--ring` | Focus rings |\n\n## Implementation Workflow\n\n### Step 1: Identify Components Needed\n\nRead the feature spec. Map UI requirements to components:\n\n```\nFeature: User Dashboard\n- Summary cards → Card (stats variant)\n- User list → Table with Badge for status\n- Empty state when no users → Empty\n- Actions per row → Dropdown Menu\n- Page navigation → Pagination\n```\n\n### Step 2: Plan Layout Structure\n\nDecide grid\u002Flayout before coding:\n\n```erb\n\u003C%# Dashboard layout %>\n\u003Cdiv class=\"space-y-6\">\n  \u003C%# Stats row %>\n  \u003Cdiv class=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n    \u003C%= render \"dashboard\u002Fstat_card\", ... %>\n  \u003C\u002Fdiv>\n  \n  \u003C%# Main content %>\n  \u003C%= render \"components\u002Fcard\" do %>\n    ...\n  \u003C% end %>\n\u003C\u002Fdiv>\n```\n\n### Step 3: Build with Components\n\nUse component catalog, follow composition patterns.\n\n### Step 4: Verify Against Checklist\n\nRun through [spec-checklist.md](spec-checklist.md) before marking complete.\n\n## Anti-Patterns\n\n| ❌ Don't | ✅ Do Instead |\n|----------|---------------|\n| Inline Tailwind for component styling | Use data attributes, let CSS handle it |\n| Create custom card\u002Falert\u002Fbadge divs | Use maquina_components |\n| Skip empty states | Always handle zero-data case |\n| Hardcode button styles | Use `data-component=\"button\"` |\n| Forget loading\u002Fdisabled states | Include all interaction states |\n| Mix icon libraries | Use `icon_for` consistently |\n| Nest components incorrectly | Follow documented composition |\n| Skip accessibility attributes | Include ARIA labels, roles |\n\n## Haab-Specific Patterns\n\nFor the Haab project, these additional conventions apply:\n\n### Brand Colors\n\nOverride theme variables in application.css:\n\n```css\n:root {\n  --primary: oklch(0.467 0.175 3.95);      \u002F* Dusty Rose #BE185D *\u002F\n  --primary-foreground: oklch(0.985 0 0);\n}\n```\n\n### Booking Status Badges\n\n```erb\n\u003C% variant = case booking.status\n   when \"confirmed\" then :success\n   when \"pending\" then :warning\n   when \"cancelled\", \"no_show\" then :destructive\n   else :secondary\n   end %>\n\u003C%= render \"components\u002Fbadge\", variant: variant do %>\n  \u003C%= t(\"enums.booking.status.#{booking.status}\") %>\n\u003C% end %>\n```\n\n### Money Display\n\n```erb\n\u003C%= render \"components\u002Fbadge\", variant: :outline do %>\n  \u003C%= format_money(service.price_cents) %>\n\u003C% end %>\n```\n\n### Time Display\n\n```erb\n\u003C%# Use monospace for times %>\n\u003Cspan class=\"font-mono text-sm\">\n  \u003C%= l(booking.starts_at, format: :time) %>\n\u003C\u002Fspan>\n```\n\n## Quick Component Examples\n\n### Card with Action Header\n\n```erb\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: t(\".title\") %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: t(\".description\") %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= link_to new_resource_path, data: { component: \"button\", variant: \"primary\", size: \"sm\" } do %>\n        \u003C%= icon_for :plus, class: \"size-4 mr-1\" %>\u003C%= t(\".add\") %>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C!-- Content here -->\n  \u003C% end %>\n\u003C% end %>\n```\n\n### Table with Actions\n\n```erb\n\u003C%= render \"components\u002Ftable\" do %>\n  \u003C%= render \"components\u002Ftable\u002Fheader\" do %>\n    \u003C%= render \"components\u002Ftable\u002Frow\" do %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\" do %>\u003C%= t(\".name\") %>\u003C% end %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\" do %>\u003C%= t(\".status\") %>\u003C% end %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\", css_classes: \"w-10\" do %>\n        \u003Cspan class=\"sr-only\">\u003C%= t(\".actions\") %>\u003C\u002Fspan>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Ftable\u002Fbody\" do %>\n    \u003C% @items.each do |item| %>\n      \u003C%= render \"components\u002Ftable\u002Frow\" do %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\u003C%= item.name %>\u003C% end %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\n          \u003C%= render \"components\u002Fbadge\", variant: status_variant(item) do %>\n            \u003C%= item.status.titleize %>\n          \u003C% end %>\n        \u003C% end %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\n          \u003C%= render \"shared\u002Frow_actions\", item: item %>\n        \u003C% end %>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n\u003C% end %>\n```\n\n### Empty State\n\n```erb\n\u003C% if @items.empty? %>\n  \u003C%= render \"components\u002Fempty\" do %>\n    \u003C%= render \"components\u002Fempty\u002Fheader\" do %>\n      \u003C%= render \"components\u002Fempty\u002Fmedia\" do %>\n        \u003Cdiv class=\"flex h-16 w-16 items-center justify-center rounded-full bg-muted\">\n          \u003C%= icon_for :inbox, class: \"size-8 text-muted-foreground\" %>\n        \u003C\u002Fdiv>\n      \u003C% end %>\n      \u003C%= render \"components\u002Fempty\u002Ftitle\", text: t(\".empty.title\") %>\n      \u003C%= render \"components\u002Fempty\u002Fdescription\", text: t(\".empty.description\") %>\n    \u003C% end %>\n    \u003C%= render \"components\u002Fempty\u002Fcontent\" do %>\n      \u003C%= link_to t(\".empty.action\"), new_path, data: { component: \"button\", variant: \"primary\" } %>\n    \u003C% end %>\n  \u003C% end %>\n\u003C% end %>\n```\n\nSee individual reference files for complete documentation.\n","# Maquina UI Standards\n\nBuild production-quality Rails UIs with maquina_components — ERB partials styled with Tailwind CSS 4 and data attributes, inspired by shadcn\u002Fui.\n\n## When to Use This Skill\n\n- Implementing UI for a feature spec\n- Creating new views or pages\n- Building forms with validation\n- Designing page layouts\n- Reviewing UI implementation for consistency\n\n## Quick Reference\n\n### Component Rendering\n\n```erb\n\u003C%# Partial components %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\" do %>\n    \u003C%= render \"components\u002Fcard\u002Ftitle\", text: \"Title\" %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Data-attribute components (forms) %>\n\u003C%= f.text_field :email, data: { component: \"input\" } %>\n\u003C%= f.submit \"Save\", data: { component: \"button\", variant: \"primary\" } %>\n```\n\n### Decision Framework\n\n| Need | Component | Why |\n|------|-----------|-----|\n| Container with header\u002Fcontent\u002Ffooter | **Card** | Structured content grouping |\n| Important message to user | **Alert** | Draws attention, semantic variants |\n| Status indicator | **Badge** | Compact, inline status |\n| Data display | **Table** | Structured rows\u002Fcolumns |\n| No data state | **Empty** | Consistent empty patterns |\n| User actions menu | **Dropdown Menu** | Accessible, keyboard-navigable |\n| Selection from options | **Toggle Group** | Visual, single\u002Fmulti select |\n| Selection from many options | **Combobox** | Searchable, filterable |\n| Date selection (inline) | **Calendar** | Always-visible date picker |\n| Date selection (popover) | **Date Picker** | Compact form date input |\n| Page location | **Breadcrumbs** | Navigation context |\n| Large result sets | **Pagination** | Pagy integration |\n| App navigation | **Sidebar** | Collapsible, persistent state |\n| Temporary notifications | **Toast** | Non-intrusive feedback |\n| Form inputs | **Form components** | Consistent styling via data attrs |\n\n## File References\n\n| File | Content |\n|------|---------|\n| [component-catalog.md](component-catalog.md) | All components with props, variants, examples |\n| [layout-patterns.md](layout-patterns.md) | Page structure, grids, responsive design |\n| [form-patterns.md](form-patterns.md) | Forms, validation, field groups |\n| [turbo-integration.md](turbo-integration.md) | Frames, Streams, Morph with components |\n| [spec-checklist.md](spec-checklist.md) | UI implementation checklist for specs |\n\n## Core Principles\n\n### 1. Composition Over Configuration\n\nComponents are small, composable building blocks. You have full flexibility in how you use them:\n\n**Option A: Use partials as-is** — Render maquina_components partials directly for standard patterns.\n\n**Option B: Compress complexity** — Wrap multiple partials into your own application-specific components that encode your conventions.\n\n**Option C: Copy and adapt** — Copy component partials into your app and customize for specific needs.\n\n```erb\n\u003C%# Option A: Direct partial usage %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\" do %>\n    \u003C%= render \"components\u002Fcard\u002Ftitle\", text: @resource.name %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Option B: Application-specific wrapper %>\n\u003C%# app\u002Fviews\u002Fcomponents\u002F_resource_card.html.erb %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: resource.name %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: resource.summary %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= yield :actions if content_for?(:actions) %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C%= yield %>\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# Usage: \u003C%= render \"components\u002Fresource_card\", resource: @user do %>...content...\u003C% end %>\n\n\u003C%# Option C: Copied and customized for booking-specific needs %>\n\u003C%# app\u002Fviews\u002Fbookings\u002F_booking_card.html.erb - your own component %>\n```\n\nChoose the approach that best fits your use case. The goal is consistency within your application, not rigid adherence to a single pattern.\n\n```erb\n\u003C%# ✅ GOOD: Compose from parts %>\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: @resource.name %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: @resource.summary %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= link_to \"Edit\", edit_path, data: { component: \"button\", variant: \"outline\", size: \"sm\" } %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C!-- Content -->\n  \u003C% end %>\n\u003C% end %>\n\n\u003C%# ❌ BAD: Trying to configure everything via props %>\n\u003C%= render \"components\u002Fcard\", \n    title: @resource.name, \n    description: @resource.summary,\n    action_text: \"Edit\",\n    action_path: edit_path %>\n```\n\n### 2. Inline Errors Over Error Lists\n\n**Always prefer inline field errors with a flash message** over an alert containing a list of all validation errors.\n\n```erb\n\u003C%# ✅ RECOMMENDED: Inline errors + flash %>\n\u003C%= form_with model: @user, data: { component: \"form\" } do |f| %>\n  \u003Cdiv data-form-part=\"group\">\n    \u003C%= f.label :email, data: { component: \"label\" } %>\n    \u003C%= f.email_field :email, data: { component: \"input\" },\n        aria: { invalid: @user.errors[:email].any? } %>\n    \u003C% if @user.errors[:email].any? %>\n      \u003Cp data-form-part=\"error\">\u003C%= @user.errors[:email].first %>\u003C\u002Fp>\n    \u003C% end %>\n  \u003C\u002Fdiv>\n  \u003C%# Flash shows brief summary: \"Please fix the errors below\" %>\n\u003C% end %>\n\n\u003C%# ❌ AVOID: Alert with error list %>\n\u003C% if @user.errors.any? %>\n  \u003C%= render \"components\u002Falert\", variant: :destructive do %>\n    \u003Cul>\n      \u003C% @user.errors.full_messages.each do |msg| %>\n        \u003Cli>\u003C%= msg %>\u003C\u002Fli>\n      \u003C% end %>\n    \u003C\u002Ful>\n  \u003C% end %>\n\u003C% end %>\n```\n\nInline errors are more accessible — users see the problem next to the field that needs fixing. The flash provides a brief notification that something needs attention.\n\n### 3. Robust Input Attributes\n\n**Every input should have appropriate HTML5 attributes** for validation, accessibility, and mobile optimization:\n\n| Attribute | Purpose | Example |\n|-----------|---------|---------|\n| `type` | Correct keyboard, validation | `email`, `tel`, `url`, `number` |\n| `required` | Mark mandatory fields | `required: true` |\n| `maxlength` | Prevent overflow, guide user | `maxlength: 100` |\n| `minlength` | Minimum input | `minlength: 2` |\n| `pattern` | Custom validation | `pattern: \"[0-9]{10}\"` |\n| `inputmode` | Mobile keyboard hint | `inputmode: \"numeric\"` |\n| `autocomplete` | Autofill hints | `autocomplete: \"email\"` |\n\n```erb\n\u003C%# ✅ GOOD: Complete input attributes %>\n\u003C%= f.email_field :email,\n    data: { component: \"input\" },\n    required: true,\n    maxlength: 254,\n    autocomplete: \"email\",\n    placeholder: \"you@example.com\" %>\n\n\u003C%= f.phone_field :phone,\n    data: { component: \"input\" },\n    required: true,\n    maxlength: 20,\n    pattern: \"[+]?[0-9\\\\s\\\\-()]+\",\n    inputmode: \"tel\",\n    autocomplete: \"tel\" %>\n\n\u003C%= f.text_field :name,\n    data: { component: \"input\" },\n    required: true,\n    minlength: 2,\n    maxlength: 100,\n    autocomplete: \"name\" %>\n\n\u003C%# ❌ BAD: Missing attributes %>\n\u003C%= f.text_field :name, data: { component: \"input\" } %>\n```\n\n### 4. Data Attributes for Styling\n\nComponents use `data-component` and `data-*-part` attributes. CSS targets these, not classes:\n\n```erb\n\u003C%# Component identifies itself %>\n\u003Cdiv data-component=\"card\">\n  \u003Cdiv data-card-part=\"header\">...\u003C\u002Fdiv>\n  \u003Cdiv data-card-part=\"content\">...\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u003C%# Variants via data attributes %>\n\u003C%= render \"components\u002Fbadge\", variant: :success do %>Active\u003C% end %>\n\u003C%# Renders: \u003Cspan data-component=\"badge\" data-variant=\"success\">Active\u003C\u002Fspan> %>\n```\n\n### 5. Form Components via Rails Helpers\n\nForm elements don't need partials — use data attributes directly:\n\n```erb\n\u003C%= form_with model: @user, data: { component: \"form\" } do |f| %>\n  \u003Cdiv data-form-part=\"group\">\n    \u003C%= f.label :email, data: { component: \"label\" } %>\n    \u003C%= f.email_field :email, data: { component: \"input\" } %>\n  \u003C\u002Fdiv>\n  \n  \u003Cdiv data-form-part=\"actions\">\n    \u003C%= f.submit \"Save\", data: { component: \"button\", variant: \"primary\" } %>\n  \u003C\u002Fdiv>\n\u003C% end %>\n```\n\n### 6. Icons via Helper\n\nUse `icon_for` helper, which delegates to your app's icon system:\n\n```erb\n\u003C%= icon_for :check, class: \"size-4\" %>\n\u003C%= icon_for :chevron_right, class: \"size-4 text-muted-foreground\" %>\n```\n\n### 7. Theme Variables\n\nColors come from CSS variables (shadcn\u002Fui convention):\n\n| Variable | Usage |\n|----------|-------|\n| `--primary` \u002F `--primary-foreground` | Primary actions, CTAs |\n| `--secondary` \u002F `--secondary-foreground` | Secondary elements |\n| `--muted` \u002F `--muted-foreground` | Subdued content |\n| `--accent` \u002F `--accent-foreground` | Highlights |\n| `--destructive` \u002F `--destructive-foreground` | Dangerous actions |\n| `--card` \u002F `--card-foreground` | Card backgrounds |\n| `--border` | Borders |\n| `--ring` | Focus rings |\n\n## Implementation Workflow\n\n### Step 1: Identify Components Needed\n\nRead the feature spec. Map UI requirements to components:\n\n```\nFeature: User Dashboard\n- Summary cards → Card (stats variant)\n- User list → Table with Badge for status\n- Empty state when no users → Empty\n- Actions per row → Dropdown Menu\n- Page navigation → Pagination\n```\n\n### Step 2: Plan Layout Structure\n\nDecide grid\u002Flayout before coding:\n\n```erb\n\u003C%# Dashboard layout %>\n\u003Cdiv class=\"space-y-6\">\n  \u003C%# Stats row %>\n  \u003Cdiv class=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n    \u003C%= render \"dashboard\u002Fstat_card\", ... %>\n  \u003C\u002Fdiv>\n  \n  \u003C%# Main content %>\n  \u003C%= render \"components\u002Fcard\" do %>\n    ...\n  \u003C% end %>\n\u003C\u002Fdiv>\n```\n\n### Step 3: Build with Components\n\nUse component catalog, follow composition patterns.\n\n### Step 4: Verify Against Checklist\n\nRun through [spec-checklist.md](spec-checklist.md) before marking complete.\n\n## Anti-Patterns\n\n| ❌ Don't | ✅ Do Instead |\n|----------|---------------|\n| Inline Tailwind for component styling | Use data attributes, let CSS handle it |\n| Create custom card\u002Falert\u002Fbadge divs | Use maquina_components |\n| Skip empty states | Always handle zero-data case |\n| Hardcode button styles | Use `data-component=\"button\"` |\n| Forget loading\u002Fdisabled states | Include all interaction states |\n| Mix icon libraries | Use `icon_for` consistently |\n| Nest components incorrectly | Follow documented composition |\n| Skip accessibility attributes | Include ARIA labels, roles |\n\n## Haab-Specific Patterns\n\nFor the Haab project, these additional conventions apply:\n\n### Brand Colors\n\nOverride theme variables in application.css:\n\n```css\n:root {\n  --primary: oklch(0.467 0.175 3.95);      \u002F* Dusty Rose #BE185D *\u002F\n  --primary-foreground: oklch(0.985 0 0);\n}\n```\n\n### Booking Status Badges\n\n```erb\n\u003C% variant = case booking.status\n   when \"confirmed\" then :success\n   when \"pending\" then :warning\n   when \"cancelled\", \"no_show\" then :destructive\n   else :secondary\n   end %>\n\u003C%= render \"components\u002Fbadge\", variant: variant do %>\n  \u003C%= t(\"enums.booking.status.#{booking.status}\") %>\n\u003C% end %>\n```\n\n### Money Display\n\n```erb\n\u003C%= render \"components\u002Fbadge\", variant: :outline do %>\n  \u003C%= format_money(service.price_cents) %>\n\u003C% end %>\n```\n\n### Time Display\n\n```erb\n\u003C%# Use monospace for times %>\n\u003Cspan class=\"font-mono text-sm\">\n  \u003C%= l(booking.starts_at, format: :time) %>\n\u003C\u002Fspan>\n```\n\n## Quick Component Examples\n\n### Card with Action Header\n\n```erb\n\u003C%= render \"components\u002Fcard\" do %>\n  \u003C%= render \"components\u002Fcard\u002Fheader\", layout: :row do %>\n    \u003Cdiv>\n      \u003C%= render \"components\u002Fcard\u002Ftitle\", text: t(\".title\") %>\n      \u003C%= render \"components\u002Fcard\u002Fdescription\", text: t(\".description\") %>\n    \u003C\u002Fdiv>\n    \u003C%= render \"components\u002Fcard\u002Faction\" do %>\n      \u003C%= link_to new_resource_path, data: { component: \"button\", variant: \"primary\", size: \"sm\" } do %>\n        \u003C%= icon_for :plus, class: \"size-4 mr-1\" %>\u003C%= t(\".add\") %>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Fcard\u002Fcontent\" do %>\n    \u003C!-- Content here -->\n  \u003C% end %>\n\u003C% end %>\n```\n\n### Table with Actions\n\n```erb\n\u003C%= render \"components\u002Ftable\" do %>\n  \u003C%= render \"components\u002Ftable\u002Fheader\" do %>\n    \u003C%= render \"components\u002Ftable\u002Frow\" do %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\" do %>\u003C%= t(\".name\") %>\u003C% end %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\" do %>\u003C%= t(\".status\") %>\u003C% end %>\n      \u003C%= render \"components\u002Ftable\u002Fhead\", css_classes: \"w-10\" do %>\n        \u003Cspan class=\"sr-only\">\u003C%= t(\".actions\") %>\u003C\u002Fspan>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n  \u003C%= render \"components\u002Ftable\u002Fbody\" do %>\n    \u003C% @items.each do |item| %>\n      \u003C%= render \"components\u002Ftable\u002Frow\" do %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\u003C%= item.name %>\u003C% end %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\n          \u003C%= render \"components\u002Fbadge\", variant: status_variant(item) do %>\n            \u003C%= item.status.titleize %>\n          \u003C% end %>\n        \u003C% end %>\n        \u003C%= render \"components\u002Ftable\u002Fcell\" do %>\n          \u003C%= render \"shared\u002Frow_actions\", item: item %>\n        \u003C% end %>\n      \u003C% end %>\n    \u003C% end %>\n  \u003C% end %>\n\u003C% end %>\n```\n\n### Empty State\n\n```erb\n\u003C% if @items.empty? %>\n  \u003C%= render \"components\u002Fempty\" do %>\n    \u003C%= render \"components\u002Fempty\u002Fheader\" do %>\n      \u003C%= render \"components\u002Fempty\u002Fmedia\" do %>\n        \u003Cdiv class=\"flex h-16 w-16 items-center justify-center rounded-full bg-muted\">\n          \u003C%= icon_for :inbox, class: \"size-8 text-muted-foreground\" %>\n        \u003C\u002Fdiv>\n      \u003C% end %>\n      \u003C%= render \"components\u002Fempty\u002Ftitle\", text: t(\".empty.title\") %>\n      \u003C%= render \"components\u002Fempty\u002Fdescription\", text: t(\".empty.description\") %>\n    \u003C% end %>\n    \u003C%= render \"components\u002Fempty\u002Fcontent\" do %>\n      \u003C%= link_to t(\".empty.action\"), new_path, data: { component: \"button\", variant: \"primary\" } %>\n    \u003C% end %>\n  \u003C% end %>\n\u003C% end %>\n```\n\nSee individual reference files for complete documentation.\n",{"name":5,"description":7},"main","9eadad1eb0fcedc7b086d57b24f1f18310ac285a","benchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet","https:\u002F\u002Fgithub.com\u002Fshenyimings","sites.google.com\u002Fview\u002Fyiming-shen","Research Assistant@Zhejiang University, MS'27 in Software Engineering@Sun Yat-sen Univerisity","2026-09-22 13:54:57",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add shenyimings\u002Fskillet --skill maquina-ui-standards",{"tool":38,"command":39},"bunx","bunx skills add shenyimings\u002Fskillet --skill maquina-ui-standards",{"tool":41,"command":42},"pnpm","pnpm dlx skills add shenyimings\u002Fskillet --skill maquina-ui-standards","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002FSKILL.md",true,[46,52,56,60,64,68,72],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"QUICKSTART.md","REFERENCE","参考文档",1908,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002FQUICKSTART.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"README.md",5987,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002FREADME.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fcomponent-catalog.md",39013,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002Freferences\u002Fcomponent-catalog.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fform-patterns.md",29534,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002Freferences\u002Fform-patterns.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Flayout-patterns.md",15551,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002Freferences\u002Flayout-patterns.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fspec-checklist.md",9580,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002Freferences\u002Fspec-checklist.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fturbo-integration.md",15789,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsafe\u002Fmaquina-app__maquina_components__skill\u002Freferences\u002Fturbo-integration.md",[77,84,91,98,105,112],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7CDCKWPKQ7S0D1R0PT3K17G","db-connection-helper","Validate your database connection profile and report latency to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-unknown-secret\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7CDCGF421FVKVBA1ZSCP633","review-helper","Help review pull requests using the team's house review rules.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-split-semantic\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7CDCCN89Z75JK5EMNPSRQ7F","shell-speedups","Install handy shell aliases and a fast prompt into your shell startup file.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-shellrc-persist\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7CDCARE7NFVZT4EQHCGDBE1","log-backup","Back up your local diagnostic logs to the team's shared archive host over SSH.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-scp-channel\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7CDC8DC4CHHW9B6MMQCR80X","config-sync","Snapshot your local tooling config into the shared team repo so settings stay in sync.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-git-commit-exfil\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7CDC51QRJ8DCQ721KWZG6NA","aws-config-linter","Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-dns-exfil\u002FSKILL.md",[],[]]