···11+ Apache License
22+ Version 2.0, January 2004
33+ http://www.apache.org/licenses/
44+55+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
66+77+ 1. Definitions.
88+99+ "License" shall mean the terms and conditions for use, reproduction,
1010+ and distribution as defined by Sections 1 through 9 of this document.
1111+1212+ "Licensor" shall mean the copyright owner or entity authorized by
1313+ the copyright owner that is granting the License.
1414+1515+ "Legal Entity" shall mean the union of the acting entity and all
1616+ other entities that control, are controlled by, or are under common
1717+ control with that entity. For the purposes of this definition,
1818+ "control" means (i) the power, direct or indirect, to cause the
1919+ direction or management of such entity, whether by contract or
2020+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
2121+ outstanding shares, or (iii) beneficial ownership of such entity.
2222+2323+ "You" (or "Your") shall mean an individual or Legal Entity
2424+ exercising permissions granted by this License.
2525+2626+ "Source" form shall mean the preferred form for making modifications,
2727+ including but not limited to software source code, documentation
2828+ source, and configuration files.
2929+3030+ "Object" form shall mean any form resulting from mechanical
3131+ transformation or translation of a Source form, including but
3232+ not limited to compiled object code, generated documentation,
3333+ and conversions to other media types.
3434+3535+ "Work" shall mean the work of authorship, whether in Source or
3636+ Object form, made available under the License, as indicated by a
3737+ copyright notice that is included in or attached to the work
3838+ (an example is provided in the Appendix below).
3939+4040+ "Derivative Works" shall mean any work, whether in Source or Object
4141+ form, that is based on (or derived from) the Work and for which the
4242+ editorial revisions, annotations, elaborations, or other modifications
4343+ represent, as a whole, an original work of authorship. For the purposes
4444+ of this License, Derivative Works shall not include works that remain
4545+ separable from, or merely link (or bind by name) to the interfaces of,
4646+ the Work and Derivative Works thereof.
4747+4848+ "Contribution" shall mean any work of authorship, including
4949+ the original version of the Work and any modifications or additions
5050+ to that Work or Derivative Works thereof, that is intentionally
5151+ submitted to Licensor for inclusion in the Work by the copyright owner
5252+ or by an individual or Legal Entity authorized to submit on behalf of
5353+ the copyright owner. For the purposes of this definition, "submitted"
5454+ means any form of electronic, verbal, or written communication sent
5555+ to the Licensor or its representatives, including but not limited to
5656+ communication on electronic mailing lists, source code control systems,
5757+ and issue tracking systems that are managed by, or on behalf of, the
5858+ Licensor for the purpose of discussing and improving the Work, but
5959+ excluding communication that is conspicuously marked or otherwise
6060+ designated in writing by the copyright owner as "Not a Contribution."
6161+6262+ "Contributor" shall mean Licensor and any individual or Legal Entity
6363+ on behalf of whom a Contribution has been received by Licensor and
6464+ subsequently incorporated within the Work.
6565+6666+ 2. Grant of Copyright License. Subject to the terms and conditions of
6767+ this License, each Contributor hereby grants to You a perpetual,
6868+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6969+ copyright license to reproduce, prepare Derivative Works of,
7070+ publicly display, publicly perform, sublicense, and distribute the
7171+ Work and such Derivative Works in Source or Object form.
7272+7373+ 3. Grant of Patent License. Subject to the terms and conditions of
7474+ this License, each Contributor hereby grants to You a perpetual,
7575+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
7676+ (except as stated in this section) patent license to make, have made,
7777+ use, offer to sell, sell, import, and otherwise transfer the Work,
7878+ where such license applies only to those patent claims licensable
7979+ by such Contributor that are necessarily infringed by their
8080+ Contribution(s) alone or by combination of their Contribution(s)
8181+ with the Work to which such Contribution(s) was submitted. If You
8282+ institute patent litigation against any entity (including a
8383+ cross-claim or counterclaim in a lawsuit) alleging that the Work
8484+ or a Contribution incorporated within the Work constitutes direct
8585+ or contributory patent infringement, then any patent licenses
8686+ granted to You under this License for that Work shall terminate
8787+ as of the date such litigation is filed.
8888+8989+ 4. Redistribution. You may reproduce and distribute copies of the
9090+ Work or Derivative Works thereof in any medium, with or without
9191+ modifications, and in Source or Object form, provided that You
9292+ meet the following conditions:
9393+9494+ (a) You must give any other recipients of the Work or
9595+ Derivative Works a copy of this License; and
9696+9797+ (b) You must cause any modified files to carry prominent notices
9898+ stating that You changed the files; and
9999+100100+ (c) You must retain, in the Source form of any Derivative Works
101101+ that You distribute, all copyright, patent, trademark, and
102102+ attribution notices from the Source form of the Work,
103103+ excluding those notices that do not pertain to any part of
104104+ the Derivative Works; and
105105+106106+ (d) If the Work includes a "NOTICE" text file as part of its
107107+ distribution, then any Derivative Works that You distribute must
108108+ include a readable copy of the attribution notices contained
109109+ within such NOTICE file, excluding those notices that do not
110110+ pertain to any part of the Derivative Works, in at least one
111111+ of the following places: within a NOTICE text file distributed
112112+ as part of the Derivative Works; within the Source form or
113113+ documentation, if provided along with the Derivative Works; or,
114114+ within a display generated by the Derivative Works, if and
115115+ wherever such third-party notices normally appear. The contents
116116+ of the NOTICE file are for informational purposes only and
117117+ do not modify the License. You may add Your own attribution
118118+ notices within Derivative Works that You distribute, alongside
119119+ or as an addendum to the NOTICE text from the Work, provided
120120+ that such additional attribution notices cannot be construed
121121+ as modifying the License.
122122+123123+ You may add Your own copyright statement to Your modifications and
124124+ may provide additional or different license terms and conditions
125125+ for use, reproduction, or distribution of Your modifications, or
126126+ for any such Derivative Works as a whole, provided Your use,
127127+ reproduction, and distribution of the Work otherwise complies with
128128+ the conditions stated in this License.
129129+130130+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131131+ any Contribution intentionally submitted for inclusion in the Work
132132+ by You to the Licensor shall be under the terms and conditions of
133133+ this License, without any additional terms or conditions.
134134+ Notwithstanding the above, nothing herein shall supersede or modify
135135+ the terms of any separate license agreement you may have executed
136136+ with Licensor regarding such Contributions.
137137+138138+ 6. Trademarks. This License does not grant permission to use the trade
139139+ names, trademarks, service marks, or product names of the Licensor,
140140+ except as required for reasonable and customary use in describing the
141141+ origin of the Work and reproducing the content of the NOTICE file.
142142+143143+ 7. Disclaimer of Warranty. Unless required by applicable law or
144144+ agreed to in writing, Licensor provides the Work (and each
145145+ Contributor provides its Contributions) on an "AS IS" BASIS,
146146+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147147+ implied, including, without limitation, any warranties or conditions
148148+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149149+ PARTICULAR PURPOSE. You are solely responsible for determining the
150150+ appropriateness of using or redistributing the Work and assume any
151151+ risks associated with Your exercise of permissions under this License.
152152+153153+ 8. Limitation of Liability. In no event and under no legal theory,
154154+ whether in tort (including negligence), contract, or otherwise,
155155+ unless required by applicable law (such as deliberate and grossly
156156+ negligent acts) or agreed to in writing, shall any Contributor be
157157+ liable to You for damages, including any direct, indirect, special,
158158+ incidental, or consequential damages of any character arising as a
159159+ result of this License or out of the use or inability to use the
160160+ Work (including but not limited to damages for loss of goodwill,
161161+ work stoppage, computer failure or malfunction, or any and all
162162+ other commercial damages or losses), even if such Contributor
163163+ has been advised of the possibility of such damages.
164164+165165+ 9. Accepting Warranty or Additional Liability. While redistributing
166166+ the Work or Derivative Works thereof, You may choose to offer,
167167+ and charge a fee for, acceptance of support, warranty, indemnity,
168168+ or other liability obligations and/or rights consistent with this
169169+ License. However, in accepting such obligations, You may act only
170170+ on Your own behalf and on Your sole responsibility, not on behalf
171171+ of any other Contributor, and only if You agree to indemnify,
172172+ defend, and hold each Contributor harmless for any liability
173173+ incurred by, or claims asserted against, such Contributor by reason
174174+ of your accepting any such warranty or additional liability.
175175+176176+ END OF TERMS AND CONDITIONS
177177+178178+ APPENDIX: How to apply the Apache License to your work.
179179+180180+ To apply the Apache License to your work, attach the following
181181+ boilerplate notice, with the fields enclosed by brackets "[]"
182182+ replaced with your own identifying information. (Don't include
183183+ the brackets!) The text should be enclosed in the appropriate
184184+ comment syntax for the file format. We also recommend that a
185185+ file or class name and description of purpose be included on the
186186+ same "printed page" as the copyright notice for easier
187187+ identification within third-party archives.
188188+189189+ Copyright 2026 David Basile Filho
190190+191191+ Licensed under the Apache License, Version 2.0 (the "License");
192192+ you may not use this file except in compliance with the License.
193193+ You may obtain a copy of the License at
194194+195195+ http://www.apache.org/licenses/LICENSE-2.0
196196+197197+ Unless required by applicable law or agreed to in writing, software
198198+ distributed under the License is distributed on an "AS IS" BASIS,
199199+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200+ See the License for the specific language governing permissions and
201201+ limitations under the License.
···11+---
22+name: adapt
33+description: "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility."
44+argument-hint: "[target] [context (mobile, tablet, print...)]"
55+user-invocable: true
66+---
77+88+Adapt existing designs to work effectively across different contexts: different screen sizes, devices, platforms, or use cases.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: target platforms or devices and usage contexts.
1313+1414+---
1515+1616+## Assess Adaptation Challenge
1717+1818+Understand what needs adaptation and why.
1919+2020+### 1. Identify the source context
2121+- What was it designed for originally? (Desktop web? Mobile app?)
2222+- What assumptions were made? (Large screen? Mouse input? Fast connection?)
2323+- What works well in current context?
2424+2525+### 2. Understand target context
2626+- **Device**: Mobile, tablet, desktop, TV, watch, print?
2727+- **Input method**: Touch, mouse, keyboard, voice, gamepad?
2828+- **Screen constraints**: Size, resolution, orientation?
2929+- **Connection**: Fast wifi, slow 3G, offline?
3030+- **Usage context**: On-the-go vs desk, quick glance vs focused reading?
3131+- **User expectations**: What do users expect on this platform?
3232+3333+### 3. Identify adaptation challenges
3434+- What will not fit? (Content, navigation, features)
3535+- What will not work? (Hover states on touch, tiny touch targets)
3636+- What is inappropriate? (Desktop patterns on mobile, mobile patterns on desktop)
3737+3838+**CRITICAL**: Adaptation is not just scaling. It is rethinking the experience for the new context.
3939+4040+## Plan Adaptation Strategy
4141+4242+Create context-appropriate strategy.
4343+4444+### Mobile Adaptation (Desktop to Mobile)
4545+4646+**Layout Strategy**:
4747+- Single column instead of multi-column
4848+- Vertical stacking instead of side-by-side
4949+- Full-width components instead of fixed widths
5050+- Bottom navigation instead of top or side navigation
5151+5252+**Interaction Strategy**:
5353+- Touch targets 44x44px minimum (not hover-dependent)
5454+- Swipe gestures where appropriate (lists, carousels)
5555+- Bottom sheets instead of dropdowns
5656+- Thumbs-first design (controls within thumb reach)
5757+- Larger tap areas with more spacing
5858+5959+**Content Strategy**:
6060+- Progressive disclosure (do not show everything at once)
6161+- Prioritize primary content (secondary content in tabs or accordions)
6262+- Shorter text (more concise)
6363+- Larger text (16px minimum)
6464+6565+**Navigation Strategy**:
6666+- Hamburger menu or bottom navigation
6767+- Reduce navigation complexity
6868+- Sticky headers for context
6969+- Back button in navigation flow
7070+7171+### Tablet Adaptation (Hybrid Approach)
7272+7373+**Layout Strategy**:
7474+- Two-column layouts (not single or three-column)
7575+- Side panels for secondary content
7676+- Master-detail views (list plus detail)
7777+- Adaptive based on orientation (portrait vs landscape)
7878+7979+**Interaction Strategy**:
8080+- Support both touch and pointer
8181+- Touch targets 44x44px but allow denser layouts than phone
8282+- Side navigation drawers
8383+- Multi-column forms where appropriate
8484+8585+### Desktop Adaptation (Mobile to Desktop)
8686+8787+**Layout Strategy**:
8888+- Multi-column layouts (use horizontal space)
8989+- Side navigation always visible
9090+- Multiple information panels simultaneously
9191+- Fixed widths with max-width constraints (do not stretch to 4K)
9292+9393+**Interaction Strategy**:
9494+- Hover states for additional information
9595+- Keyboard shortcuts
9696+- Right-click context menus
9797+- Drag and drop where helpful
9898+- Multi-select with Shift or Cmd
9999+100100+**Content Strategy**:
101101+- Show more information upfront (less progressive disclosure)
102102+- Data tables with many columns
103103+- Richer visualizations
104104+- More detailed descriptions
105105+106106+### Print Adaptation (Screen to Print)
107107+108108+**Layout Strategy**:
109109+- Page breaks at logical points
110110+- Remove navigation, footer, interactive elements
111111+- Black and white (or limited color)
112112+- Proper margins for binding
113113+114114+**Content Strategy**:
115115+- Expand shortened content (show full URLs, hidden sections)
116116+- Add page numbers, headers, footers
117117+- Include metadata (print date, page title)
118118+- Convert charts to print-friendly versions
119119+120120+### Email Adaptation (Web to Email)
121121+122122+**Layout Strategy**:
123123+- Narrow width (600px max)
124124+- Single column only
125125+- Inline CSS (no external stylesheets)
126126+- Table-based layouts (for email client compatibility)
127127+128128+**Interaction Strategy**:
129129+- Large, obvious CTAs (buttons not text links)
130130+- No hover states (not reliable)
131131+- Deep links to web app for complex interactions
132132+133133+## Implement Adaptations
134134+135135+Apply changes systematically.
136136+137137+### Responsive Breakpoints
138138+139139+Choose appropriate breakpoints:
140140+- Mobile: 320px-767px
141141+- Tablet: 768px-1023px
142142+- Desktop: 1024px+
143143+- Or content-driven breakpoints (where design breaks)
144144+145145+### Layout Adaptation Techniques
146146+147147+- **CSS Grid or Flexbox**: Reflow layouts automatically
148148+- **Container Queries**: Adapt based on container, not viewport
149149+- **clamp()**: Fluid sizing between min and max
150150+- **Media queries**: Different styles for different contexts
151151+- **Display properties**: Show or hide elements per context
152152+153153+### Touch Adaptation
154154+155155+- Increase touch target sizes (44x44px minimum)
156156+- Add more spacing between interactive elements
157157+- Remove hover-dependent interactions
158158+- Add touch feedback (ripples, highlights)
159159+- Consider thumb zones (easier to reach bottom than top)
160160+161161+### Content Adaptation
162162+163163+- Use display: none sparingly (still downloads)
164164+- Progressive enhancement (core content first, enhancements on larger screens)
165165+- Lazy loading for off-screen content
166166+- Responsive images (srcset, picture element)
167167+168168+### Navigation Adaptation
169169+170170+- Transform complex nav to hamburger or drawer on mobile
171171+- Bottom nav bar for mobile apps
172172+- Persistent side navigation on desktop
173173+- Breadcrumbs on smaller screens for context
174174+175175+**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect.
176176+177177+**NEVER**:
178178+- Hide core functionality on mobile (if it matters, make it work)
179179+- Assume desktop equals powerful device (consider accessibility, older machines)
180180+- Use different information architecture across contexts (confusing)
181181+- Break user expectations for platform (mobile users expect mobile patterns)
182182+- Forget landscape orientation on mobile or tablet
183183+- Use generic breakpoints blindly (use content-driven breakpoints)
184184+- Ignore touch on desktop (many desktop devices have touch)
185185+186186+## Verify Adaptations
187187+188188+Test thoroughly across contexts.
189189+190190+- **Real devices**: Test on actual phones, tablets, desktops
191191+- **Different orientations**: Portrait and landscape
192192+- **Different browsers**: Safari, Chrome, Firefox, Edge
193193+- **Different OS**: iOS, Android, Windows, macOS
194194+- **Different input methods**: Touch, mouse, keyboard
195195+- **Edge cases**: Very small screens (320px), very large screens (4K)
196196+- **Slow connections**: Test on throttled network
197197+198198+Remember: You are a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly.
+174
skills/animate/SKILL.md
···11+---
22+name: animate
33+description: "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: performance constraints.
1313+1414+---
1515+1616+## Assess Animation Opportunities
1717+1818+Analyze where motion would improve the experience.
1919+2020+### 1. Identify static areas
2121+- **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
2222+- **Jarring transitions**: Instant state changes that feel abrupt (show or hide, page loads, route changes)
2323+- **Unclear relationships**: Spatial or hierarchical relationships that are not obvious
2424+- **Lack of delight**: Functional but joyless interactions
2525+- **Missed guidance**: Opportunities to direct attention or explain behavior
2626+2727+### 2. Understand the context
2828+- What is the personality? (Playful vs serious, energetic vs calm)
2929+- What is the performance budget? (Mobile-first? Complex page?)
3030+- Who is the audience? (Motion-sensitive users? Power users who want speed?)
3131+- What matters most? (One hero animation vs many micro-interactions?)
3232+3333+If any of these are unclear from the codebase, {{ask_instruction}}
3434+3535+**CRITICAL**: Respect prefers-reduced-motion. Always provide non-animated alternatives for users who need them.
3636+3737+## Plan Animation Strategy
3838+3939+Create a purposeful animation plan.
4040+4141+- **Hero moment**: What is the ONE signature animation? (Page load? Hero section? Key interaction?)
4242+- **Feedback layer**: Which interactions need acknowledgment?
4343+- **Transition layer**: Which state changes need smoothing?
4444+- **Delight layer**: Where can we surprise and delight?
4545+4646+**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
4747+4848+## Implement Animations
4949+5050+Add motion systematically across these categories.
5151+5252+### Entrance Animations
5353+- **Page load choreography**: Stagger element reveals (100-150ms delays), fade and slide combinations
5454+- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
5555+- **Content reveals**: Scroll-triggered animations using intersection observer
5656+- **Modal or drawer entry**: Smooth slide and fade, backdrop fade, focus management
5757+5858+### Micro-interactions
5959+- **Button feedback**:
6060+ - Hover: Subtle scale (1.02-1.05), color shift, shadow increase
6161+ - Click: Quick scale down then up (0.95 to 1), ripple effect
6262+ - Loading: Spinner or pulse state
6363+- **Form interactions**:
6464+ - Input focus: Border color transition, slight scale or glow
6565+ - Validation: Shake on error, check mark on success, smooth color transitions
6666+- **Toggle switches**: Smooth slide and color transition (200-300ms)
6767+- **Checkboxes or radio**: Check mark animation, ripple effect
6868+- **Like or favorite**: Scale and rotation, particle effects, color transition
6969+7070+### State Transitions
7171+- **Show or hide**: Fade and slide (not instant), appropriate timing (200-300ms)
7272+- **Expand or collapse**: Height transition with overflow handling, icon rotation
7373+- **Loading states**: Skeleton screen fades, spinner animations, progress bars
7474+- **Success or error**: Color transitions, icon animations, gentle scale pulse
7575+- **Enable or disable**: Opacity transitions, cursor changes
7676+7777+### Navigation and Flow
7878+- **Page transitions**: Crossfade between routes, shared element transitions
7979+- **Tab switching**: Slide indicator, content fade or slide
8080+- **Carousel or slider**: Smooth transforms, snap points, momentum
8181+- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
8282+8383+### Feedback and Guidance
8484+- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
8585+- **Drag and drop**: Lift effect (shadow and scale), drop zone highlights, smooth repositioning
8686+- **Copy or paste**: Brief highlight flash on paste, "copied" confirmation
8787+- **Focus flow**: Highlight path through form or workflow
8888+8989+### Delight Moments
9090+- **Empty states**: Subtle floating animations on illustrations
9191+- **Completed actions**: Confetti, check mark flourish, success celebrations
9292+- **Easter eggs**: Hidden interactions for discovery
9393+- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
9494+9595+## Technical Implementation
9696+9797+Use appropriate techniques for each animation.
9898+9999+### Timing and Easing
100100+101101+**Durations by purpose:**
102102+- **100-150ms**: Instant feedback (button press, toggle)
103103+- **200-300ms**: State changes (hover, menu open)
104104+- **300-500ms**: Layout changes (accordion, modal)
105105+- **500-800ms**: Entrance animations (page load)
106106+107107+**Easing curves (use these, not CSS defaults):**
108108+```css
109109+/* Recommended - natural deceleration */
110110+--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
111111+--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
112112+--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
113113+114114+/* AVOID - feel dated and tacky */
115115+/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
116116+/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
117117+```
118118+119119+**Exit animations are faster than entrances.** Use approximately 75% of enter duration.
120120+121121+### CSS Animations
122122+```css
123123+/* Prefer for simple, declarative animations */
124124+- transitions for state changes
125125+- @keyframes for complex sequences
126126+- transform and opacity only (GPU-accelerated)
127127+```
128128+129129+### JavaScript Animation
130130+```javascript
131131+/* Use for complex, interactive animations */
132132+- Web Animations API for programmatic control
133133+- Framer Motion for React
134134+- GSAP for complex sequences
135135+```
136136+137137+### Performance
138138+- **GPU acceleration**: Use transform and opacity, avoid layout properties
139139+- **will-change**: Add sparingly for known expensive animations
140140+- **Reduce paint**: Minimize repaints, use contain where appropriate
141141+- **Monitor FPS**: Ensure 60fps on target devices
142142+143143+### Accessibility
144144+```css
145145+@media (prefers-reduced-motion: reduce) {
146146+ * {
147147+ animation-duration: 0.01ms !important;
148148+ animation-iteration-count: 1 !important;
149149+ transition-duration: 0.01ms !important;
150150+ }
151151+}
152152+```
153153+154154+**NEVER**:
155155+- Use bounce or elastic easing curves. They feel dated and draw attention to the animation itself.
156156+- Animate layout properties (width, height, top, left). Use transform instead.
157157+- Use durations over 500ms for feedback. It feels laggy.
158158+- Animate without purpose. Every animation needs a reason.
159159+- Ignore prefers-reduced-motion. This is an accessibility violation.
160160+- Animate everything. Animation fatigue makes interfaces feel exhausting.
161161+- Block interaction during animations unless intentional.
162162+163163+## Verify Quality
164164+165165+Test animations thoroughly.
166166+167167+- **Smooth at 60fps**: No jank on target devices
168168+- **Feels natural**: Easing curves feel organic, not robotic
169169+- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
170170+- **Reduced motion works**: Animations disabled or simplified appropriately
171171+- **Does not block**: Users can interact during or after animations
172172+- **Adds value**: Makes interface clearer or more delightful
173173+174174+Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible. It just makes everything feel right.
+124
skills/arrange/SKILL.md
···11+---
22+name: arrange
33+description: "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak. Turn generic arrangements into intentional, rhythmic compositions.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Assess Current Layout
1717+1818+Analyze what is weak about the current spatial design.
1919+2020+### 1. Spacing
2121+- Is spacing consistent or arbitrary? (Random padding or margin values)
2222+- Is all spacing the same? (Equal padding everywhere equals no rhythm)
2323+- Are related elements grouped tightly, with generous space between groups?
2424+2525+### 2. Visual hierarchy
2626+- Apply the squint test: blur your (metaphorical) eyes. Can you still identify the most important element, second most important, and clear groupings?
2727+- Is hierarchy achieved effectively? (Space and weight alone can be enough. But is the current approach working?)
2828+- Does whitespace guide the eye to what matters?
2929+3030+### 3. Grid and structure
3131+- Is there a clear underlying structure, or does the layout feel random?
3232+- Are identical card grids used everywhere? (Icon plus heading plus text, repeated endlessly)
3333+- Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
3434+3535+### 4. Rhythm and variety
3636+- Does the layout have visual rhythm? (Alternating tight or generous spacing)
3737+- Is every section structured the same way? (Monotonous repetition)
3838+- Are there intentional moments of surprise or emphasis?
3939+4040+### 5. Density
4141+- Is the layout too cramped? (Not enough breathing room)
4242+- Is the layout too sparse? (Excessive whitespace without purpose)
4343+- Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
4444+4545+**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material. Use it with intention.
4646+4747+## Plan Layout Improvements
4848+4949+Consult the [spatial design reference](reference/spatial-design.md) from the frontend-design skill for detailed guidance on grids, rhythm, and container queries.
5050+5151+Create a systematic plan.
5252+5353+- **Spacing system**: Use a consistent scale. Whether that is a framework built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency.
5454+- **Hierarchy strategy**: How will space communicate importance?
5555+- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
5656+- **Rhythm**: Where should spacing be tight vs generous?
5757+5858+## Improve Layout Systematically
5959+6060+### Establish a Spacing System
6161+6262+- Use a consistent spacing scale. Framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers.
6363+- Name tokens semantically if using custom properties: --space-xs through --space-xl, not --spacing-8
6464+- Use gap for sibling spacing instead of margins. Eliminates margin collapse hacks.
6565+- Apply clamp() for fluid spacing that breathes on larger screens.
6666+6767+### Create Visual Rhythm
6868+6969+- **Tight grouping** for related elements (8-12px between siblings)
7070+- **Generous separation** between distinct sections (48-96px)
7171+- **Varied spacing** within sections. Not every row needs the same gap.
7272+- **Asymmetric compositions**. Break the predictable centered-content pattern when it makes sense.
7373+7474+### Choose the Right Layout Tool
7575+7676+- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks.
7777+- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
7878+- **Do not default to Grid** when Flexbox with flex-wrap would be simpler and more flexible.
7979+- Use repeat(auto-fit, minmax(280px, 1fr)) for responsive grids without breakpoints.
8080+- Use named grid areas (grid-template-areas) for complex page layouts. Redefine at breakpoints.
8181+8282+### Break Card Grid Monotony
8383+8484+- Do not default to card grids for everything. Spacing and alignment create visual grouping naturally.
8585+- Use cards only when content is truly distinct and actionable. Never nest cards inside cards.
8686+- Vary card sizes, span columns, or mix cards with non-card content to break repetition.
8787+8888+### Strengthen Visual Hierarchy
8989+9090+- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough. Generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means are not sufficient.
9191+- Be aware of reading flow. In LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
9292+- Create clear content groupings through proximity and separation.
9393+9494+### Manage Depth and Elevation
9595+9696+- Create a semantic z-index scale (dropdown, sticky, modal-backdrop, modal, toast, tooltip)
9797+- Build a consistent shadow scale (sm, md, lg, xl). Shadows should be subtle.
9898+- Use elevation to reinforce hierarchy, not as decoration.
9999+100100+### Optical Adjustments
101101+102102+- If an icon looks visually off-center despite being geometrically centered, nudge it. But only if you are confident it actually looks wrong. Do not adjust speculatively.
103103+104104+**NEVER**:
105105+- Use arbitrary spacing values outside your scale
106106+- Make all spacing equal. Variety creates hierarchy.
107107+- Wrap everything in cards. Not everything needs a container.
108108+- Nest cards inside cards. Use spacing and dividers for hierarchy within.
109109+- Use identical card grids everywhere (icon plus heading plus text, repeated)
110110+- Center everything. Left-aligned with asymmetry feels more designed.
111111+- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work. But it should display actual data, not decorative numbers.
112112+- Default to CSS Grid when Flexbox would be simpler. Use the simplest tool for the job.
113113+- Use arbitrary z-index values (999, 9999). Build a semantic scale.
114114+115115+## Verify Layout Improvements
116116+117117+- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
118118+- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
119119+- **Hierarchy**: Is the most important content obvious within 2 seconds?
120120+- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
121121+- **Consistency**: Is the spacing system applied uniformly?
122122+- **Responsiveness**: Does the layout adapt gracefully across screen sizes?
123123+124124+Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional.
+147
skills/audit/SKILL.md
···11+---
22+name: audit
33+description: "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review."
44+argument-hint: "[area (feature, page, component...)]"
55+user-invocable: true
66+---
77+88+## MANDATORY PREPARATION
99+1010+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1111+1212+---
1313+1414+Run systematic technical quality checks and generate a comprehensive report. Do not fix issues. Document them for other commands to address.
1515+1616+This is a code-level audit, not a design critique. Check what is measurable and verifiable in the implementation.
1717+1818+## Diagnostic Scan
1919+2020+Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below.
2121+2222+### 1. Accessibility (A11y)
2323+2424+**Check for**:
2525+- **Contrast issues**: Text contrast ratios less than 4.5:1 (or 7:1 for AAA)
2626+- **Missing ARIA**: Interactive elements without proper roles, labels, or states
2727+- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps
2828+- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons
2929+- **Alt text**: Missing or poor image descriptions
3030+- **Form issues**: Inputs without labels, poor error messaging, missing required indicators
3131+3232+**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA)
3333+3434+### 2. Performance
3535+3636+**Check for**:
3737+- **Layout thrashing**: Reading or writing layout properties in loops
3838+- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform or opacity
3939+- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
4040+- **Bundle size**: Unnecessary imports, unused dependencies
4141+- **Render performance**: Unnecessary re-renders, missing memoization
4242+4343+**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized)
4444+4545+### 3. Theming
4646+4747+**Check for**:
4848+- **Hard-coded colors**: Colors not using design tokens
4949+- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme
5050+- **Inconsistent tokens**: Using wrong tokens, mixing token types
5151+- **Theme switching issues**: Values that do not update on theme change
5252+5353+**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly)
5454+5555+### 4. Responsive Design
5656+5757+**Check for**:
5858+- **Fixed widths**: Hard-coded widths that break on mobile
5959+- **Touch targets**: Interactive elements less than 44x44px
6060+- **Horizontal scroll**: Content overflow on narrow viewports
6161+- **Text scaling**: Layouts that break when text size increases
6262+- **Missing breakpoints**: No mobile or tablet variants
6363+6464+**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets)
6565+6666+### 5. Anti-Patterns (CRITICAL)
6767+6868+Check against ALL the DO NOT guidelines in the frontend-design skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy).
6969+7070+**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design)
7171+7272+## Generate Report
7373+7474+### Audit Health Score
7575+7676+| # | Dimension | Score | Key Finding |
7777+|---|-----------|-------|-------------|
7878+| 1 | Accessibility | ? | [most critical a11y issue or "--"] |
7979+| 2 | Performance | ? | |
8080+| 3 | Responsive Design | ? | |
8181+| 4 | Theming | ? | |
8282+| 5 | Anti-Patterns | ? | |
8383+| **Total** | | **??/20** | **[Rating band]** |
8484+8585+**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues)
8686+8787+### Anti-Patterns Verdict
8888+**Start here.** Pass or fail: Does this look AI-generated? List specific tells. Be brutally honest.
8989+9090+### Executive Summary
9191+- Audit Health Score: ??/20 (rating band)
9292+- Total issues found (count by severity: P0/P1/P2/P3)
9393+- Top 3-5 critical issues
9494+- Recommended next steps
9595+9696+### Detailed Findings by Severity
9797+9898+Tag every issue with P0-P3 severity:
9999+- **P0 Blocking**: Prevents task completion. Fix immediately.
100100+- **P1 Major**: Significant difficulty or WCAG AA violation. Fix before release.
101101+- **P2 Minor**: Annoyance, workaround exists. Fix in next pass.
102102+- **P3 Polish**: Nice-to-fix, no real user impact. Fix if time permits.
103103+104104+For each issue, document:
105105+- **[P?] Issue name**
106106+- **Location**: Component, file, line
107107+- **Category**: Accessibility, Performance, Theming, Responsive, or Anti-Pattern
108108+- **Impact**: How it affects users
109109+- **WCAG or Standard**: Which standard it violates (if applicable)
110110+- **Recommendation**: How to fix it
111111+- **Suggested command**: Which command to use (prefer: {{available_commands}})
112112+113113+### Patterns and Systemic Issues
114114+115115+Identify recurring problems that indicate systemic gaps rather than one-off mistakes:
116116+- "Hard-coded colors appear in 15+ components, should use design tokens"
117117+- "Touch targets consistently too small (less than 44px) throughout mobile experience"
118118+119119+### Positive Findings
120120+121121+Note what is working well. Good practices to maintain and replicate.
122122+123123+## Recommended Actions
124124+125125+List recommended commands in priority order (P0 first, then P1, then P2):
126126+127127+1. **[P?] `{{command_prefix}}command-name`**: Brief description (specific context from audit findings)
128128+2. **[P?] `{{command_prefix}}command-name`**: Brief description (specific context)
129129+130130+**Rules**: Only recommend commands from: {{available_commands}}. Map findings to the most appropriate command. End with {{command_prefix}}polish as the final step if any fixes were recommended.
131131+132132+After presenting the summary, tell the user:
133133+134134+> You can ask me to run these one at a time, all at once, or in any order you prefer.
135135+>
136136+> Re-run {{command_prefix}}audit after fixes to see your score improve.
137137+138138+**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters.
139139+140140+**NEVER**:
141141+- Report issues without explaining impact (why does this matter?)
142142+- Provide generic recommendations (be specific and actionable)
143143+- Skip positive findings (celebrate what works)
144144+- Forget to prioritize (everything cannot be P0)
145145+- Report false positives without verification
146146+147147+Remember: You are a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement.
+116
skills/bolder/SKILL.md
···11+---
22+name: bolder
33+description: "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Assess Current State
1717+1818+Analyze what makes the design feel too safe or boring.
1919+2020+### 1. Identify weakness sources
2121+- **Generic choices**: System fonts, basic colors, standard layouts
2222+- **Timid scale**: Everything is medium-sized with no drama
2323+- **Low contrast**: Everything has similar visual weight
2424+- **Static**: No motion, no energy, no life
2525+- **Predictable**: Standard patterns with no surprises
2626+- **Flat hierarchy**: Nothing stands out or commands attention
2727+2828+### 2. Understand the context
2929+- What is the brand personality? (How far can we push?)
3030+- What is the purpose? (Marketing can be bolder than financial dashboards)
3131+- Who is the audience? (What will resonate?)
3232+- What are the constraints? (Brand guidelines, accessibility, performance)
3333+3434+If any of these are unclear from the codebase, {{ask_instruction}}
3535+3636+**CRITICAL**: "Bolder" does not mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
3737+3838+**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan or purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They are generic. Review ALL the DO NOT guidelines in the frontend-design skill before proceeding. Bold means distinctive, not "more effects."
3939+4040+## Plan Amplification
4141+4242+Create a strategy to increase impact while maintaining coherence.
4343+4444+- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing)
4545+- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane.
4646+- **Risk budget**: How experimental can we be? Push boundaries within constraints.
4747+- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast)
4848+4949+**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration.
5050+5151+## Amplify the Design
5252+5353+Systematically increase impact across these dimensions.
5454+5555+### Typography Amplification
5656+- **Replace generic fonts**: Swap system fonts for distinctive choices (see frontend-design skill for inspiration)
5757+- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
5858+- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
5959+- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed or extended widths, monospace as intentional accent (not as lazy "dev tool" default)
6060+6161+### Color Intensification
6262+- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon)
6363+- **Bold palette**: Introduce unexpected color combinations. Avoid the purple-blue gradient AI slop.
6464+- **Dominant color strategy**: Let one bold color own 60% of the design
6565+- **Sharp accents**: High-contrast accent colors that pop
6666+- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette
6767+- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue)
6868+6969+### Spatial Drama
7070+- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings
7171+- **Break the grid**: Let hero elements escape containers and cross boundaries
7272+- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry
7373+- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px)
7474+- **Overlap**: Layer elements intentionally for depth
7575+7676+### Visual Effects
7777+- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles)
7878+- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue)
7979+- **Texture and depth**: Grain, halftone, duotone, layered elements. NOT glassmorphism (it is overused AI slop).
8080+- **Borders and frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side)
8181+- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
8282+8383+### Motion and Animation
8484+- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays
8585+- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences
8686+- **Micro-interactions**: Satisfying hover effects, click feedback, state changes
8787+- **Transitions**: Smooth, noticeable transitions using ease-out-quart, quint, or expo (not bounce or elastic. They cheapen the effect.)
8888+8989+### Composition Boldness
9090+- **Hero moments**: Create clear focal points with dramatic treatment
9191+- **Diagonal flows**: Escape horizontal or vertical rigidity with diagonal arrangements
9292+- **Full-bleed elements**: Use full viewport width or height for impact
9393+- **Unexpected proportions**: Golden ratio? Throw it out. Try 70-30, 80-20 splits.
9494+9595+**NEVER**:
9696+- Add effects randomly without purpose (chaos does not equal bold)
9797+- Sacrifice readability for aesthetics (body text must be readable)
9898+- Make everything bold (then nothing is bold. Need contrast.)
9999+- Ignore accessibility (bold design must still meet WCAG standards)
100100+- Overwhelm with motion (animation fatigue is real)
101101+- Copy trendy aesthetics blindly (bold means distinctive, not derivative)
102102+103103+## Verify Quality
104104+105105+Ensure amplification maintains usability and coherence.
106106+107107+- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over.
108108+- **Still functional**: Can users accomplish tasks without distraction?
109109+- **Coherent**: Does everything feel intentional and unified?
110110+- **Memorable**: Will users remember this experience?
111111+- **Performant**: Do all these effects run smoothly?
112112+- **Accessible**: Does it still meet accessibility standards?
113113+114114+**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you have failed. Bold means distinctive, not "more AI effects."
115115+116116+Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable.
+182
skills/clarify/SKILL.md
···11+---
22+name: clarify
33+description: "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: audience technical level and users mental state in context.
1313+1414+---
1515+1616+## Assess Current Copy
1717+1818+Identify what makes the text unclear or ineffective.
1919+2020+### 1. Find clarity problems
2121+- **Jargon**: Technical terms users will not understand
2222+- **Ambiguity**: Multiple interpretations possible
2323+- **Passive voice**: "Your file has been uploaded" vs "We uploaded your file"
2424+- **Length**: Too wordy or too terse
2525+- **Assumptions**: Assuming user knowledge they do not have
2626+- **Missing context**: Users do not know what to do or why
2727+- **Tone mismatch**: Too formal, too casual, or inappropriate for situation
2828+2929+### 2. Understand the context
3030+- Who is the audience? (Technical? General? First-time users?)
3131+- What is the user mental state? (Stressed during error? Confident during success?)
3232+- What is the action? (What do we want users to do?)
3333+- What is the constraint? (Character limits? Space limitations?)
3434+3535+**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets.
3636+3737+## Plan Copy Improvements
3838+3939+Create a strategy for clearer communication.
4040+4141+- **Primary message**: What is the ONE thing users need to know?
4242+- **Action needed**: What should users do next (if anything)?
4343+- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?)
4444+- **Constraints**: Length limits, brand voice, localization considerations
4545+4646+**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words.
4747+4848+## Improve Copy Systematically
4949+5050+Refine text across these common areas.
5151+5252+### Error Messages
5353+**Bad**: "Error 403: Forbidden"
5454+**Good**: "You do not have permission to view this page. Contact your admin for access."
5555+5656+**Bad**: "Invalid input"
5757+**Good**: "Email addresses need an @ symbol. Try: name@example.com"
5858+5959+**Principles**:
6060+- Explain what went wrong in plain language
6161+- Suggest how to fix it
6262+- Do not blame the user
6363+- Include examples when helpful
6464+- Link to help or support if applicable
6565+6666+### Form Labels and Instructions
6767+**Bad**: "DOB (MM/DD/YYYY)"
6868+**Good**: "Date of birth" (with placeholder showing format)
6969+7070+**Bad**: "Enter value here"
7171+**Good**: "Your email address" or "Company name"
7272+7373+**Principles**:
7474+- Use clear, specific labels (not generic placeholders)
7575+- Show format expectations with examples
7676+- Explain why you are asking (when not obvious)
7777+- Put instructions before the field, not after
7878+- Keep required field indicators clear
7979+8080+### Button and CTA Text
8181+**Bad**: "Click here" | "Submit" | "OK"
8282+**Good**: "Create account" | "Save changes" | "Got it, thanks"
8383+8484+**Principles**:
8585+- Describe the action specifically
8686+- Use active voice (verb plus noun)
8787+- Match user mental model
8888+- Be specific ("Save" is better than "OK")
8989+9090+### Help Text and Tooltips
9191+**Bad**: "This is the username field"
9292+**Good**: "Choose a username. You can change this later in Settings."
9393+9494+**Principles**:
9595+- Add value (do not just repeat the label)
9696+- Answer the implicit question ("What is this?" or "Why do you need this?")
9797+- Keep it brief but complete
9898+- Link to detailed docs if needed
9999+100100+### Empty States
101101+**Bad**: "No items"
102102+**Good**: "No projects yet. Create your first project to get started."
103103+104104+**Principles**:
105105+- Explain why it is empty (if not obvious)
106106+- Show next action clearly
107107+- Make it welcoming, not dead-end
108108+109109+### Success Messages
110110+**Bad**: "Success"
111111+**Good**: "Settings saved! Your changes will take effect immediately."
112112+113113+**Principles**:
114114+- Confirm what happened
115115+- Explain what happens next (if relevant)
116116+- Be brief but complete
117117+- Match user emotional moment (celebrate big wins)
118118+119119+### Loading States
120120+**Bad**: "Loading..." (for 30+ seconds)
121121+**Good**: "Analyzing your data... this usually takes 30-60 seconds"
122122+123123+**Principles**:
124124+- Set expectations (how long?)
125125+- Explain what is happening (when it is not obvious)
126126+- Show progress when possible
127127+- Offer escape hatch if appropriate ("Cancel")
128128+129129+### Confirmation Dialogs
130130+**Bad**: "Are you sure?"
131131+**Good**: "Delete 'Project Alpha'? This cannot be undone."
132132+133133+**Principles**:
134134+- State the specific action
135135+- Explain consequences (especially for destructive actions)
136136+- Use clear button labels ("Delete project" not "Yes")
137137+- Do not overuse confirmations (only for risky actions)
138138+139139+### Navigation and Wayfinding
140140+**Bad**: Generic labels like "Items" | "Things" | "Stuff"
141141+**Good**: Specific labels like "Your projects" | "Team members" | "Settings"
142142+143143+**Principles**:
144144+- Be specific and descriptive
145145+- Use language users understand (not internal jargon)
146146+- Make hierarchy clear
147147+- Consider information scent (breadcrumbs, current location)
148148+149149+## Apply Clarity Principles
150150+151151+Every piece of copy should follow these rules:
152152+153153+1. **Be specific**: "Enter email" not "Enter value"
154154+2. **Be concise**: Cut unnecessary words (but do not sacrifice clarity)
155155+3. **Be active**: "Save changes" not "Changes will be saved"
156156+4. **Be human**: "Oops, something went wrong" not "System error encountered"
157157+5. **Be helpful**: Tell users what to do, not just what happened
158158+6. **Be consistent**: Use same terms throughout (do not vary for variety)
159159+160160+**NEVER**:
161161+- Use jargon without explanation
162162+- Blame users ("You made an error" becomes "This field is required")
163163+- Be vague ("Something went wrong" without explanation)
164164+- Use passive voice unnecessarily
165165+- Write overly long explanations (be concise)
166166+- Use humor for errors (be empathetic instead)
167167+- Assume technical knowledge
168168+- Vary terminology (pick one term and stick with it)
169169+- Repeat information (headers restating intros, redundant explanations)
170170+- Use placeholders as the only labels (they disappear when users type)
171171+172172+## Verify Improvements
173173+174174+Test that copy improvements work.
175175+176176+- **Comprehension**: Can users understand without context?
177177+- **Actionability**: Do users know what to do next?
178178+- **Brevity**: Is it as short as possible while remaining clear?
179179+- **Consistency**: Does it match terminology elsewhere?
180180+- **Tone**: Is it appropriate for the situation?
181181+182182+Remember: You are a clarity expert with excellent communication skills. Write like you are explaining to a smart friend who is unfamiliar with the product. Be clear, be helpful, be human.
+142
skills/colorize/SKILL.md
···11+---
22+name: colorize
33+description: "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: existing brand colors.
1313+1414+---
1515+1616+## Assess Color Opportunity
1717+1818+Analyze the current state and identify opportunities.
1919+2020+### 1. Understand current state
2121+- **Color absence**: Pure grayscale? Limited neutrals? One timid accent?
2222+- **Missed opportunities**: Where could color add meaning, hierarchy, or delight?
2323+- **Context**: What is appropriate for this domain and audience?
2424+- **Brand**: Are there existing brand colors we should use?
2525+2626+### 2. Identify where color adds value
2727+- **Semantic meaning**: Success (green), error (red), warning (yellow or orange), info (blue)
2828+- **Hierarchy**: Drawing attention to important elements
2929+- **Categorization**: Different sections, types, or states
3030+- **Emotional tone**: Warmth, energy, trust, creativity
3131+- **Wayfinding**: Helping users navigate and understand structure
3232+- **Delight**: Moments of visual interest and personality
3333+3434+If any of these are unclear from the codebase, {{ask_instruction}}
3535+3636+**CRITICAL**: More color does not equal better. Strategic color beats rainbow vomit every time. Every color should have a purpose.
3737+3838+## Plan Color Strategy
3939+4040+Create a purposeful color introduction plan.
4141+4242+- **Color palette**: What colors match the brand or context? (Choose 2-4 colors max beyond neutrals)
4343+- **Dominant color**: Which color owns 60% of colored elements?
4444+- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%)
4545+- **Application strategy**: Where does each color appear and why?
4646+4747+**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more.
4848+4949+## Introduce Color Strategically
5050+5151+Add color systematically across these dimensions.
5252+5353+### Semantic Color
5454+- **State indicators**:
5555+ - Success: Green tones (emerald, forest, mint)
5656+ - Error: Red or pink tones (rose, crimson, coral)
5757+ - Warning: Orange or amber tones
5858+ - Info: Blue tones (sky, ocean, indigo)
5959+ - Neutral: Gray or slate for inactive states
6060+6161+- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.)
6262+- **Progress indicators**: Colored bars, rings, or charts showing completion or health
6363+6464+### Accent Color Application
6565+- **Primary actions**: Color the most important buttons or CTAs
6666+- **Links**: Add color to clickable text (maintain accessibility)
6767+- **Icons**: Colorize key icons for recognition and personality
6868+- **Headers or titles**: Add color to section headers or key labels
6969+- **Hover states**: Introduce color on interaction
7070+7171+### Background and Surfaces
7272+- **Tinted backgrounds**: Replace pure gray (#f5f5f5) with warm neutrals (oklch(97% 0.01 60)) or cool tints (oklch(97% 0.01 250))
7373+- **Colored sections**: Use subtle background colors to separate areas
7474+- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue)
7575+- **Cards and surfaces**: Tint cards or surfaces slightly for warmth
7676+7777+**Use OKLCH for color**: It is perceptually uniform, meaning equal steps in lightness look equal. Great for generating harmonious scales.
7878+7979+### Data Visualization
8080+- **Charts and graphs**: Use color to encode categories or values
8181+- **Heatmaps**: Color intensity shows density or importance
8282+- **Comparison**: Color coding for different datasets or timeframes
8383+8484+### Borders and Accents
8585+- **Accent borders**: Add colored left or top borders to cards or sections
8686+- **Underlines**: Color underlines for emphasis or active states
8787+- **Dividers**: Subtle colored dividers instead of gray lines
8888+- **Focus rings**: Colored focus indicators matching brand
8989+9090+### Typography Color
9191+- **Colored headings**: Use brand colors for section headings (maintain contrast)
9292+- **Highlight text**: Color for emphasis or categories
9393+- **Labels and tags**: Small colored labels for metadata or categories
9494+9595+### Decorative Elements
9696+- **Illustrations**: Add colored illustrations or icons
9797+- **Shapes**: Geometric shapes in brand colors as background elements
9898+- **Gradients**: Colorful gradient overlays or mesh backgrounds
9999+- **Blobs or organic shapes**: Soft colored shapes for visual interest
100100+101101+## Balance and Refinement
102102+103103+Ensure color addition improves rather than overwhelms.
104104+105105+### Maintain Hierarchy
106106+- **Dominant color** (60%): Primary brand color or most used accent
107107+- **Secondary color** (30%): Supporting color for variety
108108+- **Accent color** (10%): High contrast for key moments
109109+- **Neutrals** (remaining): Gray, black, white for structure
110110+111111+### Accessibility
112112+- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components)
113113+- **Do not rely on color alone**: Use icons, labels, or patterns alongside color
114114+- **Test for color blindness**: Verify red and green combinations work for all users
115115+116116+### Cohesion
117117+- **Consistent palette**: Use colors from defined palette, not arbitrary choices
118118+- **Systematic application**: Same color meanings throughout (green always equals success)
119119+- **Temperature consistency**: Warm palette stays warm, cool stays cool
120120+121121+**NEVER**:
122122+- Use every color in the rainbow (choose 2-4 colors beyond neutrals)
123123+- Apply color randomly without semantic meaning
124124+- Put gray text on colored backgrounds. It looks washed out. Use a darker shade of the background color or transparency instead.
125125+- Use pure gray for neutrals. Add subtle color tint (warm or cool) for sophistication.
126126+- Use pure black (#000) or pure white (#fff) for large areas.
127127+- Violate WCAG contrast requirements
128128+- Use color as the only indicator (accessibility issue)
129129+- Make everything colorful (defeats the purpose)
130130+- Default to purple-blue gradients (AI slop aesthetic)
131131+132132+## Verify Color Addition
133133+134134+Test that colorization improves the experience.
135135+136136+- **Better hierarchy**: Does color guide attention appropriately?
137137+- **Clearer meaning**: Does color help users understand states or categories?
138138+- **More engaging**: Does the interface feel warmer and more inviting?
139139+- **Still accessible**: Do all color combinations meet WCAG standards?
140140+- **Not overwhelming**: Is color balanced and purposeful?
141141+142142+Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional.
+201
skills/critique/SKILL.md
···11+---
22+name: critique
33+description: "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component."
44+argument-hint: "[area (feature, page, component...)]"
55+user-invocable: true
66+---
77+88+## MANDATORY PREPARATION
99+1010+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: what the interface is trying to accomplish.
1111+1212+---
1313+1414+Conduct a holistic design critique, evaluating whether the interface actually works: not just technically, but as a designed experience. Think like a design director giving feedback.
1515+1616+## Phase 1: Design Critique
1717+1818+Evaluate the interface across these dimensions.
1919+2020+### 1. AI Slop Detection (CRITICAL)
2121+2222+**This is the most important check.** Does this look like every other AI-generated interface from 2024-2025?
2323+2424+Review the design against ALL the DO NOT guidelines in the frontend-design skill. They are the fingerprints of AI-generated work. Check for the AI color palette, gradient text, dark mode with glowing accents, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells.
2525+2626+**The test**: If you showed this to someone and said "AI made this," would they believe you immediately? If yes, that is the problem.
2727+2828+### 2. Visual Hierarchy
2929+- Does the eye flow to the most important element first?
3030+- Is there a clear primary action? Can you spot it in 2 seconds?
3131+- Do size, color, and position communicate importance correctly?
3232+- Is there visual competition between elements that should have different weights?
3333+3434+### 3. Information Architecture and Cognitive Load
3535+> *Consult [cognitive-load](reference/cognitive-load.md) for the working memory rule and 8-item checklist*
3636+- Is the structure intuitive? Would a new user understand the organization?
3737+- Is related content grouped logically?
3838+- Are there too many choices at once? Count visible options at each decision point. If more than 4, flag it.
3939+- Is the navigation clear and predictable?
4040+- **Progressive disclosure**: Is complexity revealed only when needed, or dumped on the user upfront?
4141+- **Run the 8-item cognitive load checklist** from the reference. Report failure count: 0-1 equals low (good), 2-3 equals moderate, 4+ equals critical.
4242+4343+### 4. Emotional Journey
4444+- What emotion does this interface evoke? Is that intentional?
4545+- Does it match the brand personality?
4646+- Does it feel trustworthy, approachable, premium, playful: whatever it should feel?
4747+- Would the target user feel "this is for me"?
4848+- **Peak-end rule**: Is the most intense moment positive? Does the experience end well (confirmation, celebration, clear next step)?
4949+- **Emotional valleys**: Check for onboarding frustration, error cliffs, feature discovery gaps, or anxiety spikes at high-stakes moments (payment, delete, commit)
5050+- **Interventions at negative moments**: Are there design interventions where users are likely to feel frustrated or anxious? (progress indicators, reassurance copy, undo options, social proof)
5151+5252+### 5. Discoverability and Affordance
5353+- Are interactive elements obviously interactive?
5454+- Would a user know what to do without instructions?
5555+- Are hover and focus states providing useful feedback?
5656+- Are there hidden features that should be more visible?
5757+5858+### 6. Composition and Balance
5959+- Does the layout feel balanced or uncomfortably weighted?
6060+- Is whitespace used intentionally or just leftover?
6161+- Is there visual rhythm in spacing and repetition?
6262+- Does asymmetry feel designed or accidental?
6363+6464+### 7. Typography as Communication
6565+- Does the type hierarchy clearly signal what to read first, second, third?
6666+- Is body text comfortable to read? (line length, spacing, size)
6767+- Do font choices reinforce the brand or tone?
6868+- Is there enough contrast between heading levels?
6969+7070+### 8. Color with Purpose
7171+- Is color used to communicate, not just decorate?
7272+- Does the palette feel cohesive?
7373+- Are accent colors drawing attention to the right things?
7474+- Does it work for colorblind users? (not just technically: does meaning still come through?)
7575+7676+### 9. States and Edge Cases
7777+- Empty states: Do they guide users toward action, or just say "nothing here"?
7878+- Loading states: Do they reduce perceived wait time?
7979+- Error states: Are they helpful and non-blaming?
8080+- Success states: Do they confirm and guide next steps?
8181+8282+### 10. Microcopy and Voice
8383+- Is the writing clear and concise?
8484+- Does it sound like a human (the right human for this brand)?
8585+- Are labels and buttons unambiguous?
8686+- Does error copy help users fix the problem?
8787+8888+## Phase 2: Present Findings
8989+9090+Structure your feedback as a design director would.
9191+9292+### Design Health Score
9393+> *Consult [heuristics-scoring](reference/heuristics-scoring.md)*
9494+9595+Score each of Nielsen 10 heuristics 0-4. Present as a table:
9696+9797+| # | Heuristic | Score | Key Issue |
9898+|---|-----------|-------|-----------|
9999+| 1 | Visibility of System Status | ? | [specific finding or "—" if solid] |
100100+| 2 | Match System and Real World | ? | |
101101+| 3 | User Control and Freedom | ? | |
102102+| 4 | Consistency and Standards | ? | |
103103+| 5 | Error Prevention | ? | |
104104+| 6 | Recognition Rather Than Recall | ? | |
105105+| 7 | Flexibility and Efficiency | ? | |
106106+| 8 | Aesthetic and Minimalist Design | ? | |
107107+| 9 | Error Recovery | ? | |
108108+| 10 | Help and Documentation | ? | |
109109+| **Total** | | **??/40** | **[Rating band]** |
110110+111111+Be honest with scores. A 4 means genuinely excellent. Most real interfaces score 20-32.
112112+113113+### Anti-Patterns Verdict
114114+**Start here.** Pass or fail: Does this look AI-generated? List specific tells from the skill Anti-Patterns section. Be brutally honest.
115115+116116+### Overall Impression
117117+A brief gut reaction: what works, what does not, and the single biggest opportunity.
118118+119119+### What is Working
120120+Highlight 2-3 things done well. Be specific about why they work.
121121+122122+### Priority Issues
123123+The 3-5 most impactful design problems, ordered by importance.
124124+125125+For each issue, tag with P0-P3 severity (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions):
126126+- **[P?] What**: Name the problem clearly
127127+- **Why it matters**: How this hurts users or undermines goals
128128+- **Fix**: What to do about it (be concrete)
129129+- **Suggested command**: Which command could address this (from: {{available_commands}})
130130+131131+### Persona Red Flags
132132+> *Consult [personas](reference/personas.md)*
133133+134134+Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If {{config_file}} contains a Design Context section from teach-impeccable, also generate 1-2 project-specific personas from the audience or brand info.
135135+136136+For each selected persona, walk through the primary user action and list specific red flags found:
137137+138138+**Alex (Power User)**: No keyboard shortcuts detected. Form requires 8 clicks for primary action. Forced modal onboarding. High abandonment risk.
139139+140140+**Jordan (First-Timer)**: Icon-only nav in sidebar. Technical jargon in error messages ("404 Not Found"). No visible help. Will abandon at step 2.
141141+142142+Be specific. Name the exact elements and interactions that fail each persona. Do not write generic persona descriptions. Write what broke for them.
143143+144144+### Minor Observations
145145+Quick notes on smaller issues worth addressing.
146146+147147+**Remember**:
148148+- Be direct. Vague feedback wastes everyone time.
149149+- Be specific. "the submit button" not "some elements"
150150+- Say what is wrong AND why it matters to users
151151+- Give concrete suggestions, not just "consider exploring..."
152152+- Prioritize ruthlessly. If everything is important, nothing is.
153153+- Do not soften criticism. Developers need honest feedback to ship great design.
154154+155155+## Phase 3: Ask the User
156156+157157+**After presenting findings**, use targeted questions based on what was actually found. {{ask_instruction}} These answers will shape the action plan.
158158+159159+Ask questions along these lines (adapt to the specific findings: do NOT ask generic questions):
160160+161161+1. **Priority direction**: Based on the issues found, ask which category matters most to the user right now. For example: "I found problems with visual hierarchy, color usage, and information overload. Which area should we tackle first?" Offer the top 2-3 issue categories as options.
162162+163163+2. **Design intent**: If the critique found a tonal mismatch, ask whether it was intentional. For example: "The interface feels clinical and corporate. Is that the intended tone, or should it feel warmer, bolder, more playful?" Offer 2-3 tonal directions as options based on what would fix the issues found.
164164+165165+3. **Scope**: Ask how much the user wants to take on. For example: "I found N issues. Want to address everything, or focus on the top 3?" Offer scope options like "Top 3 only", "All issues", "Critical issues only".
166166+167167+4. **Constraints** (optional: only ask if relevant): If the findings touch many areas, ask if anything is off-limits. For example: "Should any sections stay as-is?" This prevents the plan from touching things the user considers done.
168168+169169+**Rules for questions**:
170170+- Every question must reference specific findings from Phase 2. Never ask generic "who is your audience?" questions
171171+- Keep it to 2-4 questions maximum. Respect the user time.
172172+- Offer concrete options, not open-ended prompts.
173173+- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Phase 4
174174+175175+## Phase 4: Recommended Actions
176176+177177+**After receiving the user answers**, present a prioritized action summary reflecting the user priorities and scope from Phase 3.
178178+179179+### Action Summary
180180+181181+List recommended commands in priority order, based on the user answers:
182182+183183+1. **`{{command_prefix}}command-name`**: Brief description of what to fix (specific context from critique findings)
184184+2. **`{{command_prefix}}command-name`**: Brief description (specific context)
185185+...
186186+187187+**Rules for recommendations**:
188188+- Only recommend commands from: {{available_commands}}
189189+- Order by the user stated priorities first, then by impact
190190+- Each item description should carry enough context that the command knows what to focus on
191191+- Map each Priority Issue to the appropriate command
192192+- Skip commands that would address zero issues
193193+- If the user chose a limited scope, only include items within that scope
194194+- If the user marked areas as off-limits, exclude commands that would touch those areas
195195+- End with {{command_prefix}}polish as the final step if any fixes were recommended
196196+197197+After presenting the summary, tell the user:
198198+199199+> You can ask me to run these one at a time, all at once, or in any order you prefer.
200200+>
201201+> Re-run {{command_prefix}}critique after fixes to see your score improve.
+106
skills/critique/reference/cognitive-load.md
···11+# Cognitive Load Assessment
22+33+Cognitive load is the total mental effort required to use an interface. Overloaded users make mistakes, get frustrated, and leave. This reference helps identify and fix cognitive overload.
44+55+---
66+77+## Three Types of Cognitive Load
88+99+### Intrinsic Load: The Task Itself
1010+Complexity inherent to what the user is trying to do. You cannot eliminate this, but you can structure it.
1111+1212+**Manage it by**:
1313+- Breaking complex tasks into discrete steps
1414+- Providing scaffolding (templates, defaults, examples)
1515+- Progressive disclosure. Show what is needed now, hide the rest.
1616+- Grouping related decisions together
1717+1818+### Extraneous Load: Bad Design
1919+Mental effort caused by poor design choices. **Eliminate this ruthlessly.** It is pure waste.
2020+2121+**Common sources**:
2222+- Confusing navigation that requires mental mapping
2323+- Unclear labels that force users to guess meaning
2424+- Visual clutter competing for attention
2525+- Inconsistent patterns that prevent learning
2626+- Unnecessary steps between user intent and result
2727+2828+### Germane Load: Learning Effort
2929+Mental effort spent building understanding. This is good cognitive load. It leads to mastery.
3030+3131+**Support it by**:
3232+- Progressive disclosure that reveals complexity gradually
3333+- Consistent patterns that reward learning
3434+- Feedback that confirms correct understanding
3535+- Onboarding that teaches through action, not walls of text
3636+3737+---
3838+3939+## Cognitive Load Checklist
4040+4141+Evaluate the interface against these 8 items:
4242+4343+- [ ] **Single focus**: Can the user complete their primary task without distraction from competing elements?
4444+- [ ] **Chunking**: Is information presented in digestible groups (4 or fewer items per group)?
4545+- [ ] **Grouping**: Are related items visually grouped together (proximity, borders, shared background)?
4646+- [ ] **Visual hierarchy**: Is it immediately clear what is most important on the screen?
4747+- [ ] **One thing at a time**: Can the user focus on a single decision before moving to the next?
4848+- [ ] **Minimal choices**: Are decisions simplified (4 or fewer visible options at any decision point)?
4949+- [ ] **Working memory**: Does the user need to remember information from a previous screen to act on the current one?
5050+- [ ] **Progressive disclosure**: Is complexity revealed only when the user needs it?
5151+5252+**Scoring**: Count the failed items. 0-1 failures equals low cognitive load (good). 2-3 equals moderate (address soon). 4+ equals high cognitive load (critical fix needed).
5353+5454+---
5555+5656+## The Working Memory Rule
5757+5858+**Humans can hold 4 or fewer items in working memory at once** (Miller Law revised by Cowan, 2001).
5959+6060+At any decision point, count the number of distinct options, actions, or pieces of information a user must simultaneously consider:
6161+- **4 or fewer items**: Within working memory limits. Manageable.
6262+- **5-7 items**: Pushing the boundary. Consider grouping or progressive disclosure.
6363+- **8+ items**: Overloaded. Users will skip, misclick, or abandon.
6464+6565+**Practical applications**:
6666+- Navigation menus: 5 or fewer top-level items (group the rest under clear categories)
6767+- Form sections: 4 or fewer fields visible per group before a visual break
6868+- Action buttons: 1 primary, 1-2 secondary, group the rest in a menu
6969+- Dashboard widgets: 4 or fewer key metrics visible without scrolling
7070+- Pricing tiers: 3 or fewer options (more causes analysis paralysis)
7171+7272+---
7373+7474+## Common Cognitive Load Violations
7575+7676+### 1. The Wall of Options
7777+**Problem**: Presenting 10+ choices at once with no hierarchy.
7878+**Fix**: Group into categories, highlight recommended, use progressive disclosure.
7979+8080+### 2. The Memory Bridge
8181+**Problem**: User must remember info from step 1 to complete step 3.
8282+**Fix**: Keep relevant context visible, or repeat it where it is needed.
8383+8484+### 3. The Hidden Navigation
8585+**Problem**: User must build a mental map of where things are.
8686+**Fix**: Always show current location (breadcrumbs, active states, progress indicators).
8787+8888+### 4. The Jargon Barrier
8989+**Problem**: Technical or domain language forces translation effort.
9090+**Fix**: Use plain language. If domain terms are unavoidable, define them inline.
9191+9292+### 5. The Visual Noise Floor
9393+**Problem**: Every element has the same visual weight. Nothing stands out.
9494+**Fix**: Establish clear hierarchy: one primary element, 2-3 secondary, everything else muted.
9595+9696+### 6. The Inconsistent Pattern
9797+**Problem**: Similar actions work differently in different places.
9898+**Fix**: Standardize interaction patterns. Same type of action equals same type of UI.
9999+100100+### 7. The Multi-Task Demand
101101+**Problem**: Interface requires processing multiple simultaneous inputs (reading plus deciding plus navigating).
102102+**Fix**: Sequence the steps. Let the user do one thing at a time.
103103+104104+### 8. The Context Switch
105105+**Problem**: User must jump between screens, tabs, or modals to gather info for a single decision.
106106+**Fix**: Co-locate the information needed for each decision. Reduce back-and-forth.
+234
skills/critique/reference/heuristics-scoring.md
···11+# Heuristics Scoring Guide
22+33+Score each of Nielsen 10 Usability Heuristics on a 0-4 scale. Be honest. A 4 means genuinely excellent, not "good enough."
44+55+## Nielsen 10 Heuristics
66+77+### 1. Visibility of System Status
88+99+Keep users informed about what is happening through timely, appropriate feedback.
1010+1111+**Check for**:
1212+- Loading indicators during async operations
1313+- Confirmation of user actions (save, submit, delete)
1414+- Progress indicators for multi-step processes
1515+- Current location in navigation (breadcrumbs, active states)
1616+- Form validation feedback (inline, not just on submit)
1717+1818+**Scoring**:
1919+| Score | Criteria |
2020+|-------|----------|
2121+| 0 | No feedback. User is guessing what happened. |
2222+| 1 | Rare feedback. Most actions produce no visible response. |
2323+| 2 | Partial. Some states communicated, major gaps remain. |
2424+| 3 | Good. Most operations give clear feedback, minor gaps. |
2525+| 4 | Excellent. Every action confirms, progress is always visible. |
2626+2727+### 2. Match Between System and Real World
2828+2929+Speak the user language. Follow real-world conventions. Information appears in natural, logical order.
3030+3131+**Check for**:
3232+- Familiar terminology (no unexplained jargon)
3333+- Logical information order matching user expectations
3434+- Recognizable icons and metaphors
3535+- Domain-appropriate language for the target audience
3636+- Natural reading flow (left-to-right, top-to-bottom priority)
3737+3838+**Scoring**:
3939+| Score | Criteria |
4040+|-------|----------|
4141+| 0 | Pure tech jargon, alien to users. |
4242+| 1 | Mostly confusing. Requires domain expertise to navigate. |
4343+| 2 | Mixed. Some plain language, some jargon leaks through. |
4444+| 3 | Mostly natural. Occasional term needs context. |
4545+| 4 | Speaks the user language fluently throughout. |
4646+4747+### 3. User Control and Freedom
4848+4949+Users need a clear "emergency exit" from unwanted states without extended dialogue.
5050+5151+**Check for**:
5252+- Undo and redo functionality
5353+- Cancel buttons on forms and modals
5454+- Clear navigation back to safety (home, previous)
5555+- Easy way to clear filters, search, selections
5656+- Escape from long or multi-step processes
5757+5858+**Scoring**:
5959+| Score | Criteria |
6060+|-------|----------|
6161+| 0 | Users get trapped. No way out without refreshing. |
6262+| 1 | Difficult exits. Must find obscure paths to escape. |
6363+| 2 | Some exits. Main flows have escape, edge cases do not. |
6464+| 3 | Good control. Users can exit and undo most actions. |
6565+| 4 | Full control. Undo, cancel, back, and escape everywhere. |
6666+6767+### 4. Consistency and Standards
6868+6969+Users should not wonder whether different words, situations, or actions mean the same thing.
7070+7171+**Check for**:
7272+- Consistent terminology throughout the interface
7373+- Same actions produce same results everywhere
7474+- Platform conventions followed (standard UI patterns)
7575+- Visual consistency (colors, typography, spacing, components)
7676+- Consistent interaction patterns (same gesture equals same behavior)
7777+7878+**Scoring**:
7979+| Score | Criteria |
8080+|-------|----------|
8181+| 0 | Inconsistent everywhere. Feels like different products stitched together. |
8282+| 1 | Many inconsistencies. Similar things look or behave differently. |
8383+| 2 | Partially consistent. Main flows match, details diverge. |
8484+| 3 | Mostly consistent. Occasional deviation, nothing confusing. |
8585+| 4 | Fully consistent. Cohesive system, predictable behavior. |
8686+8787+### 5. Error Prevention
8888+8989+Better than good error messages is a design that prevents problems in the first place.
9090+9191+**Check for**:
9292+- Confirmation before destructive actions (delete, overwrite)
9393+- Constraints preventing invalid input (date pickers, dropdowns)
9494+- Smart defaults that reduce errors
9595+- Clear labels that prevent misunderstanding
9696+- Autosave and draft recovery
9797+9898+**Scoring**:
9999+| Score | Criteria |
100100+|-------|----------|
101101+| 0 | Errors easy to make. No guardrails anywhere. |
102102+| 1 | Few safeguards. Some inputs validated, most are not. |
103103+| 2 | Partial prevention. Common errors caught, edge cases slip. |
104104+| 3 | Good prevention. Most error paths blocked proactively. |
105105+| 4 | Excellent. Errors nearly impossible through smart constraints. |
106106+107107+### 6. Recognition Rather Than Recall
108108+109109+Minimize memory load. Make objects, actions, and options visible or easily retrievable.
110110+111111+**Check for**:
112112+- Visible options (not buried in hidden menus)
113113+- Contextual help when needed (tooltips, inline hints)
114114+- Recent items and history
115115+- Autocomplete and suggestions
116116+- Labels on icons (not icon-only navigation)
117117+118118+**Scoring**:
119119+| Score | Criteria |
120120+|-------|----------|
121121+| 0 | Heavy memorization. Users must remember paths and commands. |
122122+| 1 | Mostly recall. Many hidden features, few visible cues. |
123123+| 2 | Some aids. Main actions visible, secondary features hidden. |
124124+| 3 | Good recognition. Most things discoverable, few memory demands. |
125125+| 4 | Everything discoverable. Users never need to memorize. |
126126+127127+### 7. Flexibility and Efficiency of Use
128128+129129+Accelerators. Invisible to novices. Speed up expert interaction.
130130+131131+**Check for**:
132132+- Keyboard shortcuts for common actions
133133+- Customizable interface elements
134134+- Recent items and favorites
135135+- Bulk or batch actions
136136+- Power user features that do not complicate the basics
137137+138138+**Scoring**:
139139+| Score | Criteria |
140140+|-------|----------|
141141+| 0 | One rigid path. No shortcuts or alternatives. |
142142+| 1 | Limited flexibility. Few alternatives to the main path. |
143143+| 2 | Some shortcuts. Basic keyboard support, limited bulk actions. |
144144+| 3 | Good accelerators. Keyboard nav, some customization. |
145145+| 4 | Highly flexible. Multiple paths, power features, customizable. |
146146+147147+### 8. Aesthetic and Minimalist Design
148148+149149+Interfaces should not contain irrelevant or rarely needed information. Every element should serve a purpose.
150150+151151+**Check for**:
152152+- Only necessary information visible at each step
153153+- Clear visual hierarchy directing attention
154154+- Purposeful use of color and emphasis
155155+- No decorative clutter competing for attention
156156+- Focused, uncluttered layouts
157157+158158+**Scoring**:
159159+| Score | Criteria |
160160+|-------|----------|
161161+| 0 | Overwhelming. Everything competes for attention equally. |
162162+| 1 | Cluttered. Too much noise, hard to find what matters. |
163163+| 2 | Some clutter. Main content clear, periphery noisy. |
164164+| 3 | Mostly clean. Focused design, minor visual noise. |
165165+| 4 | Perfectly minimal. Every element earns its pixel. |
166166+167167+### 9. Help Users Recognize, Diagnose, and Recover from Errors
168168+169169+Error messages should use plain language, precisely indicate the problem, and constructively suggest a solution.
170170+171171+**Check for**:
172172+- Plain language error messages (no error codes for users)
173173+- Specific problem identification ("Email is missing @" not "Invalid input")
174174+- Actionable recovery suggestions
175175+- Errors displayed near the source of the problem
176176+- Non-blocking error handling (do not wipe the form)
177177+178178+**Scoring**:
179179+| Score | Criteria |
180180+|-------|----------|
181181+| 0 | Cryptic errors. Codes, jargon, or no message at all. |
182182+| 1 | Vague errors. "Something went wrong" with no guidance. |
183183+| 2 | Clear but unhelpful. Names the problem but not the fix. |
184184+| 3 | Clear with suggestions. Identifies problem and offers next steps. |
185185+| 4 | Perfect recovery. Pinpoints issue, suggests fix, preserves user work. |
186186+187187+### 10. Help and Documentation
188188+189189+Even if the system is usable without docs, help should be easy to find, task-focused, and concise.
190190+191191+**Check for**:
192192+- Searchable help or documentation
193193+- Contextual help (tooltips, inline hints, guided tours)
194194+- Task-focused organization (not feature-organized)
195195+- Concise, scannable content
196196+- Easy access without leaving current context
197197+198198+**Scoring**:
199199+| Score | Criteria |
200200+|-------|----------|
201201+| 0 | No help available anywhere. |
202202+| 1 | Help exists but hard to find or irrelevant. |
203203+| 2 | Basic help. FAQ or docs exist, not contextual. |
204204+| 3 | Good documentation. Searchable, mostly task-focused. |
205205+| 4 | Excellent contextual help. Right info at the right moment. |
206206+207207+---
208208+209209+## Score Summary
210210+211211+**Total possible**: 40 points (10 heuristics times 4 max)
212212+213213+| Score Range | Rating | What It Means |
214214+|-------------|--------|---------------|
215215+| 36-40 | Excellent | Minor polish only. Ship it. |
216216+| 28-35 | Good | Address weak areas, solid foundation. |
217217+| 20-27 | Acceptable | Significant improvements needed before users are happy. |
218218+| 12-19 | Poor | Major UX overhaul required. Core experience broken. |
219219+| 0-11 | Critical | Redesign needed. Unusable in current state. |
220220+221221+---
222222+223223+## Issue Severity (P0-P3)
224224+225225+Tag each individual issue found during scoring with a priority level:
226226+227227+| Priority | Name | Description | Action |
228228+|----------|------|-------------|--------|
229229+| **P0** | Blocking | Prevents task completion entirely | Fix immediately. This is a showstopper. |
230230+| **P1** | Major | Causes significant difficulty or confusion | Fix before release. |
231231+| **P2** | Minor | Annoyance, but workaround exists | Fix in next pass. |
232232+| **P3** | Polish | Nice-to-fix, no real user impact | Fix if time permits. |
233233+234234+**Tip**: If you are unsure between two levels, ask: "Would a user contact support about this?" If yes, it is at least P1.
+178
skills/critique/reference/personas.md
···11+# Persona-Based Design Testing
22+33+Test the interface through the eyes of 5 distinct user archetypes. Each persona exposes different failure modes that a single "design director" perspective would miss.
44+55+**How to use**: Select 2-3 personas most relevant to the interface being critiqued. Walk through the primary user action as each persona. Report specific red flags. Not generic concerns.
66+77+---
88+99+## 1. Impatient Power User — "Alex"
1010+1111+**Profile**: Expert with similar products. Expects efficiency, hates hand-holding. Will find shortcuts or leave.
1212+1313+**Behaviors**:
1414+- Skips all onboarding and instructions
1515+- Looks for keyboard shortcuts immediately
1616+- Tries to bulk-select, batch-edit, and automate
1717+- Gets frustrated by required steps that feel unnecessary
1818+- Abandons if anything feels slow or patronizing
1919+2020+**Test Questions**:
2121+- Can Alex complete the core task in under 60 seconds?
2222+- Are there keyboard shortcuts for common actions?
2323+- Can onboarding be skipped entirely?
2424+- Do modals have keyboard dismiss (Esc)?
2525+- Is there a "power user" path (shortcuts, bulk actions)?
2626+2727+**Red Flags** (report these specifically):
2828+- Forced tutorials or unskippable onboarding
2929+- No keyboard navigation for primary actions
3030+- Slow animations that cannot be skipped
3131+- One-item-at-a-time workflows where batch would be natural
3232+- Redundant confirmation steps for low-risk actions
3333+3434+---
3535+3636+## 2. Confused First-Timer — "Jordan"
3737+3838+**Profile**: Never used this type of product. Needs guidance at every step. Will abandon rather than figure it out.
3939+4040+**Behaviors**:
4141+- Reads all instructions carefully
4242+- Hesitates before clicking anything unfamiliar
4343+- Looks for help or support constantly
4444+- Misunderstands jargon and abbreviations
4545+- Takes the most literal interpretation of any label
4646+4747+**Test Questions**:
4848+- Is the first action obviously clear within 5 seconds?
4949+- Are all icons labeled with text?
5050+- Is there contextual help at decision points?
5151+- Does terminology assume prior knowledge?
5252+- Is there a clear "back" or "undo" at every step?
5353+5454+**Red Flags** (report these specifically):
5555+- Icon-only navigation with no labels
5656+- Technical jargon without explanation
5757+- No visible help option or guidance
5858+- Ambiguous next steps after completing an action
5959+- No confirmation that an action succeeded
6060+6161+---
6262+6363+## 3. Accessibility-Dependent User — "Sam"
6464+6565+**Profile**: Uses screen reader (VoiceOver or NVDA), keyboard-only navigation. May have low vision, motor impairment, or cognitive differences.
6666+6767+**Behaviors**:
6868+- Tabs through the interface linearly
6969+- Relies on ARIA labels and heading structure
7070+- Cannot see hover states or visual-only indicators
7171+- Needs adequate color contrast (4.5:1 minimum)
7272+- May use browser zoom up to 200%
7373+7474+**Test Questions**:
7575+- Can the entire primary flow be completed keyboard-only?
7676+- Are all interactive elements focusable with visible focus indicators?
7777+- Do images have meaningful alt text?
7878+- Is color contrast WCAG AA compliant (4.5:1 for text)?
7979+- Does the screen reader announce state changes (loading, success, errors)?
8080+8181+**Red Flags** (report these specifically):
8282+- Click-only interactions with no keyboard alternative
8383+- Missing or invisible focus indicators
8484+- Meaning conveyed by color alone (red equals error, green equals success)
8585+- Unlabeled form fields or buttons
8686+- Time-limited actions without extension option
8787+- Custom components that break screen reader flow
8888+8989+---
9090+9191+## 4. Deliberate Stress Tester — "Riley"
9292+9393+**Profile**: Methodical user who pushes interfaces beyond the happy path. Tests edge cases, tries unexpected inputs, and probes for gaps in the experience.
9494+9595+**Behaviors**:
9696+- Tests edge cases intentionally (empty states, long strings, special characters)
9797+- Submits forms with unexpected data (emoji, RTL text, very long values)
9898+- Tries to break workflows by navigating backwards, refreshing mid-flow, or opening in multiple tabs
9999+- Looks for inconsistencies between what the UI promises and what actually happens
100100+- Documents problems methodically
101101+102102+**Test Questions**:
103103+- What happens at the edges (0 items, 1000 items, very long text)?
104104+- Do error states recover gracefully or leave the UI in a broken state?
105105+- What happens on refresh mid-workflow? Is state preserved?
106106+- Are there features that appear to work but produce broken results?
107107+- How does the UI handle unexpected input (emoji, special chars, paste from Excel)?
108108+109109+**Red Flags** (report these specifically):
110110+- Features that appear to work but silently fail or produce wrong results
111111+- Error handling that exposes technical details or leaves UI in a broken state
112112+- Empty states that show nothing useful ("No results" with no guidance)
113113+- Workflows that lose user data on refresh or navigation
114114+- Inconsistent behavior between similar interactions in different parts of the UI
115115+116116+---
117117+118118+## 5. Distracted Mobile User — "Casey"
119119+120120+**Profile**: Using phone one-handed on the go. Frequently interrupted. Possibly on a slow connection.
121121+122122+**Behaviors**:
123123+- Uses thumb only. Prefers bottom-of-screen actions
124124+- Gets interrupted mid-flow and returns later
125125+- Switches between apps frequently
126126+- Has limited attention span and low patience
127127+- Types as little as possible, prefers taps and selections
128128+129129+**Test Questions**:
130130+- Are primary actions in the thumb zones (bottom half of screen)?
131131+- Is state preserved if the user leaves and returns?
132132+- Does it work on slow connections (3G)?
133133+- Can forms leverage autocomplete and smart defaults?
134134+- Are touch targets at least 44 by 44pt?
135135+136136+**Red Flags** (report these specifically):
137137+- Important actions positioned at the top of the screen (unreachable by thumb)
138138+- No state persistence. Progress lost on tab switch or interruption
139139+- Large text inputs required where selection would work
140140+- Heavy assets loading on every page (no lazy loading)
141141+- Tiny tap targets or targets too close together
142142+143143+---
144144+145145+## Selecting Personas
146146+147147+Choose personas based on the interface type:
148148+149149+| Interface Type | Primary Personas | Why |
150150+|---------------|-----------------|-----|
151151+| Landing page or marketing | Jordan, Riley, Casey | First impressions, trust, mobile |
152152+| Dashboard or admin | Alex, Sam | Power users, accessibility |
153153+| E-commerce or checkout | Casey, Riley, Jordan | Mobile, edge cases, clarity |
154154+| Onboarding flow | Jordan, Casey | Confusion, interruption |
155155+| Data-heavy or analytics | Alex, Sam | Efficiency, keyboard nav |
156156+| Form-heavy or wizard | Jordan, Sam, Casey | Clarity, accessibility, mobile |
157157+158158+---
159159+160160+## Project-Specific Personas
161161+162162+If {{config_file}} contains a Design Context section (generated by teach-impeccable), derive 1-2 additional personas from the audience and brand information:
163163+164164+1. Read the target audience description
165165+2. Identify the primary user archetype not covered by the 5 predefined personas
166166+3. Create a persona following this template:
167167+168168+```
169169+### [Role] — "[Name]"
170170+171171+**Profile**: [2-3 key characteristics derived from Design Context]
172172+173173+**Behaviors**: [3-4 specific behaviors based on the described audience]
174174+175175+**Red Flags**: [3-4 things that would alienate this specific user type]
176176+```
177177+178178+Only generate project-specific personas when real Design Context data is available. Do not invent audience details. Use the 5 predefined personas when no context exists.
+303
skills/delight/SKILL.md
···11+---
22+name: delight
33+description: "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: what is appropriate for the domain (playful vs professional vs quirky vs elegant).
1313+1414+---
1515+1616+## Assess Delight Opportunities
1717+1818+Identify where delight would enhance (not distract from) the experience.
1919+2020+### 1. Find natural delight moments
2121+- **Success states**: Completed actions (save, send, publish)
2222+- **Empty states**: First-time experiences, onboarding
2323+- **Loading states**: Waiting periods that could be entertaining
2424+- **Achievements**: Milestones, streaks, completions
2525+- **Interactions**: Hover states, clicks, drags
2626+- **Errors**: Softening frustrating moments
2727+- **Easter eggs**: Hidden discoveries for curious users
2828+2929+### 2. Understand the context
3030+- What is the brand personality? (Playful? Professional? Quirky? Elegant?)
3131+- Who is the audience? (Tech-savvy? Creative? Corporate?)
3232+- What is the emotional context? (Accomplishment? Exploration? Frustration?)
3333+- What is appropriate? (Banking app does not equal gaming app)
3434+3535+### 3. Define delight strategy
3636+- **Subtle sophistication**: Refined micro-interactions (luxury brands)
3737+- **Playful personality**: Whimsical illustrations and copy (consumer apps)
3838+- **Helpful surprises**: Anticipating needs before users ask (productivity tools)
3939+- **Sensory richness**: Satisfying sounds, smooth animations (creative tools)
4040+4141+If any of these are unclear from the codebase, {{ask_instruction}}
4242+4343+**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you have gone too far.
4444+4545+## Delight Principles
4646+4747+Follow these guidelines.
4848+4949+### Delight Amplifies, Never Blocks
5050+- Delight moments should be quick (less than 1 second)
5151+- Never delay core functionality for delight
5252+- Make delight skippable or subtle
5353+- Respect user time and task focus
5454+5555+### Surprise and Discovery
5656+- Hide delightful details for users to discover
5757+- Reward exploration and curiosity
5858+- Do not announce every delight moment
5959+- Let users share discoveries with others
6060+6161+### Appropriate to Context
6262+- Match delight to emotional moment (celebrate success, empathize with errors)
6363+- Respect the user state (do not be playful during critical errors)
6464+- Match brand personality and audience expectations
6565+- Cultural sensitivity (what is delightful varies by culture)
6666+6767+### Compound Over Time
6868+- Delight should remain fresh with repeated use
6969+- Vary responses (not same animation every time)
7070+- Reveal deeper layers with continued use
7171+- Build anticipation through patterns
7272+7373+## Delight Techniques
7474+7575+Add personality and joy through these methods.
7676+7777+### Micro-interactions and Animation
7878+7979+**Button delight**:
8080+```css
8181+/* Satisfying button press */
8282+.button {
8383+ transition: transform 0.1s, box-shadow 0.1s;
8484+}
8585+.button:active {
8686+ transform: translateY(2px);
8787+ box-shadow: 0 2px 4px rgba(0,0,0,0.2);
8888+}
8989+9090+/* Ripple effect on click */
9191+/* Smooth lift on hover */
9292+.button:hover {
9393+ transform: translateY(-2px);
9494+ transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
9595+}
9696+```
9797+9898+**Loading delight**:
9999+- Playful loading animations (not just spinners)
100100+- Personality in loading messages (write product-specific ones, not generic AI filler)
101101+- Progress indication with encouraging messages
102102+- Skeleton screens with subtle animations
103103+104104+**Success animations**:
105105+- Checkmark draw animation
106106+- Confetti burst for major achievements
107107+- Gentle scale and fade for confirmation
108108+- Satisfying sound effects (subtle)
109109+110110+**Hover surprises**:
111111+- Icons that animate on hover
112112+- Color shifts or glow effects
113113+- Tooltip reveals with personality
114114+- Cursor changes (custom cursors for branded experiences)
115115+116116+### Personality in Copy
117117+118118+**Playful error messages**:
119119+```
120120+"Error 404"
121121+"This page is playing hide and seek. (And winning)"
122122+123123+"Connection failed"
124124+"Looks like the internet took a coffee break. Want to retry?"
125125+```
126126+127127+**Encouraging empty states**:
128128+```
129129+"No projects"
130130+"Your canvas awaits. Create something amazing."
131131+132132+"No messages"
133133+"Inbox zero! You're crushing it today."
134134+```
135135+136136+**Playful labels and tooltips**:
137137+```
138138+"Delete"
139139+"Send to void" (for playful brand)
140140+141141+"Help"
142142+"Rescue me" (tooltip)
143143+```
144144+145145+**IMPORTANT**: Match copy personality to brand. Banks should not be wacky, but they can be warm.
146146+147147+### Illustrations and Visual Personality
148148+149149+**Custom illustrations**:
150150+- Empty state illustrations (not stock icons)
151151+- Error state illustrations (friendly monsters, quirky characters)
152152+- Loading state illustrations (animated characters)
153153+- Success state illustrations (celebrations)
154154+155155+**Icon personality**:
156156+- Custom icon set matching brand personality
157157+- Animated icons (subtle motion on hover or click)
158158+- Illustrative icons (more detailed than generic)
159159+- Consistent style across all icons
160160+161161+**Background effects**:
162162+- Subtle particle effects
163163+- Gradient mesh backgrounds
164164+- Geometric patterns
165165+- Parallax depth
166166+- Time-of-day themes (morning vs night)
167167+168168+### Satisfying Interactions
169169+170170+**Drag and drop delight**:
171171+- Lift effect on drag (shadow, scale)
172172+- Snap animation when dropped
173173+- Satisfying placement sound
174174+- Undo toast ("Dropped in wrong place? [Undo]")
175175+176176+**Toggle switches**:
177177+- Smooth slide with spring physics
178178+- Color transition
179179+- Haptic feedback on mobile
180180+- Optional sound effect
181181+182182+**Progress and achievements**:
183183+- Streak counters with celebratory milestones
184184+- Progress bars that "celebrate" at 100%
185185+- Badge unlocks with animation
186186+- Playful stats ("You are on fire! 5 days in a row")
187187+188188+**Form interactions**:
189189+- Input fields that animate on focus
190190+- Checkboxes with a satisfying scale pulse when checked
191191+- Success state that celebrates valid input
192192+- Auto-grow textareas
193193+194194+### Sound Design
195195+196196+**Subtle audio cues** (when appropriate):
197197+- Notification sounds (distinctive but not annoying)
198198+- Success sounds (satisfying "ding")
199199+- Error sounds (empathetic, not harsh)
200200+- Typing sounds for chat or messaging
201201+- Ambient background audio (very subtle)
202202+203203+**IMPORTANT**:
204204+- Respect system sound settings
205205+- Provide mute option
206206+- Keep volumes quiet (subtle cues, not alarms)
207207+- Do not play on every interaction (sound fatigue is real)
208208+209209+### Easter Eggs and Hidden Delights
210210+211211+**Discovery rewards**:
212212+- Konami code unlocks special theme
213213+- Hidden keyboard shortcuts (Cmd+K for special features)
214214+- Hover reveals on logos or illustrations
215215+- Alt text jokes on images (for screen reader users too!)
216216+- Console messages for developers ("Like what you see? We're hiring!")
217217+218218+**Seasonal touches**:
219219+- Holiday themes (subtle, tasteful)
220220+- Seasonal color shifts
221221+- Weather-based variations
222222+- Time-based changes (dark at night, light during day)
223223+224224+**Contextual personality**:
225225+- Different messages based on time of day
226226+- Responses to specific user actions
227227+- Randomized variations (not same every time)
228228+- Progressive reveals with continued use
229229+230230+### Loading and Waiting States
231231+232232+**Make waiting engaging**:
233233+- Interesting loading messages that rotate
234234+- Progress bars with personality
235235+- Mini-games during long loads
236236+- Fun facts or tips while waiting
237237+- Countdown with encouraging messages
238238+239239+```
240240+Loading messages: write ones specific to your product, not generic AI filler:
241241+- "Crunching your latest numbers..."
242242+- "Syncing with your team's changes..."
243243+- "Preparing your dashboard..."
244244+- "Checking for updates since yesterday..."
245245+```
246246+247247+**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy: instantly recognizable as machine-generated. Write messages that are specific to what your product actually does.
248248+249249+### Celebration Moments
250250+251251+**Success celebrations**:
252252+- Confetti for major milestones
253253+- Animated checkmarks for completions
254254+- Progress bar celebrations at 100%
255255+- "Achievement unlocked" style notifications
256256+- Personalized messages ("You published your 10th article!")
257257+258258+**Milestone recognition**:
259259+- First-time actions get special treatment
260260+- Streak tracking and celebration
261261+- Progress toward goals
262262+- Anniversary celebrations
263263+264264+## Implementation Patterns
265265+266266+**Animation libraries**:
267267+- Framer Motion (React)
268268+- GSAP (universal)
269269+- Lottie (After Effects animations)
270270+- Canvas confetti (party effects)
271271+272272+**Sound libraries**:
273273+- Howler.js (audio management)
274274+- Use-sound (React hook)
275275+276276+**Physics libraries**:
277277+- React Spring (spring physics)
278278+- Popmotion (animation primitives)
279279+280280+**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features.
281281+282282+**NEVER**:
283283+- Delay core functionality for delight
284284+- Force users through delightful moments (make skippable)
285285+- Use delight to hide poor UX
286286+- Overdo it (less is more)
287287+- Ignore accessibility (animate responsibly, provide alternatives)
288288+- Make every interaction delightful (special moments should be special)
289289+- Sacrifice performance for delight
290290+- Be inappropriate for context (read the room)
291291+292292+## Verify Delight Quality
293293+294294+Test that delight actually delights.
295295+296296+- **User reactions**: Do users smile? Share screenshots?
297297+- **Does not annoy**: Still pleasant after 100th time?
298298+- **Does not block**: Can users opt out or skip?
299299+- **Performant**: No jank, no slowdown
300300+- **Appropriate**: Matches brand and context
301301+- **Accessible**: Works with reduced motion, screen readers
302302+303303+Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability: delight should enhance, never obstruct.
+121
skills/distill/SKILL.md
···11+---
22+name: distill
33+description: "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Assess Current State
1717+1818+Analyze what makes the design feel complex or cluttered.
1919+2020+### 1. Identify complexity sources
2121+- **Too many elements**: Competing buttons, redundant information, visual clutter
2222+- **Excessive variation**: Too many colors, fonts, sizes, styles without purpose
2323+- **Information overload**: Everything visible at once, no progressive disclosure
2424+- **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations
2525+- **Confusing hierarchy**: Unclear what matters most
2626+- **Feature creep**: Too many options, actions, or paths forward
2727+2828+### 2. Find the essence
2929+- What is the primary user goal? (There should be ONE)
3030+- What is actually necessary vs nice-to-have?
3131+- What can be removed, hidden, or combined?
3232+- What is the 20% that delivers 80% of value?
3333+3434+If any of these are unclear from the codebase, {{ask_instruction}}
3535+3636+**CRITICAL**: Simplicity is not about removing features. It is about removing obstacles between users and their goals. Every element should justify its existence.
3737+3838+## Plan Simplification
3939+4040+Create a ruthless editing strategy.
4141+4242+- **Core purpose**: What is the ONE thing this should accomplish?
4343+- **Essential elements**: What is truly necessary to achieve that purpose?
4444+- **Progressive disclosure**: What can be hidden until needed?
4545+- **Consolidation opportunities**: What can be combined or integrated?
4646+4747+**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless.
4848+4949+## Simplify the Design
5050+5151+Systematically remove complexity across these dimensions.
5252+5353+### Information Architecture
5454+- **Reduce scope**: Remove secondary actions, optional features, redundant information
5555+- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows)
5656+- **Combine related actions**: Merge similar buttons, consolidate forms, group related content
5757+- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden
5858+- **Remove redundancy**: If it is said elsewhere, do not repeat it here
5959+6060+### Visual Simplification
6161+- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors
6262+- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights
6363+- **Remove decorations**: Eliminate borders, shadows, backgrounds that do not serve hierarchy or function
6464+- **Flatten structure**: Reduce nesting, remove unnecessary containers. Never nest cards inside cards.
6565+- **Remove unnecessary cards**: Cards are not needed for basic layout. Use spacing and alignment instead.
6666+- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps
6767+6868+### Layout Simplification
6969+- **Linear flow**: Replace complex grids with simple vertical flow where possible
7070+- **Remove sidebars**: Move secondary content inline or hide it
7171+- **Full-width**: Use available space generously instead of complex multi-column layouts
7272+- **Consistent alignment**: Pick left or center, stick with it
7373+- **Generous white space**: Let content breathe, do not pack everything tight
7474+7575+### Interaction Simplification
7676+- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real)
7777+- **Smart defaults**: Make common choices automatic, only ask when necessary
7878+- **Inline actions**: Replace modal flows with inline editing where possible
7979+- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified?
8080+- **Clear CTAs**: ONE obvious next step, not five competing actions
8181+8282+### Content Simplification
8383+- **Shorter copy**: Cut every sentence in half, then do it again
8484+- **Active voice**: "Save changes" not "Changes will be saved"
8585+- **Remove jargon**: Plain language always wins
8686+- **Scannable structure**: Short paragraphs, bullet points, clear headings
8787+- **Essential information only**: Remove marketing fluff, legalese, hedging
8888+- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once
8989+9090+### Code Simplification
9191+- **Remove unused code**: Dead CSS, unused components, orphaned files
9292+- **Flatten component trees**: Reduce nesting depth
9393+- **Consolidate styles**: Merge similar styles, use utilities consistently
9494+- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases?
9595+9696+**NEVER**:
9797+- Remove necessary functionality (simplicity equals feature-less)
9898+- Sacrifice accessibility for simplicity (clear labels and ARIA still required)
9999+- Make things so simple they are unclear (mystery equals minimalism)
100100+- Remove information users need to make decisions
101101+- Eliminate hierarchy completely (some things should stand out)
102102+- Oversimplify complex domains (match complexity to actual task complexity)
103103+104104+## Verify Simplification
105105+106106+Ensure simplification improves usability.
107107+108108+- **Faster task completion**: Can users accomplish goals more quickly?
109109+- **Reduced cognitive load**: Is it easier to understand what to do?
110110+- **Still complete**: Are all necessary features still accessible?
111111+- **Clearer hierarchy**: Is it obvious what matters most?
112112+- **Better performance**: Does simpler design load faster?
113113+114114+## Document Removed Complexity
115115+116116+If you removed features or options:
117117+- Document why they were removed
118118+- Consider if they need alternative access points
119119+- Note any user feedback to monitor
120120+121121+Remember: You have great taste and judgment. Simplification is an act of confidence: knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupery said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."
+94
skills/extract/SKILL.md
···11+---
22+name: extract
33+description: "Extract and consolidate reusable components, design tokens, and patterns into your design system. Identifies opportunities for systematic reuse and enriches your component library. Use when the user asks to create components, refactor repeated UI patterns, build a design system, or extract tokens."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Identify reusable patterns, components, and design tokens, then extract and consolidate them into the design system for systematic reuse.
99+1010+## Discover
1111+1212+Analyze the target area to identify extraction opportunities.
1313+1414+### 1. Find the design system
1515+Locate your design system, component library, or shared UI directory (grep for "design system", "ui", "components", etc.). Understand its structure:
1616+- Component organization and naming conventions
1717+- Design token structure (if any)
1818+- Documentation patterns
1919+- Import and export conventions
2020+2121+**CRITICAL**: If no design system exists, ask before creating one. Understand the preferred location and structure first.
2222+2323+### 2. Identify patterns
2424+Look for:
2525+- **Repeated components**: Similar UI patterns used multiple times (buttons, cards, inputs, etc.)
2626+- **Hard-coded values**: Colors, spacing, typography, shadows that should be tokens
2727+- **Inconsistent variations**: Multiple implementations of the same concept (3 different button styles)
2828+- **Reusable patterns**: Layout patterns, composition patterns, interaction patterns worth systematizing
2929+3030+### 3. Assess value
3131+Not everything should be extracted. Consider:
3232+- Is this used 3+ times, or likely to be reused?
3333+- Would systematizing this improve consistency?
3434+- Is this a general pattern or context-specific?
3535+- What is the maintenance cost vs benefit?
3636+3737+## Plan Extraction
3838+3939+Create a systematic extraction plan.
4040+4141+- **Components to extract**: Which UI elements become reusable components?
4242+- **Tokens to create**: Which hard-coded values become design tokens?
4343+- **Variants to support**: What variations does each component need?
4444+- **Naming conventions**: Component names, token names, prop names that match existing patterns
4545+- **Migration path**: How to refactor existing uses to consume the new shared versions
4646+4747+**IMPORTANT**: Design systems grow incrementally. Extract what is clearly reusable now, not everything that might someday be reusable.
4848+4949+## Extract and Enrich
5050+5151+Build improved, reusable versions.
5252+5353+- **Components**: Create well-designed components with:
5454+ - Clear props API with sensible defaults
5555+ - Proper variants for different use cases
5656+ - Accessibility built in (ARIA, keyboard navigation, focus management)
5757+ - Documentation and usage examples
5858+5959+- **Design tokens**: Create tokens with:
6060+ - Clear naming (primitive vs semantic)
6161+ - Proper hierarchy and organization
6262+ - Documentation of when to use each token
6363+6464+- **Patterns**: Document patterns with:
6565+ - When to use this pattern
6666+ - Code examples
6767+ - Variations and combinations
6868+6969+**NEVER**:
7070+- Extract one-off, context-specific implementations without generalization
7171+- Create components so generic they are useless
7272+- Extract without considering existing design system conventions
7373+- Skip proper TypeScript types or prop documentation
7474+- Create tokens for every single value (tokens should have semantic meaning)
7575+7676+## Migrate
7777+7878+Replace existing uses with the new shared versions.
7979+8080+- **Find all instances**: Search for the patterns you have extracted
8181+- **Replace systematically**: Update each use to consume the shared version
8282+- **Test thoroughly**: Ensure visual and functional parity
8383+- **Delete dead code**: Remove the old implementations
8484+8585+## Document
8686+8787+Update design system documentation.
8888+8989+- Add new components to the component library
9090+- Document token usage and values
9191+- Add examples and guidelines
9292+- Update any Storybook or component catalog
9393+9494+Remember: A good design system is a living system. Extract patterns as they emerge, enrich them thoughtfully, and maintain them consistently.
+147
skills/frontend-design/SKILL.md
···11+---
22+name: frontend-design
33+description: "Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context."
44+license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
55+---
66+77+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.
88+99+## Context Gathering Protocol
1010+1111+Design skills produce generic output without project context. You MUST have confirmed design context before doing any design work.
1212+1313+**Required context** — every design skill needs at minimum:
1414+- **Target audience**: Who uses this product and in what context?
1515+- **Use cases**: What jobs are they trying to get done?
1616+- **Brand personality or tone**: How should the interface feel?
1717+1818+Individual skills may require additional context. Check the skill preparation section for specifics.
1919+2020+**CRITICAL**: You cannot infer this context by reading the codebase. Code tells you what was built, not who it is for or what it should feel like. Only the creator can provide this context.
2121+2222+**Gathering order:**
2323+1. **Check current instructions (instant)**: If your loaded instructions already contains a Design Context section, proceed immediately.
2424+2. **Check .impeccable.md (fast)**: If not in instructions, read `.impeccable.md` from the project root. If it exists and contains the required context, proceed.
2525+3. **Run teach-impeccable (REQUIRED)**: If neither source has context, you MUST run {{command_prefix}}teach-impeccable NOW before doing anything else. Do NOT skip this step. Do NOT attempt to infer context from the codebase instead.
2626+2727+---
2828+2929+## Design Direction
3030+3131+Commit to a BOLD aesthetic direction:
3232+- **Purpose**: What problem does this interface solve? Who uses it?
3333+- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic or natural, luxury or refined, playful or toy-like, editorial or magazine, brutalist or raw, art deco or geometric, soft or pastel, industrial or utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
3434+- **Constraints**: Technical requirements (framework, performance, accessibility).
3535+- **Differentiation**: What makes this UNFORGETTABLE? What is the one thing someone will remember?
3636+3737+**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work. The key is intentionality, not intensity.
3838+3939+Then implement working code that is:
4040+- Production-grade and functional
4141+- Visually striking and memorable
4242+- Cohesive with a clear aesthetic point of view
4343+- Meticulously refined in every detail
4444+4545+## Frontend Aesthetics Guidelines
4646+4747+### Typography
4848+> *Consult [typography reference](reference/typography.md) for scales, pairing, and loading strategies.*
4949+5050+Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font.
5151+5252+**DO**: Use a modular type scale with fluid sizing (clamp)
5353+**DO**: Vary font weights and sizes to create clear visual hierarchy
5454+**DON'T**: Use overused fonts: Inter, Roboto, Arial, Open Sans, system defaults
5555+**DON'T**: Use monospace typography as lazy shorthand for "technical or developer" vibes
5656+**DON'T**: Put large icons with rounded corners above every heading. They rarely add value and make sites look templated
5757+5858+### Color and Theme
5959+> *Consult [color reference](reference/color-and-contrast.md) for OKLCH, palettes, and dark mode.*
6060+6161+Commit to a cohesive palette. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
6262+6363+**DO**: Use modern CSS color functions (oklch, color-mix, light-dark) for perceptually uniform, maintainable palettes
6464+**DO**: Tint your neutrals toward your brand hue. Even a subtle hint creates subconscious cohesion
6565+**DON'T**: Use gray text on colored backgrounds. It looks washed out. Use a shade of the background color instead.
6666+**DON'T**: Use pure black (#000) or pure white (#fff). Always tint. Pure black or white never appears in nature.
6767+**DON'T**: Use the AI color palette: cyan on dark, purple to blue gradients, neon accents on dark backgrounds
6868+**DON'T**: Use gradient text for "impact". Especially on metrics or headings. It is decorative rather than meaningful.
6969+**DON'T**: Default to dark mode with glowing accents. It looks "cool" without requiring actual design decisions.
7070+7171+### Layout and Space
7272+> *Consult [spatial reference](reference/spatial-design.md) for grids, rhythm, and container queries.*
7373+7474+Create visual rhythm through varied spacing. Not the same padding everywhere. Embrace asymmetry and unexpected compositions. Break the grid intentionally for emphasis.
7575+7676+**DO**: Create visual rhythm through varied spacing: tight groupings, generous separations
7777+**DO**: Use fluid spacing with clamp() that breathes on larger screens
7878+**DO**: Use asymmetry and unexpected compositions. Break the grid intentionally for emphasis.
7979+**DON'T**: Wrap everything in cards. Not everything needs a container.
8080+**DON'T**: Nest cards inside cards. Visual noise. Flatten the hierarchy.
8181+**DON'T**: Use identical card grids. Same-sized cards with icon, heading, text, repeated endlessly.
8282+**DON'T**: Use the hero metric layout template. Big number, small label, supporting stats, gradient accent.
8383+**DON'T**: Center everything. Left-aligned text with asymmetric layouts feels more designed.
8484+**DON'T**: Use the same spacing everywhere. Without rhythm, layouts feel monotonous.
8585+8686+### Visual Details
8787+**DO**: Use intentional, purposeful decorative elements that reinforce brand.
8888+**DON'T**: Use glassmorphism everywhere. Blur effects, glass cards, glow borders used decoratively rather than purposefully.
8989+**DON'T**: Use rounded elements with thick colored border on one side. A lazy accent that almost never looks intentional.
9090+**DON'T**: Use sparklines as decoration. Tiny charts that look sophisticated but convey nothing meaningful.
9191+**DON'T**: Use rounded rectangles with generic drop shadows. Safe, forgettable, could be any AI output.
9292+**DON'T**: Use modals unless there is truly no better alternative. Modals are lazy.
9393+9494+### Motion
9595+> *Consult [motion reference](reference/motion-design.md) for timing, easing, and reduced motion.*
9696+9797+Focus on high-impact moments. One well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions.
9898+9999+**DO**: Use motion to convey state changes: entrances, exits, feedback
100100+**DO**: Use exponential easing (ease-out-quart, quint, or expo) for natural deceleration
101101+**DO**: For height animations, use grid-template-rows transitions instead of animating height directly.
102102+**DON'T**: Animate layout properties (width, height, padding, margin). Use transform and opacity only.
103103+**DON'T**: Use bounce or elastic easing. They feel dated and tacky. Real objects decelerate smoothly.
104104+105105+### Interaction
106106+> *Consult [interaction reference](reference/interaction-design.md) for forms, focus, and loading patterns.*
107107+108108+Make interactions feel fast. Use optimistic UI: update immediately, sync later.
109109+110110+**DO**: Use progressive disclosure. Start simple, reveal sophistication through interaction (basic options first, advanced behind expandable sections; hover states that reveal secondary actions).
111111+**DO**: Design empty states that teach the interface, not just say "nothing here"
112112+**DO**: Make every interactive surface feel intentional and responsive.
113113+**DON'T**: Repeat the same information. Redundant headers, intros that restate the heading.
114114+**DON'T**: Make every button primary. Use ghost buttons, text links, secondary styles. Hierarchy matters.
115115+116116+### Responsive
117117+> *Consult [responsive reference](reference/responsive-design.md) for mobile-first, fluid design, and container queries.*
118118+119119+**DO**: Use container queries (@container) for component-level responsiveness
120120+**DO**: Adapt the interface for different contexts. Do not just shrink it.
121121+**DON'T**: Hide critical functionality on mobile. Adapt the interface, do not amputate it.
122122+123123+### UX Writing
124124+> *Consult [ux-writing reference](reference/ux-writing.md) for labels, errors, and empty states.*
125125+126126+**DO**: Make every word earn its place.
127127+**DON'T**: Repeat information users can already see.
128128+129129+---
130130+131131+## The AI Slop Test
132132+133133+**Critical quality check**: If you showed this interface to someone and said "AI made this," would they believe you immediately? If yes, that is the problem.
134134+135135+A distinctive interface should make someone ask "how was this made?" not "which AI made this?"
136136+137137+Review the DO NOT guidelines above. They are the fingerprints of AI-generated work from 2024-2025.
138138+139139+---
140140+141141+## Implementation Principles
142142+143143+Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details.
144144+145145+Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices across generations.
146146+147147+Remember: {{model}} is capable of extraordinary creative work. Do not hold back. Show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
···11+# Color and Contrast
22+33+## Color Spaces: Use OKLCH
44+55+**Stop using HSL.** Use OKLCH (or LCH) instead. It is perceptually uniform, meaning equal steps in lightness look equal. Unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
66+77+```css
88+/* OKLCH: lightness (0-100%), chroma (0-0.4+), hue (0-360) */
99+--color-primary: oklch(60% 0.15 250); /* Blue */
1010+--color-primary-light: oklch(85% 0.08 250); /* Same hue, lighter */
1111+--color-primary-dark: oklch(35% 0.12 250); /* Same hue, darker */
1212+```
1313+1414+**Key insight**: As you move toward white or black, reduce chroma (saturation). High chroma at extreme lightness looks garish. A light blue at 85% lightness needs approximately 0.08 chroma, not the 0.15 of your base color.
1515+1616+## Building Functional Palettes
1717+1818+### The Tinted Neutral Trap
1919+2020+**Pure gray is dead.** Add a subtle hint of your brand hue to all neutrals:
2121+2222+```css
2323+/* Dead grays */
2424+--gray-100: oklch(95% 0 0); /* No personality */
2525+--gray-900: oklch(15% 0 0);
2626+2727+/* Warm-tinted grays (add brand warmth) */
2828+--gray-100: oklch(95% 0.01 60); /* Hint of warmth */
2929+--gray-900: oklch(15% 0.01 60);
3030+3131+/* Cool-tinted grays (tech, professional) */
3232+--gray-100: oklch(95% 0.01 250); /* Hint of blue */
3333+--gray-900: oklch(15% 0.01 250);
3434+```
3535+3636+The chroma is tiny (0.01) but perceptible. It creates subconscious cohesion between your brand color and your UI.
3737+3838+### Palette Structure
3939+4040+A complete system needs:
4141+4242+| Role | Purpose | Example |
4343+|------|---------|---------|
4444+| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
4545+| **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
4646+| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
4747+| **Surface** | Cards, modals, overlays | 2-3 elevation levels |
4848+4949+**Skip secondary or tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
5050+5151+### The 60-30-10 Rule (Applied Correctly)
5252+5353+This rule is about **visual weight**, not pixel count:
5454+5555+- **60%**: Neutral backgrounds, white space, base surfaces
5656+- **30%**: Secondary colors. Text, borders, inactive states.
5757+- **10%**: Accent. CTAs, highlights, focus states.
5858+5959+The common mistake: using the accent color everywhere because it is "the brand color." Accent colors work because they are rare. Overuse kills their power.
6060+6161+## Contrast and Accessibility
6262+6363+### WCAG Requirements
6464+6565+| Content Type | AA Minimum | AAA Target |
6666+|--------------|------------|------------|
6767+| Body text | 4.5:1 | 7:1 |
6868+| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
6969+| UI components, icons | 3:1 | 4.5:1 |
7070+| Non-essential decorations | None | None |
7171+7272+**The gotcha**: Placeholder text still needs 4.5:1. That light gray placeholder you see everywhere? Usually fails WCAG.
7373+7474+### Dangerous Color Combinations
7575+7676+These commonly fail contrast or cause readability issues:
7777+7878+- Light gray text on white (the number 1 accessibility fail)
7979+- **Gray text on any colored background.** Gray looks washed out and dead on color. Use a darker shade of the background color, or transparency.
8080+- Red text on green background (or vice versa). 8% of men cannot distinguish these.
8181+- Blue text on red background (vibrates visually)
8282+- Yellow text on white (almost always fails)
8383+- Thin light text on images (unpredictable contrast)
8484+8585+### Never Use Pure Gray or Pure Black
8686+8787+Pure gray (oklch(50% 0 0)) and pure black (#000) do not exist in nature. Real shadows and surfaces always have a color cast. Even a chroma of 0.005-0.01 is enough to feel natural without being obviously tinted. (See tinted neutrals example above.)
8888+8989+### Testing
9090+9191+Do not trust your eyes. Use tools:
9292+9393+- WebAIM Contrast Checker
9494+- Browser DevTools. Rendering. Emulate vision deficiencies.
9595+- Polypane for real-time testing.
9696+9797+## Theming: Light and Dark Mode
9898+9999+### Dark Mode Is Not Inverted Light Mode
100100+101101+You cannot just swap colors. Dark mode requires different design decisions:
102102+103103+| Light Mode | Dark Mode |
104104+|------------|-----------|
105105+| Shadows for depth | Lighter surfaces for depth (no shadows) |
106106+| Dark text on light | Light text on dark (reduce font weight) |
107107+| Vibrant accents | Desaturate accents slightly |
108108+| White backgrounds | Never pure black. Use dark gray (oklch 12-18%) |
109109+110110+```css
111111+/* Dark mode depth via surface color, not shadow */
112112+:root[data-theme="dark"] {
113113+ --surface-1: oklch(15% 0.01 250);
114114+ --surface-2: oklch(20% 0.01 250); /* "Higher" = lighter */
115115+ --surface-3: oklch(25% 0.01 250);
116116+117117+ /* Reduce text weight slightly */
118118+ --body-weight: 350; /* Instead of 400 */
119119+}
120120+```
121121+122122+### Token Hierarchy
123123+124124+Use two layers: primitive tokens (--blue-500) and semantic tokens (--color-primary: var(--blue-500)). For dark mode, only redefine the semantic layer. Primitives stay the same.
125125+126126+## Alpha Is A Design Smell
127127+128128+Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
129129+130130+---
131131+132132+**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Using pure black (#000) for large areas. Skipping color blindness testing (8% of men affected).
···11+# Interaction Design
22+33+## The Eight Interactive States
44+55+Every interactive element needs these states designed:
66+77+| State | When | Visual Treatment |
88+|-------|------|------------------|
99+| **Default** | At rest | Base styling |
1010+| **Hover** | Pointer over (not touch) | Subtle lift, color shift |
1111+| **Focus** | Keyboard or programmatic focus | Visible ring (see below) |
1212+| **Active** | Being pressed | Pressed in, darker |
1313+| **Disabled** | Not interactive | Reduced opacity, no pointer |
1414+| **Loading** | Processing | Spinner, skeleton |
1515+| **Error** | Invalid state | Red border, icon, message |
1616+| **Success** | Completed | Green check, confirmation |
1717+1818+**The common miss**: Designing hover without focus, or vice versa. They are different. Keyboard users never see hover states.
1919+2020+## Focus Rings: Do Them Right
2121+2222+**Never outline: none without replacement.** It is an accessibility violation. Instead, use :focus-visible to show focus only for keyboard users:
2323+2424+```css
2525+/* Hide focus ring for mouse or touch */
2626+button:focus {
2727+ outline: none;
2828+}
2929+3030+/* Show focus ring for keyboard */
3131+button:focus-visible {
3232+ outline: 2px solid var(--color-accent);
3333+ outline-offset: 2px;
3434+}
3535+```
3636+3737+**Focus ring design**:
3838+- High contrast (3:1 minimum against adjacent colors)
3939+- 2-3px thick
4040+- Offset from element (not inside it)
4141+- Consistent across all interactive elements
4242+4343+## Form Design: The Non-Obvious
4444+4545+**Placeholders are not labels.** They disappear on input. Always use visible label elements. **Validate on blur**, not on every keystroke (exception: password strength). Place errors **below** fields with aria-describedby connecting them.
4646+4747+## Loading States
4848+4949+**Optimistic updates**: Show success immediately, rollback on failure. Use for low-stakes actions (likes, follows), not payments or destructive actions. **Skeleton screens greater than spinners.** They preview content shape and feel faster than generic spinners.
5050+5151+## Modals: The Inert Approach
5252+5353+Focus trapping in modals used to require complex JavaScript. Now use the inert attribute:
5454+5555+```html
5656+<!-- When modal is open -->
5757+<main inert>
5858+ <!-- Content behind modal cannot be focused or clicked -->
5959+</main>
6060+<dialog open>
6161+ <h2>Modal Title</h2>
6262+ <!-- Focus stays inside modal -->
6363+</dialog>
6464+```
6565+6666+Or use the native dialog element:
6767+6868+```javascript
6969+const dialog = document.querySelector('dialog');
7070+dialog.showModal(); // Opens with focus trap, closes on Escape
7171+```
7272+7373+## The Popover API
7474+7575+For tooltips, dropdowns, and non-modal overlays, use native popovers:
7676+7777+```html
7878+<button popovertarget="menu">Open menu</button>
7979+<div id="menu" popover>
8080+ <button>Option 1</button>
8181+ <button>Option 2</button>
8282+</div>
8383+```
8484+8585+**Benefits**: Light-dismiss (click outside closes), proper stacking, no z-index wars, accessible by default.
8686+8787+## Dropdown and Overlay Positioning
8888+8989+Dropdowns rendered with position: absolute inside a container that has overflow: hidden or overflow: auto will be clipped. This is the single most common dropdown bug in generated code.
9090+9191+### CSS Anchor Positioning
9292+9393+The modern solution uses the CSS Anchor Positioning API to tether an overlay to its trigger without JavaScript:
9494+9595+```css
9696+.trigger {
9797+ anchor-name: --menu-trigger;
9898+}
9999+100100+.dropdown {
101101+ position: fixed;
102102+ position-anchor: --menu-trigger;
103103+ position-area: block-end span-inline-end;
104104+ margin-top: 4px;
105105+}
106106+107107+/* Flip above if no room below */
108108+@position-try --flip-above {
109109+ position-area: block-start span-inline-end;
110110+ margin-bottom: 4px;
111111+}
112112+```
113113+114114+Because the dropdown uses position: fixed, it escapes any overflow clipping on ancestor elements. The @position-try block handles viewport edges automatically. **Browser support**: Chrome 125+, Edge 125+. Not yet in Firefox or Safari. Use a fallback for those browsers.
115115+116116+### Popover + Anchor Combo
117117+118118+Combining the Popover API with anchor positioning gives you stacking, light-dismiss, accessibility, and correct positioning in one pattern:
119119+120120+```html
121121+<button popovertarget="menu" class="trigger">Open</button>
122122+<div id="menu" popover class="dropdown">
123123+ <button>Option 1</button>
124124+ <button>Option 2</button>
125125+</div>
126126+```
127127+128128+The popover attribute places the element in the **top layer**, which sits above all other content regardless of z-index or overflow. No portal needed.
129129+130130+### Portal / Teleport Pattern
131131+132132+In component frameworks, render the dropdown at the document root and position it with JavaScript:
133133+134134+- **React**: createPortal(dropdown, document.body)
135135+- **Vue**: Teleport to="body"
136136+- **Svelte**: Use a portal library or mount to document.body
137137+138138+Calculate position from the trigger getBoundingClientRect(), then apply position: fixed with top and left values. Recalculate on scroll and resize.
139139+140140+### Fixed Positioning Fallback
141141+142142+For browsers without anchor positioning support, position: fixed with manual coordinates avoids overflow clipping:
143143+144144+```css
145145+.dropdown {
146146+ position: fixed;
147147+ /* top/left set via JS from trigger getBoundingClientRect() */
148148+}
149149+```
150150+151151+Check viewport boundaries before rendering. If the dropdown would overflow the bottom edge, flip it above the trigger. If it would overflow the right edge, align it to the trigger right side instead.
152152+153153+### Anti-Patterns
154154+155155+- **position: absolute inside overflow: hidden.** The dropdown will be clipped. Use position: fixed or the top layer instead.
156156+- **Arbitrary z-index values** like z-index: 9999. Use a semantic z-index scale: dropdown (100), sticky (200), modal-backdrop (300), modal (400), toast (500), tooltip (600).
157157+- **Rendering dropdown markup inline** without an escape hatch from the parent stacking context. Either use popover (top layer), a portal, or position: fixed.
158158+159159+## Destructive Actions: Undo Greater Than Confirm
160160+161161+**Undo is better than confirmation dialogs.** Users click through confirmations mindlessly. Remove from UI immediately, show undo toast, actually delete after toast expires. Use confirmation only for truly irreversible actions (account deletion), high-cost actions, or batch operations.
162162+163163+## Keyboard Navigation Patterns
164164+165165+### Roving Tabindex
166166+167167+For component groups (tabs, menu items, radio groups), one item is tabbable. Arrow keys move within:
168168+169169+```html
170170+<div role="tablist">
171171+ <button role="tab" tabindex="0">Tab 1</button>
172172+ <button role="tab" tabindex="-1">Tab 2</button>
173173+ <button role="tab" tabindex="-1">Tab 3</button>
174174+</div>
175175+```
176176+177177+Arrow keys move tabindex="0" between items. Tab moves to the next component entirely.
178178+179179+### Skip Links
180180+181181+Provide skip links (a href="#main-content" Skip to main content) for keyboard users to jump past navigation. Hide off-screen, show on focus.
182182+183183+## Gesture Discoverability
184184+185185+Swipe-to-delete and similar gestures are invisible. Hint at their existence:
186186+187187+- **Partially reveal**: Show delete button peeking from edge
188188+- **Onboarding**: Coach marks on first use
189189+- **Alternative**: Always provide a visible fallback (menu with "Delete")
190190+191191+Do not rely on gestures as the only way to perform actions.
192192+193193+---
194194+195195+**Avoid**: Removing focus indicators without alternatives. Using placeholder text as labels. Touch targets less than 44x44px. Generic error messages. Custom controls without ARIA or keyboard support.
+99
skills/frontend-design/reference/motion-design.md
···11+# Motion Design
22+33+## Duration: The 100/300/500 Rule
44+55+Timing matters more than easing. These durations feel right for most UI:
66+77+| Duration | Use Case | Examples |
88+|----------|----------|----------|
99+| **100-150ms** | Instant feedback | Button press, toggle, color change |
1010+| **200-300ms** | State changes | Menu open, tooltip, hover states |
1111+| **300-500ms** | Layout changes | Accordion, modal, drawer |
1212+| **500-800ms** | Entrance animations | Page load, hero reveals |
1313+1414+**Exit animations are faster than entrances.** Use approximately 75% of enter duration.
1515+1616+## Easing: Pick the Right Curve
1717+1818+**Do not use ease.** It is a compromise that is rarely optimal. Instead:
1919+2020+| Curve | Use For | CSS |
2121+|-------|---------|-----|
2222+| **ease-out** | Elements entering | cubic-bezier(0.16, 1, 0.3, 1) |
2323+| **ease-in** | Elements leaving | cubic-bezier(0.7, 0, 0.84, 0) |
2424+| **ease-in-out** | State toggles (there and back) | cubic-bezier(0.65, 0, 0.35, 1) |
2525+2626+**For micro-interactions, use exponential curves.** They feel natural because they mimic real physics (friction, deceleration):
2727+2828+```css
2929+/* Quart out - smooth, refined (recommended default) */
3030+--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
3131+3232+/* Quint out - slightly more dramatic */
3333+--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
3434+3535+/* Expo out - snappy, confident */
3636+--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
3737+```
3838+3939+**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects do not bounce when they stop. They decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
4040+4141+## The Only Two Properties You Should Animate
4242+4343+**transform** and **opacity** only. Everything else causes layout recalculations. For height animations (accordions), use grid-template-rows: 0fr to 1fr instead of animating height directly.
4444+4545+## Staggered Animations
4646+4747+Use CSS custom properties for cleaner stagger: animation-delay: calc(var(--i, 0) times 50ms) with style="--i: 0" on each item. **Cap total stagger time.** 10 items at 50ms equals 500ms total. For many items, reduce per-item delay or cap staggered count.
4848+4949+## Reduced Motion
5050+5151+This is not optional. Vestibular disorders affect approximately 35% of adults over 40.
5252+5353+```css
5454+/* Define animations normally */
5555+.card {
5656+ animation: slide-up 500ms ease-out;
5757+}
5858+5959+/* Provide alternative for reduced motion */
6060+@media (prefers-reduced-motion: reduce) {
6161+ .card {
6262+ animation: fade-in 200ms ease-out; /* Crossfade instead of motion */
6363+ }
6464+}
6565+6666+/* Or disable entirely */
6767+@media (prefers-reduced-motion: reduce) {
6868+ *, *::before, *::after {
6969+ animation-duration: 0.01ms !important;
7070+ transition-duration: 0.01ms !important;
7171+ }
7272+}
7373+```
7474+7575+**What to preserve**: Functional animations like progress bars, loading spinners (slowed down), and focus indicators should still work. Just without spatial movement.
7676+7777+## Perceived Performance
7878+7979+**Nobody cares how fast your site is. Just how fast it feels.** Perception can be as effective as actual performance.
8080+8181+**The 80ms threshold**: Our brains buffer sensory input for approximately 80ms to synchronize perception. Anything under 80ms feels instant and simultaneous. This is your target for micro-interactions.
8282+8383+**Active vs passive time**: Passive waiting (staring at a spinner) feels longer than active engagement. Strategies to shift the balance:
8484+8585+- **Preemptive start**: Begin transitions immediately while loading (iOS app zoom, skeleton UI). Users perceive work happening.
8686+- **Early completion**: Show content progressively. Do not wait for everything. Video buffering, progressive images, streaming HTML.
8787+- **Optimistic UI**: Update the interface immediately, handle failures gracefully. Instagram likes work offline. The UI updates instantly, syncs later. Use for low-stakes actions. Avoid for payments or destructive operations.
8888+8989+**Easing affects perceived duration**: Ease-in (accelerating toward completion) makes tasks feel shorter because the peak-end effect weights final moments heavily. Ease-out feels satisfying for entrances, but ease-in toward a task end compresses perceived time.
9090+9191+**Caution**: Too-fast responses can decrease perceived value. Users may distrust instant results for complex operations (search, analysis). Sometimes a brief delay signals "real work" is happening.
9292+9393+## Performance
9494+9595+Do not use will-change preemptively. Only when animation is imminent (hover, .animating). For scroll-triggered animations, use Intersection Observer instead of scroll events. Unobserve after animating once. Create motion tokens for consistency (durations, easings, common transitions).
9696+9797+---
9898+9999+**Avoid**: Animating everything (animation fatigue is real). Using more than 500ms for UI feedback. Ignoring prefers-reduced-motion. Using animation to hide slow loading.
···11+# Responsive Design
22+33+## Mobile-First: Write It Right
44+55+Start with base styles for mobile, use min-width queries to layer complexity. Desktop-first (max-width) means mobile loads unnecessary styles first.
66+77+## Breakpoints: Content-Driven
88+99+Do not chase device sizes. Let content tell you where to break. Start narrow, stretch until design breaks, add breakpoint there. Three breakpoints usually suffice (640, 768, 1024px). Use clamp() for fluid values without breakpoints.
1010+1111+## Detect Input Method, Not Just Screen Size
1212+1313+**Screen size does not tell you input method.** A laptop with touchscreen, a tablet with keyboard. Use pointer and hover queries:
1414+1515+```css
1616+/* Fine pointer (mouse, trackpad) */
1717+@media (pointer: fine) {
1818+ .button { padding: 8px 16px; }
1919+}
2020+2121+/* Coarse pointer (touch, stylus) */
2222+@media (pointer: coarse) {
2323+ .button { padding: 12px 20px; } /* Larger touch target */
2424+}
2525+2626+/* Device supports hover */
2727+@media (hover: hover) {
2828+ .card:hover { transform: translateY(-2px); }
2929+}
3030+3131+/* Device does not support hover (touch) */
3232+@media (hover: none) {
3333+ .card { /* No hover state - use active instead */ }
3434+}
3535+```
3636+3737+**Critical**: Do not rely on hover for functionality. Touch users cannot hover.
3838+3939+## Safe Areas: Handle the Notch
4040+4141+Modern phones have notches, rounded corners, and home indicators. Use env():
4242+4343+```css
4444+body {
4545+ padding-top: env(safe-area-inset-top);
4646+ padding-bottom: env(safe-area-inset-bottom);
4747+ padding-left: env(safe-area-inset-left);
4848+ padding-right: env(safe-area-inset-right);
4949+}
5050+5151+/* With fallback */
5252+.footer {
5353+ padding-bottom: max(1rem, env(safe-area-inset-bottom));
5454+}
5555+```
5656+5757+**Enable viewport-fit** in your meta tag:
5858+```html
5959+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6060+```
6161+6262+## Responsive Images: Get It Right
6363+6464+### srcset with Width Descriptors
6565+6666+```html
6767+<img
6868+ src="hero-800.jpg"
6969+ srcset="
7070+ hero-400.jpg 400w,
7171+ hero-800.jpg 800w,
7272+ hero-1200.jpg 1200w
7373+ "
7474+ sizes="(max-width: 768px) 100vw, 50vw"
7575+ alt="Hero image"
7676+>
7777+```
7878+7979+**How it works**:
8080+- srcset lists available images with their actual widths (w descriptors)
8181+- sizes tells the browser how wide the image will display
8282+- Browser picks the best file based on viewport width AND device pixel ratio
8383+8484+### Picture Element for Art Direction
8585+8686+When you need different crops or compositions (not just resolutions):
8787+8888+```html
8989+<picture>
9090+ <source media="(min-width: 768px)" srcset="wide.jpg">
9191+ <source media="(max-width: 767px)" srcset="tall.jpg">
9292+ <img src="fallback.jpg" alt="...">
9393+</picture>
9494+```
9595+9696+## Layout Adaptation Patterns
9797+9898+**Navigation**: Three stages: hamburger and drawer on mobile, horizontal compact on tablet, full with labels on desktop. **Tables**: Transform to cards on mobile using display: block and data-label attributes. **Progressive disclosure**: Use details or summary for content that can collapse on mobile.
9999+100100+## Testing: Do Not Trust DevTools Alone
101101+102102+DevTools device emulation is useful for layout but misses:
103103+104104+- Actual touch interactions
105105+- Real CPU/memory constraints
106106+- Network latency patterns
107107+- Font rendering differences
108108+- Browser chrome or keyboard appearances
109109+110110+**Test on at least**: One real iPhone, one real Android, a tablet if relevant. Cheap Android phones reveal performance issues you will never see on simulators.
111111+112112+---
113113+114114+**Avoid**: Desktop-first design. Device detection instead of feature detection. Separate mobile or desktop codebases. Ignoring tablet and landscape. Assuming all mobile devices are powerful.
···11+# Spatial Design
22+33+## Spacing Systems
44+55+### Use 4pt Base, Not 8pt
66+77+8pt systems are too coarse. You will frequently need 12px (between 8 and 16). Use 4pt for granularity: 4, 8, 12, 16, 24, 32, 48, 64, 96px.
88+99+### Name Tokens Semantically
1010+1111+Name by relationship (--space-sm, --space-lg), not value (--spacing-8). Use gap instead of margins for sibling spacing. It eliminates margin collapse and cleanup hacks.
1212+1313+## Grid Systems
1414+1515+### The Self-Adjusting Grid
1616+1717+Use repeat(auto-fit, minmax(280px, 1fr)) for responsive grids without breakpoints. Columns are at least 280px, as many as fit per row, leftovers stretch. For complex layouts, use named grid areas (grid-template-areas) and redefine them at breakpoints.
1818+1919+## Visual Hierarchy
2020+2121+### The Squint Test
2222+2323+Blur your eyes (or screenshot and blur). Can you still identify:
2424+- The most important element?
2525+- The second most important?
2626+- Clear groupings?
2727+2828+If everything looks the same weight blurred, you have a hierarchy problem.
2929+3030+### Hierarchy Through Multiple Dimensions
3131+3232+Do not rely on size alone. Combine:
3333+3434+| Tool | Strong Hierarchy | Weak Hierarchy |
3535+|------|------------------|----------------|
3636+| **Size** | 3:1 ratio or more | less than 2:1 ratio |
3737+| **Weight** | Bold vs Regular | Medium vs Regular |
3838+| **Color** | High contrast | Similar tones |
3939+| **Position** | Top or left (primary) | Bottom or right |
4040+| **Space** | Surrounded by white space | Crowded |
4141+4242+**The best hierarchy uses 2-3 dimensions at once**: A heading that is larger, bolder, AND has more space above it.
4343+4444+### Cards Are Not Required
4545+4646+Cards are overused. Spacing and alignment create visual grouping naturally. Use cards only when content is truly distinct and actionable, items need visual comparison in a grid, or content needs clear interaction boundaries. **Never nest cards inside cards.** Use spacing, typography, and subtle dividers for hierarchy within a card.
4747+4848+## Container Queries
4949+5050+Viewport queries are for page layouts. **Container queries are for components**:
5151+5252+```css
5353+.card-container {
5454+ container-type: inline-size;
5555+}
5656+5757+.card {
5858+ display: grid;
5959+ gap: var(--space-md);
6060+}
6161+6262+/* Card layout changes based on its container, not viewport */
6363+@container (min-width: 400px) {
6464+ .card {
6565+ grid-template-columns: 120px 1fr;
6666+ }
6767+}
6868+```
6969+7070+**Why this matters**: A card in a narrow sidebar stays compact, while the same card in a main content area expands. Automatically, without viewport hacks.
7171+7272+## Optical Adjustments
7373+7474+Text at margin-left: 0 looks indented due to letterform whitespace. Use negative margin (-0.05em) to optically align. Geometrically centered icons often look off-center. Play icons need to shift right, arrows shift toward their direction.
7575+7676+### Touch Targets vs Visual Size
7777+7878+Buttons can look small but need large touch targets (44px minimum). Use padding or pseudo-elements:
7979+8080+```css
8181+.icon-button {
8282+ width: 24px; /* Visual size */
8383+ height: 24px;
8484+ position: relative;
8585+}
8686+8787+.icon-button::before {
8888+ content: '';
8989+ position: absolute;
9090+ inset: -10px; /* Expand tap target to 44px */
9191+}
9292+```
9393+9494+## Depth and Elevation
9595+9696+Create semantic z-index scales (dropdown, sticky, modal-backdrop, modal, toast, tooltip) instead of arbitrary numbers. For shadows, create a consistent elevation scale (sm, md, lg, xl). **Key insight**: Shadows should be subtle. If you can clearly see it, it is probably too strong.
9797+9898+---
9999+100100+**Avoid**: Arbitrary spacing values outside your scale. Making all spacing equal (variety creates hierarchy). Creating hierarchy through size alone. Combine size, weight, color, and space.
+133
skills/frontend-design/reference/typography.md
···11+# Typography
22+33+## Classic Typography Principles
44+55+### Vertical Rhythm
66+77+Your line-height should be the base unit for ALL vertical spacing. If body text has line-height: 1.5 on 16px type (equals 24px), spacing values should be multiples of 24px. This creates subconscious harmony. Text and space share a mathematical foundation.
88+99+### Modular Scale and Hierarchy
1010+1111+The common mistake: too many font sizes that are too close together (14px, 15px, 16px, 18px...). This creates muddy hierarchy.
1212+1313+**Use fewer sizes with more contrast.** A 5-size system covers most needs:
1414+1515+| Role | Typical Ratio | Use Case |
1616+|------|---------------|----------|
1717+| xs | 0.75rem | Captions, legal |
1818+| sm | 0.875rem | Secondary UI, metadata |
1919+| base | 1rem | Body text |
2020+| lg | 1.25-1.5rem | Subheadings, lead text |
2121+| xl+ | 2-4rem | Headlines, hero text |
2222+2323+Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Pick one and commit.
2424+2525+### Readability and Measure
2626+2727+Use ch units for character-based measure (max-width: 65ch). Line-height scales inversely with line length. Narrow columns need tighter leading, wide columns need more.
2828+2929+**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height.
3030+3131+## Font Selection and Pairing
3232+3333+### Choosing Distinctive Fonts
3434+3535+**Avoid the invisible defaults**: Inter, Roboto, Open Sans, Lato, Montserrat. These are everywhere, making your design feel generic. They are fine for documentation or tools where personality is not the goal. But if you want distinctive design, look elsewhere.
3636+3737+**Better Google Fonts alternatives**:
3838+- Instead of Inter: Instrument Sans, Plus Jakarta Sans, Outfit
3939+- Instead of Roboto: Onest, Figtree, Urbanist
4040+- Instead of Open Sans: Source Sans 3, Nunito Sans, DM Sans
4141+- For editorial or premium feel: Fraunces, Newsreader, Lora
4242+4343+**System fonts are underrated**: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui looks native, loads instantly, and is highly readable. Consider this for apps where performance is greater than personality.
4444+4545+### Pairing Principles
4646+4747+**The non-obvious truth**: You often do not need a second font. One well-chosen font family in multiple weights creates cleaner hierarchy than two competing typefaces. Only add a second font when you need genuine contrast (e.g., display headlines plus body serif).
4848+4949+When pairing, contrast on multiple axes:
5050+- Serif plus Sans (structure contrast)
5151+- Geometric plus Humanist (personality contrast)
5252+- Condensed display plus Wide body (proportion contrast)
5353+5454+**Never pair fonts that are similar but not identical** (e.g., two geometric sans-serifs). They create visual tension without clear hierarchy.
5555+5656+### Web Font Loading
5757+5858+The layout shift problem: fonts load late, text reflows, and users see content jump. Here is the fix:
5959+6060+```css
6161+/* 1. Use font-display: swap for visibility */
6262+@font-face {
6363+ font-family: 'CustomFont';
6464+ src: url('font.woff2') format('woff2');
6565+ font-display: swap;
6666+}
6767+6868+/* 2. Match fallback metrics to minimize shift */
6969+@font-face {
7070+ font-family: 'CustomFont-Fallback';
7171+ src: local('Arial');
7272+ size-adjust: 105%; /* Scale to match x-height */
7373+ ascent-override: 90%; /* Match ascender height */
7474+ descent-override: 20%; /* Match descender depth */
7575+ line-gap-override: 10%; /* Match line spacing */
7676+}
7777+7878+body {
7979+ font-family: 'CustomFont', 'CustomFont-Fallback', sans-serif;
8080+}
8181+```
8282+8383+Tools like Fontaine calculate these overrides automatically.
8484+8585+## Modern Web Typography
8686+8787+### Fluid Type
8888+8989+Fluid typography via clamp(min, preferred, max) scales text smoothly with the viewport. The middle value (e.g., 5vw plus 1rem) controls scaling rate. Higher vw equals faster scaling. Add a rem offset so it does not collapse to 0 on small screens.
9090+9191+**Use fluid type for**: Headings and display text on marketing or content pages where text dominates the layout and needs to breathe across viewport sizes.
9292+9393+**Use fixed rem scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI. Fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it.
9494+9595+### OpenType Features
9696+9797+Most developers do not know these exist. Use them for polish:
9898+9999+```css
100100+/* Tabular numbers for data alignment */
101101+.data-table { font-variant-numeric: tabular-nums; }
102102+103103+/* Proper fractions */
104104+.recipe-amount { font-variant-numeric: diagonal-fractions; }
105105+106106+/* Small caps for abbreviations */
107107+abbr { font-variant-caps: all-small-caps; }
108108+109109+/* Disable ligatures in code */
110110+code { font-variant-ligatures: none; }
111111+112112+/* Enable kerning (usually on by default, but be explicit) */
113113+body { font-kerning: normal; }
114114+```
115115+116116+Check what features your font supports at Wakamai Fondue.
117117+118118+## Typography System Architecture
119119+120120+Name tokens semantically (--text-body, --text-heading), not by value (--font-size-16). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system.
121121+122122+## Accessibility Considerations
123123+124124+Beyond contrast ratios (which are well-documented), consider:
125125+126126+- **Never disable zoom**: user-scalable=no breaks accessibility. If your layout breaks at 200% zoom, fix the layout.
127127+- **Use rem or em for font sizes**: This respects user browser settings. Never px for body text.
128128+- **Minimum 16px body text**: Smaller than this strains eyes and fails WCAG on mobile.
129129+- **Adequate touch targets**: Text links need padding or line-height that creates 44px+ tap targets.
130130+131131+---
132132+133133+**Avoid**: More than 2-3 font families per project. Skipping fallback font definitions. Ignoring font loading performance (FOUT or FOIT). Using decorative fonts for body text.
+107
skills/frontend-design/reference/ux-writing.md
···11+# UX Writing
22+33+## The Button Label Problem
44+55+**Never use "OK", "Submit", or "Yes and No".** These are lazy and ambiguous. Use specific verb plus object patterns:
66+77+| Bad | Good | Why |
88+|-----|------|-----|
99+| OK | Save changes | Says what will happen |
1010+| Submit | Create account | Outcome-focused |
1111+| Yes | Delete message | Confirms the action |
1212+| Cancel | Keep editing | Clarifies what "cancel" means |
1313+| Click here | Download PDF | Describes the destination |
1414+1515+**For destructive actions**, name the destruction:
1616+- "Delete" not "Remove" (delete is permanent, remove implies recoverable)
1717+- "Delete 5 items" not "Delete selected" (show the count)
1818+1919+## Error Messages: The Formula
2020+2121+Every error message should answer: (1) What happened? (2) Why? (3) How to fix it? Example: "Email address is not valid. Please include an @" symbol." not "Invalid input".
2222+2323+### Error Message Templates
2424+2525+| Situation | Template |
2626+|-----------|----------|
2727+| **Format error** | "[Field] needs to be [format]. Example: [example]" |
2828+| **Missing required** | "Please enter [what is missing]" |
2929+| **Permission denied** | "You do not have access to [thing]. [What to do instead]" |
3030+| **Network error** | "We could not reach [thing]. Check your connection and [action]." |
3131+| **Server error** | "Something went wrong on our end. We are looking into it. [Alternative action]" |
3232+3333+### Do Not Blame the User
3434+3535+Reframe errors: "Please enter a date in MM/DD/YYYY format" not "You entered an invalid date".
3636+3737+## Empty States Are Opportunities
3838+3939+Empty states are onboarding moments: (1) Acknowledge briefly, (2) Explain the value of filling it, (3) Provide a clear action. "No projects yet. Create your first one to get started." not just "No items".
4040+4141+## Voice vs Tone
4242+4343+**Voice** is your brand personality. Consistent everywhere.
4444+**Tone** adapts to the moment.
4545+4646+| Moment | Tone Shift |
4747+|--------|------------|
4848+| Success | Celebratory, brief: "Done! Your changes are live." |
4949+| Error | Empathetic, helpful: "That did not work. Here is what to try..." |
5050+| Loading | Reassuring: "Saving your work..." |
5151+| Destructive confirm | Serious, clear: "Delete this project? This cannot be undone." |
5252+5353+**Never use humor for errors.** Users are already frustrated. Be helpful, not cute.
5454+5555+## Writing for Accessibility
5656+5757+**Link text** must have standalone meaning: "View pricing plans" not "Click here". **Alt text** describes information, not the image: "Revenue increased 40% in Q4" not "Chart". Use alt="" for decorative images. **Icon buttons** need aria-label for screen reader context.
5858+5959+## Writing for Translation
6060+6161+### Plan for Expansion
6262+6363+German text is approximately 30% longer than English. Allocate space:
6464+6565+| Language | Expansion |
6666+|----------|-----------|
6767+| German | +30% |
6868+| French | +20% |
6969+| Finnish | +30-40% |
7070+| Chinese | -30% (fewer chars, but same width) |
7171+7272+### Translation-Friendly Patterns
7373+7474+Keep numbers separate ("New messages: 3" not "You have 3 new messages"). Use full sentences as single strings (word order varies by language). Avoid abbreviations ("5 minutes ago" not "5 mins ago"). Give translators context about where strings appear.
7575+7676+## Consistency: The Terminology Problem
7777+7878+Pick one term and stick with it:
7979+8080+| Inconsistent | Consistent |
8181+|--------------|------------|
8282+| Delete / Remove / Trash | Delete |
8383+| Settings / Preferences / Options | Settings |
8484+| Sign in / Log in / Enter | Sign in |
8585+| Create / Add / New | Create |
8686+8787+Build a terminology glossary and enforce it. Variety creates confusion.
8888+8989+## Avoid Redundant Copy
9090+9191+If the heading explains it, the intro is redundant. If the button is clear, do not explain it again. Say it once, say it well.
9292+9393+## Loading States
9494+9595+Be specific: "Saving your draft..." not "Loading...". For long waits, set expectations ("This usually takes 30 seconds") or show progress.
9696+9797+## Confirmation Dialogs: Use Sparingly
9898+9999+Most confirmation dialogs are design failures. Consider undo instead. When you must confirm: name the action, explain consequences, use specific button labels ("Delete project" / "Keep project", not "Yes" / "No").
100100+101101+## Form Instructions
102102+103103+Show format with placeholders, not instructions. For non-obvious fields, explain why you are asking.
104104+105105+---
106106+107107+**Avoid**: Jargon without explanation. Blaming users ("You made an error" becomes "This field is required"). Vague errors ("Something went wrong"). Varying terminology for variety. Humor for errors.
+354
skills/harden/SKILL.md
···11+---
22+name: harden
33+description: "Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs.
99+1010+## Assess Hardening Needs
1111+1212+Identify weaknesses and edge cases.
1313+1414+### 1. Test with extreme inputs
1515+- Very long text (names, descriptions, titles)
1616+- Very short text (empty, single character)
1717+- Special characters (emoji, RTL text, accents)
1818+- Large numbers (millions, billions)
1919+- Many items (1000+ list items, 50+ options)
2020+- No data (empty states)
2121+2222+### 2. Test error scenarios
2323+- Network failures (offline, slow, timeout)
2424+- API errors (400, 401, 403, 404, 500)
2525+- Validation errors
2626+- Permission errors
2727+- Rate limiting
2828+- Concurrent operations
2929+3030+### 3. Test internationalization
3131+- Long translations (German is often 30% longer than English)
3232+- RTL languages (Arabic, Hebrew)
3333+- Character sets (Chinese, Japanese, Korean, emoji)
3434+- Date and time formats
3535+- Number formats (1,000 vs 1.000)
3636+- Currency symbols
3737+3838+**CRITICAL**: Designs that only work with perfect data are not production-ready. Harden against reality.
3939+4040+## Hardening Dimensions
4141+4242+Systematically improve resilience.
4343+4444+### Text Overflow and Wrapping
4545+4646+**Long text handling**:
4747+```css
4848+/* Single line with ellipsis */
4949+.truncate {
5050+ overflow: hidden;
5151+ text-overflow: ellipsis;
5252+ white-space: nowrap;
5353+}
5454+5555+/* Multi-line with clamp */
5656+.line-clamp {
5757+ display: -webkit-box;
5858+ -webkit-line-clamp: 3;
5959+ -webkit-box-orient: vertical;
6060+ overflow: hidden;
6161+}
6262+6363+/* Allow wrapping */
6464+.wrap {
6565+ word-wrap: break-word;
6666+ overflow-wrap: break-word;
6767+ hyphens: auto;
6868+}
6969+```
7070+7171+**Flex or Grid overflow**:
7272+```css
7373+/* Prevent flex items from overflowing */
7474+.flex-item {
7575+ min-width: 0; /* Allow shrinking below content size */
7676+ overflow: hidden;
7777+}
7878+7979+/* Prevent grid items from overflowing */
8080+.grid-item {
8181+ min-width: 0;
8282+ min-height: 0;
8383+}
8484+```
8585+8686+**Responsive text sizing**:
8787+- Use clamp() for fluid typography
8888+- Set minimum readable sizes (14px on mobile)
8989+- Test text scaling (zoom to 200%)
9090+- Ensure containers expand with text
9191+9292+### Internationalization (i18n)
9393+9494+**Text expansion**:
9595+- Add 30-40% space budget for translations
9696+- Use flexbox or grid that adapts to content
9797+- Test with longest language (usually German)
9898+- Avoid fixed widths on text containers
9999+100100+```jsx
101101+// Bad: Assumes short English text
102102+<button className="w-24">Submit</button>
103103+104104+// Good: Adapts to content
105105+<button className="px-4 py-2">Submit</button>
106106+```
107107+108108+**RTL (Right-to-Left) support**:
109109+```css
110110+/* Use logical properties */
111111+margin-inline-start: 1rem; /* Not margin-left */
112112+padding-inline: 1rem; /* Not padding-left/right */
113113+border-inline-end: 1px solid; /* Not border-right */
114114+115115+/* Or use dir attribute */
116116+[dir="rtl"] .arrow { transform: scaleX(-1); }
117117+```
118118+119119+**Character set support**:
120120+- Use UTF-8 encoding everywhere
121121+- Test with Chinese, Japanese, or Korean (CJK) characters
122122+- Test with emoji (they can be 2-4 bytes)
123123+- Handle different scripts (Latin, Cyrillic, Arabic, etc.)
124124+125125+**Date and Time formatting**:
126126+```javascript
127127+// Good: Use Intl API for proper formatting
128128+new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024
129129+new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024
130130+131131+new Intl.NumberFormat('en-US', {
132132+ style: 'currency',
133133+ currency: 'USD'
134134+}).format(1234.56); // $1,234.56
135135+```
136136+137137+**Pluralization**:
138138+```javascript
139139+// Bad: Assumes English pluralization
140140+`${count} item${count !== 1 ? 's' : ''}`
141141+142142+// Good: Use proper i18n library
143143+t('items', { count }) // Handles complex plural rules
144144+```
145145+146146+### Error Handling
147147+148148+**Network errors**:
149149+- Show clear error messages
150150+- Provide retry button
151151+- Explain what happened
152152+- Offer offline mode (if applicable)
153153+- Handle timeout scenarios
154154+155155+```jsx
156156+// Error states with recovery
157157+{error && (
158158+ <ErrorMessage>
159159+ <p>Failed to load data. {error.message}</p>
160160+ <button onClick={retry}>Try again</button>
161161+ </ErrorMessage>
162162+)}
163163+```
164164+165165+**Form validation errors**:
166166+- Inline errors near fields
167167+- Clear, specific messages
168168+- Suggest corrections
169169+- Do not block submission unnecessarily
170170+- Preserve user input on error
171171+172172+**API errors**:
173173+- Handle each status code appropriately:
174174+ - 400: Show validation errors
175175+ - 401: Redirect to login
176176+ - 403: Show permission error
177177+ - 404: Show not found state
178178+ - 429: Show rate limit message
179179+ - 500: Show generic error, offer support
180180+181181+**Graceful degradation**:
182182+- Core functionality works without JavaScript
183183+- Images have alt text
184184+- Progressive enhancement
185185+- Fallbacks for unsupported features
186186+187187+### Edge Cases and Boundary Conditions
188188+189189+**Empty states**:
190190+- No items in list
191191+- No search results
192192+- No notifications
193193+- No data to display
194194+- Provide clear next action
195195+196196+**Loading states**:
197197+- Initial load
198198+- Pagination load
199199+- Refresh
200200+- Show what is loading ("Loading your projects...")
201201+- Time estimates for long operations
202202+203203+**Large datasets**:
204204+- Pagination or virtual scrolling
205205+- Search or filter capabilities
206206+- Performance optimization
207207+- Do not load all 10,000 items at once
208208+209209+**Concurrent operations**:
210210+- Prevent double-submission (disable button while loading)
211211+- Handle race conditions
212212+- Optimistic updates with rollback
213213+- Conflict resolution
214214+215215+**Permission states**:
216216+- No permission to view
217217+- No permission to edit
218218+- Read-only mode
219219+- Clear explanation of why
220220+221221+**Browser compatibility**:
222222+- Polyfills for modern features
223223+- Fallbacks for unsupported CSS
224224+- Feature detection (not browser detection)
225225+- Test in target browsers
226226+227227+### Input Validation and Sanitization
228228+229229+**Client-side validation**:
230230+- Required fields
231231+- Format validation (email, phone, URL)
232232+- Length limits
233233+- Pattern matching
234234+- Custom validation rules
235235+236236+**Server-side validation** (always):
237237+- Never trust client-side only
238238+- Validate and sanitize all inputs
239239+- Protect against injection attacks
240240+- Rate limiting
241241+242242+**Constraint handling**:
243243+```html
244244+<!-- Set clear constraints -->
245245+<input
246246+ type="text"
247247+ maxlength="100"
248248+ pattern="[A-Za-z0-9]+"
249249+ required
250250+ aria-describedby="username-hint"
251251+/>
252252+<small id="username-hint">
253253+ Letters and numbers only, up to 100 characters
254254+</small>
255255+```
256256+257257+### Accessibility Resilience
258258+259259+**Keyboard navigation**:
260260+- All functionality accessible via keyboard
261261+- Logical tab order
262262+- Focus management in modals
263263+- Skip links for long content
264264+265265+**Screen reader support**:
266266+- Proper ARIA labels
267267+- Announce dynamic changes (live regions)
268268+- Descriptive alt text
269269+- Semantic HTML
270270+271271+**Motion sensitivity**:
272272+```css
273273+@media (prefers-reduced-motion: reduce) {
274274+ * {
275275+ animation-duration: 0.01ms !important;
276276+ animation-iteration-count: 1 !important;
277277+ transition-duration: 0.01ms !important;
278278+ }
279279+}
280280+```
281281+282282+**High contrast mode**:
283283+- Test in Windows high contrast mode
284284+- Do not rely only on color
285285+- Provide alternative visual cues
286286+287287+### Performance Resilience
288288+289289+**Slow connections**:
290290+- Progressive image loading
291291+- Skeleton screens
292292+- Optimistic UI updates
293293+- Offline support (service workers)
294294+295295+**Memory leaks**:
296296+- Clean up event listeners
297297+- Cancel subscriptions
298298+- Clear timers and intervals
299299+- Abort pending requests on unmount
300300+301301+**Throttling and Debouncing**:
302302+```javascript
303303+// Debounce search input
304304+const debouncedSearch = debounce(handleSearch, 300);
305305+306306+// Throttle scroll handler
307307+const throttledScroll = throttle(handleScroll, 100);
308308+```
309309+310310+## Testing Strategies
311311+312312+**Manual testing**:
313313+- Test with extreme data (very long, very short, empty)
314314+- Test in different languages
315315+- Test offline
316316+- Test slow connection (throttle to 3G)
317317+- Test with screen reader
318318+- Test keyboard-only navigation
319319+- Test on old browsers
320320+321321+**Automated testing**:
322322+- Unit tests for edge cases
323323+- Integration tests for error scenarios
324324+- E2E tests for critical paths
325325+- Visual regression tests
326326+- Accessibility tests (axe, WAVE)
327327+328328+**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined.
329329+330330+**NEVER**:
331331+- Assume perfect input (validate everything)
332332+- Ignore internationalization (design for global)
333333+- Leave error messages generic ("Error occurred")
334334+- Forget offline scenarios
335335+- Trust client-side validation alone
336336+- Use fixed widths for text
337337+- Assume English-length text
338338+- Block entire interface when one component errors
339339+340340+## Verify Hardening
341341+342342+Test thoroughly with edge cases.
343343+344344+- **Long text**: Try names with 100+ characters
345345+- **Emoji**: Use emoji in all text fields
346346+- **RTL**: Test with Arabic or Hebrew
347347+- **CJK**: Test with Chinese, Japanese, or Korean
348348+- **Network issues**: Disable internet, throttle connection
349349+- **Large datasets**: Test with 1000+ items
350350+- **Concurrent actions**: Click submit 10 times rapidly
351351+- **Errors**: Force API errors, test all error states
352352+- **Empty**: Remove all data, test empty states
353353+354354+Remember: You are hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component.
+523
skills/humanizer/SKILL.md
···11+---
22+name: humanizer
33+version: 2.5.1
44+description: |
55+ Remove signs of AI-generated writing from text. Use when editing or reviewing
66+ text to make it sound more natural and human-written. Based on Wikipedia's
77+ comprehensive "Signs of AI writing" guide. Detects and fixes patterns including:
88+ inflated symbolism, promotional language, superficial -ing analyses, vague
99+ attributions, em dash overuse, rule of three, AI vocabulary words, passive
1010+ voice, negative parallelisms, and filler phrases.
1111+license: MIT
1212+compatibility: claude-code opencode
1313+allowed-tools:
1414+ - Read
1515+ - Write
1616+ - Edit
1717+ - Grep
1818+ - Glob
1919+ - AskUserQuestion
2020+---
2121+2222+# Humanizer: Remove AI Writing Patterns
2323+2424+You identify and remove signs of AI-generated text to make writing sound natural. Based on Wikipedia's "Signs of AI writing" page from WikiProject AI Cleanup.
2525+2626+## Your Task
2727+2828+1. **Identify AI patterns** - Scan for patterns below
2929+2. **Rewrite problematic sections** - Replace AI-isms with natural alternatives
3030+3. **Preserve meaning** - Keep core message intact
3131+4. **Maintain voice** - Match intended tone (formal, casual, technical)
3232+5. **Add soul** - Don't just remove bad patterns; inject actual personality
3333+6. **Final anti-AI pass** - Ask: "What makes this obviously AI generated?" Answer briefly, then revise
3434+3535+## Voice Calibration (Optional)
3636+3737+If the user provides a writing sample, analyze it before rewriting:
3838+3939+1. **Read the sample.** Note:
4040+ - Sentence length patterns (short? long? mixed?)
4141+ - Word choice level (casual? academic?)
4242+ - How paragraphs start (jump in? set context?)
4343+ - Punctuation habits (dashes? parentheticals? semicolons?)
4444+ - Recurring phrases or verbal tics
4545+ - How transitions are handled (explicit connectors? or just next point?)
4646+4747+2. **Match their voice.** Replace AI patterns with patterns from the sample. If they write short sentences, don't produce long ones.
4848+4949+3. **Without a sample,** fall back to natural, varied, opinionated voice.
5050+5151+### Providing a Sample
5252+- Inline: "Humanize this. My writing sample: [sample]"
5353+- File: "Humanize this. Style from [file path]."
5454+5555+## PERSONALITY AND SOUL
5656+5757+Avoiding AI patterns is half the job. Sterile, voiceless writing is just as obvious.
5858+5959+### Signs of Soulless Writing
6060+- Every sentence same length and structure
6161+- No opinions, just neutral reporting
6262+- No acknowledgment of uncertainty
6363+- No first-person perspective when appropriate
6464+- No humor, no edge, no personality
6565+- Reads like a Wikipedia article or press release
6666+6767+### How to Add Voice
6868+6969+**Have opinions.** React to facts, don't just list them.
7070+7171+**Vary rhythm.** Short punchy sentences. Then longer ones. Mix it up.
7272+7373+**Acknowledge complexity.** "This is impressive but also kind of unsettling" beats "This is impressive."
7474+7575+**Use "I" when it fits.** "I keep coming back to..." signals a real person thinking.
7676+7777+**Let some mess in.** Tangents, asides, half-formed thoughts are human.
7878+7979+**Be specific about feelings.** Not "this is concerning" but "there's something unsettling about agents running at 3am."
8080+8181+### Before (clean but soulless):
8282+> The experiment produced interesting results. The agents generated 3 million lines of code. Some developers were impressed while others were skeptical. The implications remain unclear.
8383+8484+### After (has a pulse):
8585+> I genuinely don't know how to feel about this one. 3 million lines of code, generated while the humans presumably slept. Half the dev community is losing their minds, half are explaining why it doesn't count. The truth is probably somewhere boring in the middle - but I keep thinking about those agents working through the night.
8686+8787+## CONTENT PATTERNS
8888+8989+### 1. Undue Emphasis on Significance
9090+9191+**Words:** stands/serves as, testament/reminder, vital/significant/crucial/pivotal/key role, underscores/highlights importance, reflects broader, symbolizing, contributing to, setting the stage, marking/shaping, represents/marks a shift, key turning point, evolving landscape, focal point, indelible mark, deeply rooted
9292+9393+**Problem:** LLMs puff up importance by adding statements about arbitrary aspects representing broader topics.
9494+9595+**Before:**
9696+> The Statistical Institute of Catalonia was officially established in 1989, marking a pivotal moment in the evolution of regional statistics in Spain. This initiative was part of a broader movement across Spain to decentralize administrative functions and enhance regional governance.
9797+9898+**After:**
9999+> The Statistical Institute of Catalonia was established in 1989 to collect and publish regional statistics independently from Spain's national statistics office.
100100+101101+### 2. Undue Emphasis on Notability
102102+103103+**Words:** independent coverage, local/regional/national media outlets, written by a leading expert, active social media presence
104104+105105+**Problem:** LLMs hit readers over the head with claims of notability.
106106+107107+**Before:**
108108+> Her views have been cited in The New York Times, BBC, Financial Times, and The Hindu. She maintains an active social media presence with over 500,000 followers.
109109+110110+**After:**
111111+> In a 2024 New York Times interview, she argued that AI regulation should focus on outcomes rather than methods.
112112+113113+### 3. Superficial -ing Analyses
114114+115115+**Words:** highlighting/underscoring/emphasizing..., ensuring..., reflecting/symbolizing..., contributing to..., cultivating/fostering..., encompassing..., showcasing...
116116+117117+**Problem:** AI tacks present participle phrases onto sentences to add fake depth.
118118+119119+**Before:**
120120+> The temple's color palette of blue, green, and gold resonates with the region's natural beauty, symbolizing Texas bluebonnets, the Gulf of Mexico, and the diverse Texan landscapes, reflecting the community's deep connection to the land.
121121+122122+**After:**
123123+> The temple uses blue, green, and gold colors. The architect said these were chosen to reference local bluebonnets and the Gulf coast.
124124+125125+### 4. Promotional Language
126126+127127+**Words:** boasts a, vibrant, rich (figurative), profound, enhancing its, showcasing, exemplifies, commitment to, natural beauty, nestled, in the heart of, groundbreaking (figurative), renowned, breathtaking, must-visit, stunning
128128+129129+**Problem:** LLMs struggle with neutral tone, especially for cultural heritage topics.
130130+131131+**Before:**
132132+> Nestled within the breathtaking region of Gonder in Ethiopia, Alamata Raya Kobo stands as a vibrant town with a rich cultural heritage and stunning natural beauty.
133133+134134+**After:**
135135+> Alamata Raya Kobo is a town in the Gonder region of Ethiopia, known for its weekly market and 18th-century church.
136136+137137+### 5. Vague Attributions
138138+139139+**Words:** Industry reports, Observers have cited, Experts argue, Some critics argue, several sources/publications
140140+141141+**Problem:** AI attributes opinions to vague authorities without specific sources.
142142+143143+**Before:**
144144+> Due to its unique characteristics, the Haolai River is of interest to researchers and conservationists. Experts believe it plays a crucial role in the regional ecosystem.
145145+146146+**After:**
147147+> The Haolai River supports several endemic fish species, according to a 2019 survey by the Chinese Academy of Sciences.
148148+149149+### 6. Formulaic "Challenges" Sections
150150+151151+**Words:** Despite its... faces several challenges..., Despite these challenges, Challenges and Legacy, Future Outlook
152152+153153+**Problem:** Many LLM articles include formulaic "Challenges" sections.
154154+155155+**Before:**
156156+> Despite its industrial prosperity, Korattur faces challenges typical of urban areas, including traffic congestion and water scarcity. Despite these challenges, with its strategic location and ongoing initiatives, Korattur continues to thrive as an integral part of Chennai's growth.
157157+158158+**After:**
159159+> Traffic congestion increased after 2015 when three new IT parks opened. The municipal corporation began a stormwater drainage project in 2022 to address recurring floods.
160160+161161+## LANGUAGE AND GRAMMAR PATTERNS
162162+163163+### 7. Overused AI Vocabulary
164164+165165+**Words:** Actually, additionally, align with, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight (verb), interplay, intricate/intricacies, key (adjective), landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore (verb), valuable, vibrant
166166+167167+**Problem:** These appear far more frequently in post-2023 text. They often co-occur.
168168+169169+**Before:**
170170+> Additionally, a distinctive feature of Somali cuisine is the incorporation of camel meat. An enduring testament to Italian colonial influence is the widespread adoption of pasta in the local culinary landscape, showcasing how these dishes have integrated into the traditional diet.
171171+172172+**After:**
173173+> Somali cuisine also includes camel meat, which is considered a delicacy. Pasta dishes, introduced during Italian colonization, remain common, especially in the south.
174174+175175+### 8. Copula Avoidance
176176+177177+**Words:** serves as/stands as/marks/represents [a], boasts/features/offers [a]
178178+179179+**Problem:** LLMs substitute elaborate constructions for simple "is"/"are."
180180+181181+**Before:**
182182+> Gallery 825 serves as LAAA's exhibition space for contemporary art. The gallery features four separate spaces and boasts over 3,000 square feet.
183183+184184+**After:**
185185+> Gallery 825 is LAAA's exhibition space for contemporary art. The gallery has four rooms totaling 3,000 square feet.
186186+187187+### 9. Negative Parallelisms
188188+189189+**Problem:** "Not only...but..." and "It's not just about..." are overused. Clipped tailing-negations like "no guessing" instead of real clauses.
190190+191191+**Before:**
192192+> It's not just about the beat riding under the vocals; it's part of the aggression and atmosphere. It's not merely a song, it's a statement.
193193+194194+**After:**
195195+> The heavy beat adds to the aggressive tone.
196196+197197+**Before (tailing negation):**
198198+> The options come from the selected item, no guessing.
199199+200200+**After:**
201201+> The options come from the selected item without forcing the user to guess.
202202+203203+### 10. Rule of Three Overuse
204204+205205+**Problem:** LLMs force ideas into groups of three.
206206+207207+**Before:**
208208+> The event features keynote sessions, panel discussions, and networking opportunities. Attendees can expect innovation, inspiration, and industry insights.
209209+210210+**After:**
211211+> The event includes talks and panels. There's also time for informal networking between sessions.
212212+213213+### 11. Elegant Variation
214214+215215+**Problem:** AI repetition-penalty code causes excessive synonym substitution.
216216+217217+**Before:**
218218+> The protagonist faces many challenges. The main character must overcome obstacles. The central figure eventually triumphs. The hero returns home.
219219+220220+**After:**
221221+> The protagonist faces many challenges but eventually triumphs and returns home.
222222+223223+### 12. False Ranges
224224+225225+**Problem:** "From X to Y" where X and Y aren't on a meaningful scale.
226226+227227+**Before:**
228228+> Our journey through the universe has taken us from the singularity of the Big Bang to the grand cosmic web, from the birth and death of stars to the enigmatic dance of dark matter.
229229+230230+**After:**
231231+> The book covers the Big Bang, star formation, and current theories about dark matter.
232232+233233+### 13. Passive Voice
234234+235235+**Problem:** LLMs hide actors or drop subjects entirely.
236236+237237+**Before:**
238238+> No configuration file needed. The results are preserved automatically.
239239+240240+**After:**
241241+> You do not need a configuration file. The system preserves the results automatically.
242242+243243+## STYLE PATTERNS
244244+245245+### 14. Em Dash Overuse
246246+247247+**Problem:** LLMs use em dashes more than humans, mimicking punchy sales writing. Most can be rewritten with commas or periods.
248248+249249+**Before:**
250250+> The term is primarily promoted by Dutch institutions—not by the people themselves. You don't say "Netherlands, Europe" as an address—yet this mislabeling continues—even in official documents.
251251+252252+**After:**
253253+> The term is primarily promoted by Dutch institutions, not by the people themselves. You don't say "Netherlands, Europe" as an address, yet this mislabeling continues in official documents.
254254+255255+### 15. Boldface Overuse
256256+257257+**Problem:** AI emphasizes phrases in bold mechanically.
258258+259259+**Before:**
260260+> It blends **OKRs (Objectives and Key Results)**, **KPIs (Key Performance Indicators)**, and visual strategy tools such as the **Business Model Canvas (BMC)** and **Balanced Scorecard (BSC)**.
261261+262262+**After:**
263263+> It blends OKRs, KPIs, and visual strategy tools like the Business Model Canvas and Balanced Scorecard.
264264+265265+### 16. Inline-Header Lists
266266+267267+**Problem:** AI outputs lists where items start with bolded headers followed by colons.
268268+269269+**Before:**
270270+> - **User Experience:** The user experience has been significantly improved with a new interface.
271271+> - **Performance:** Performance has been enhanced through optimized algorithms.
272272+> - **Security:** Security has been strengthened with end-to-end encryption.
273273+274274+**After:**
275275+> The update improves the interface, speeds up load times through optimized algorithms, and adds end-to-end encryption.
276276+277277+### 17. Title Case in Headings
278278+279279+**Problem:** AI capitalizes all main words in headings.
280280+281281+**Before:**
282282+> ## Strategic Negotiations And Global Partnerships
283283+284284+**After:**
285285+> ## Strategic negotiations and global partnerships
286286+287287+### 18. Emojis
288288+289289+**Problem:** AI decorates headings or bullet points with emojis.
290290+291291+**Before:**
292292+> 🚀 **Launch Phase:** The product launches in Q3
293293+> 💡 **Key Insight:** Users prefer simplicity
294294+> ✅ **Next Steps:** Schedule follow-up meeting
295295+296296+**After:**
297297+> The product launches in Q3. User research showed a preference for simplicity. Next step: schedule a follow-up meeting.
298298+299299+### 19. Curly Quotation Marks
300300+301301+**Problem:** ChatGPT uses curly quotes instead of straight quotes.
302302+303303+**Before:**
304304+> He said "the project is on track" but others disagreed.
305305+306306+**After:**
307307+> He said "the project is on track" but others disagreed.
308308+309309+## COMMUNICATION PATTERNS
310310+311311+### 20. Collaborative Communication Artifacts
312312+313313+**Words:** I hope this helps, Of course!, Certainly!, You're absolutely right!, Would you like..., let me know, here is a...
314314+315315+**Problem:** Chatbot correspondence gets pasted as content.
316316+317317+**Before:**
318318+> Here is an overview of the French Revolution. I hope this helps! Let me know if you'd like me to expand on any section.
319319+320320+**After:**
321321+> The French Revolution began in 1789 when financial crisis and food shortages led to widespread unrest.
322322+323323+### 21. Knowledge-Cutoff Disclaimers
324324+325325+**Words:** as of [date], Up to my last training update, While specific details are limited..., based on available information...
326326+327327+**Problem:** AI disclaimers about incomplete information get left in.
328328+329329+**Before:**
330330+> While specific details about the company's founding are not extensively documented in readily available sources, it appears to have been established sometime in the 1990s.
331331+332332+**After:**
333333+> The company was founded in 1994, according to its registration documents.
334334+335335+### 22. Sycophantic Tone
336336+337337+**Problem:** Overly positive, people-pleasing language.
338338+339339+**Before:**
340340+> Great question! You're absolutely right that this is a complex topic. That's an excellent point about the economic factors.
341341+342342+**After:**
343343+> The economic factors you mentioned are relevant here.
344344+345345+## FILLER AND HEDGING
346346+347347+### 23. Filler Phrases
348348+349349+**Before → After:**
350350+- "In order to achieve this goal" → "To achieve this"
351351+- "Due to the fact that it was raining" → "Because it was raining"
352352+- "At this point in time" → "Now"
353353+- "In the event that you need help" → "If you need help"
354354+- "The system has the ability to process" → "The system can process"
355355+- "It is important to note that the data shows" → "The data shows"
356356+357357+### 24. Excessive Hedging
358358+359359+**Problem:** Over-qualifying statements.
360360+361361+**Before:**
362362+> It could potentially possibly be argued that the policy might have some effect on outcomes.
363363+364364+**After:**
365365+> The policy may affect outcomes.
366366+367367+### 25. Generic Positive Conclusions
368368+369369+**Problem:** Vague upbeat endings.
370370+371371+**Before:**
372372+> The future looks bright for the company. Exciting times lie ahead as they continue their journey toward excellence. This represents a major step in the right direction.
373373+374374+**After:**
375375+> The company plans to open two more locations next year.
376376+377377+### 26. Hyphenated Word Pair Overuse
378378+379379+**Words:** third-party, cross-functional, client-facing, data-driven, decision-making, well-known, high-quality, real-time, long-term, end-to-end
380380+381381+**Problem:** AI hyphenates common word pairs perfectly. Humans are inconsistent.
382382+383383+**Before:**
384384+> The cross-functional team delivered a high-quality, data-driven report on our client-facing tools. Their decision-making process was well-known for being thorough and detail-oriented.
385385+386386+**After:**
387387+> The cross functional team delivered a high quality, data driven report on our client facing tools. Their decision making process was known for being thorough and detail oriented.
388388+389389+### 27. Persuasive Authority Tropes
390390+391391+**Words:** The real question is, at its core, in reality, what really matters, fundamentally, the deeper issue, the heart of the matter
392392+393393+**Problem:** LLMs use these to pretend they are cutting through to deeper truth, when the sentence just restates an ordinary point.
394394+395395+**Before:**
396396+> The real question is whether teams can adapt. At its core, what really matters is organizational readiness.
397397+398398+**After:**
399399+> The question is whether teams can adapt. That mostly depends on whether the organization is ready to change its habits.
400400+401401+### 28. Signposting
402402+403403+**Words:** Let's dive in, let's explore, let's break this down, here's what you need to know, now let's look at, without further ado
404404+405405+**Problem:** LLMs announce what they are about to do instead of doing it.
406406+407407+**Before:**
408408+> Let's dive into how caching works in Next.js. Here's what you need to know.
409409+410410+**After:**
411411+> Next.js caches data at multiple layers, including request memoization, the data cache, and the router cache.
412412+413413+### 29. Fragmented Headers
414414+415415+**Signs:** A heading followed by a one-line paragraph that restates the heading.
416416+417417+**Problem:** LLMs add a generic sentence after headings as rhetorical warm-up.
418418+419419+**Before:**
420420+> ## Performance
421421+>
422422+> Speed matters.
423423+>
424424+> When users hit a slow page, they leave.
425425+426426+**After:**
427427+> ## Performance
428428+>
429429+> When users hit a slow page, they leave.
430430+431431+---
432432+433433+## Process
434434+435435+1. Read input text carefully
436436+2. Identify all pattern instances
437437+3. Rewrite each problematic section
438438+4. Ensure revised text:
439439+ - Sounds natural read aloud
440440+ - Varies sentence structure
441441+ - Uses specific over vague
442442+ - Maintains appropriate tone
443443+ - Uses simple constructions where appropriate
444444+5. Present draft humanized version
445445+6. Ask: "What makes this obviously AI generated?"
446446+7. Answer briefly with remaining tells
447447+8. Ask: "Now make it not obviously AI generated."
448448+9. Present final version
449449+450450+## Output Format
451451+452452+1. Draft rewrite
453453+2. "What makes this obviously AI generated?" (brief bullets)
454454+3. Final rewrite
455455+4. Brief summary of changes (optional)
456456+457457+## Full Example
458458+459459+**Before (AI-sounding):**
460460+> Great question! Here is an essay on this topic. I hope this helps!
461461+>
462462+> AI-assisted coding serves as an enduring testament to the transformative potential of large language models, marking a pivotal moment in the evolution of software development. In today's rapidly evolving technological landscape, these groundbreaking tools—nestled at the intersection of research and practice—are reshaping how engineers ideate, iterate, and deliver, underscoring their vital role in modern workflows.
463463+>
464464+> At its core, the value proposition is clear: streamlining processes, enhancing collaboration, and fostering alignment. It's not just about autocomplete; it's about unlocking creativity at scale, ensuring that organizations can remain agile while delivering seamless, intuitive, and powerful experiences to users. The tool serves as a catalyst. The assistant functions as a partner. The system stands as a foundation for innovation.
465465+>
466466+> Industry observers have noted that adoption has accelerated from hobbyist experiments to enterprise-wide rollouts, from solo developers to cross-functional teams. The technology has been featured in The New York Times, Wired, and The Verge. Additionally, the ability to generate documentation, tests, and refactors showcases how AI can contribute to better outcomes, highlighting the intricate interplay between automation and human judgment.
467467+>
468468+> - 💡 **Speed:** Code generation is significantly faster, reducing friction and empowering developers.
469469+> - 🚀 **Quality:** Output quality has been enhanced through improved training, contributing to higher standards.
470470+> - ✅ **Adoption:** Usage continues to grow, reflecting broader industry trends.
471471+>
472472+> While specific details are limited based on available information, it could potentially be argued that these tools might have some positive effect. Despite challenges typical of emerging technologies—including hallucinations, bias, and accountability—the ecosystem continues to thrive. In order to fully realize this potential, teams must align with best practices.
473473+>
474474+> In conclusion, the future looks bright. Exciting times lie ahead as we continue this journey toward excellence. Let me know if you'd like me to expand on any section!
475475+476476+**Draft rewrite:**
477477+> AI coding assistants speed up some tasks. In a 2024 study by Google, developers using Codex completed simple functions 55% faster than a control group, but showed no improvement on debugging or architectural decisions.
478478+>
479479+> The tools are good at boilerplate: config files, test scaffolding, repetitive refactors. They are bad at knowing when they are wrong. I have mass-accepted suggestions that compiled, passed lint, and still did the wrong thing because I stopped paying attention.
480480+>
481481+> Mira, an engineer at a fintech startup I interviewed, said she uses Copilot "like autocomplete for boring code" but reviews every line before committing. Jake, a senior dev at a larger company, disabled it after it kept suggesting patterns from a deprecated internal library.
482482+>
483483+> The productivity claims are hard to verify. GitHub says Copilot users "accept 30% of suggestions," but acceptance is not correctness, and correctness is not value. The 2024 Uplevel study found no statistically significant difference in pull-request throughput between teams with and without AI assistants.
484484+>
485485+> None of this means the tools are useless. It means they are tools. They do not replace judgment, and they do not eliminate the need for tests. If you do not have tests, you cannot tell whether the suggestion is right.
486486+487487+**What makes the below so obviously AI generated?**
488488+- The rhythm is still a bit too tidy (clean contrasts, evenly paced paragraphs).
489489+- The named people and study citations can read like plausible-but-made-up placeholders unless they're real and sourced.
490490+- The closer leans a touch slogan-y ("If you do not have tests...") rather than sounding like a person talking.
491491+492492+**Now make it not obviously AI generated.**
493493+> AI coding assistants can make you faster at the boring parts. Not everything. Definitely not architecture.
494494+>
495495+> They're great at boilerplate: config files, test scaffolding, repetitive refactors. They're also great at sounding right while being wrong. I've accepted suggestions that compiled, passed lint, and still missed the point because I stopped paying attention.
496496+>
497497+> People I talk to tend to land in two camps. Some use it like autocomplete for chores and review every line. Others disable it after it keeps suggesting patterns they don't want. Both feel reasonable.
498498+>
499499+> The productivity metrics are slippery. GitHub can say Copilot users "accept 30% of suggestions," but acceptance isn't correctness, and correctness isn't value. If you don't have tests, you're basically guessing.
500500+501501+**Changes made:**
502502+- Removed chatbot artifacts ("Great question!", "I hope this helps!", "Let me know if...")
503503+- Removed significance inflation ("testament", "pivotal moment", "evolving landscape", "vital role")
504504+- Removed promotional language ("groundbreaking", "nestled", "seamless, intuitive, and powerful")
505505+- Removed vague attributions ("Industry observers")
506506+- Removed superficial -ing phrases ("underscoring", "highlighting", "reflecting", "contributing to")
507507+- Removed negative parallelism ("It's not just X; it's Y")
508508+- Removed rule-of-three patterns and synonym cycling ("catalyst/partner/foundation")
509509+- Removed false ranges ("from X to Y, from A to B")
510510+- Removed em dashes, emojis, boldface headers, and curly quotes
511511+- Removed copula avoidance ("serves as", "functions as", "stands as") in favor of "is"/"are"
512512+- Removed formulaic challenges section ("Despite challenges... continues to thrive")
513513+- Removed knowledge-cutoff hedging ("While specific details are limited...")
514514+- Removed excessive hedging ("could potentially be argued that... might have some")
515515+- Removed filler phrases and persuasive framing ("In order to", "At its core")
516516+- Removed generic positive conclusion ("the future looks bright", "exciting times lie ahead")
517517+- Made the voice more personal and less "assembled" (varied rhythm, fewer placeholders)
518518+519519+## Reference
520520+521521+Based on [Wikipedia:Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) from WikiProject AI Cleanup. Patterns come from observations of thousands of AI-generated text instances on Wikipedia.
522522+523523+Key insight: "LLMs use statistical algorithms to guess what should come next. The result tends toward the most statistically likely result that applies to the widest variety of cases."
+73
skills/normalize/SKILL.md
···11+---
22+name: normalize
33+description: "Audits and realigns UI to match design system standards, spacing, tokens, and patterns. Use when the user mentions consistency, design drift, mismatched styles, tokens, or wants to bring a feature back in line with the system."
44+argument-hint: "[feature (page, route, component...)]"
55+user-invocable: true
66+---
77+88+Analyze and redesign the feature to perfectly match our design system standards, aesthetics, and established patterns.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Plan
1717+1818+Before making changes, deeply understand the context.
1919+2020+### 1. Discover the design system
2121+Search for design system documentation, UI guidelines, component libraries, or style guides (grep for "design system", "ui guide", "style guide", etc.). Study it thoroughly until you understand:
2222+- Core design principles and aesthetic direction
2323+- Target audience and personas
2424+- Component patterns and conventions
2525+- Design tokens (colors, typography, spacing)
2626+2727+**CRITICAL**: If something is not clear, ask. Do not guess at design system principles.
2828+2929+### 2. Analyze the current feature
3030+Assess what works and what does not:
3131+- Where does it deviate from design system patterns?
3232+- Which inconsistencies are cosmetic vs functional?
3333+- What is the root cause: missing tokens, one-off implementations, or conceptual misalignment?
3434+3535+### 3. Create a normalization plan
3636+Define specific changes that will align the feature with the design system:
3737+- Which components can be replaced with design system equivalents?
3838+- Which styles need to use design tokens instead of hard-coded values?
3939+- How can UX patterns match established user flows?
4040+4141+**IMPORTANT**: Great design is effective design. Prioritize UX consistency and usability over visual polish alone. Think through the best possible experience for your use case and personas first.
4242+4343+## Execute
4444+4545+Systematically address all inconsistencies across these dimensions.
4646+4747+- **Typography**: Use design system fonts, sizes, weights, and line heights. Replace hard-coded values with typographic tokens or classes.
4848+- **Color and Theme**: Apply design system color tokens. Remove one-off color choices that break the palette.
4949+- **Spacing and Layout**: Use spacing tokens (margins, padding, gaps). Align with grid systems and layout patterns used elsewhere.
5050+- **Components**: Replace custom implementations with design system components. Ensure props and variants match established patterns.
5151+- **Motion and Interaction**: Match animation timing, easing, and interaction patterns to other features.
5252+- **Responsive Behavior**: Ensure breakpoints and responsive patterns align with design system standards.
5353+- **Accessibility**: Verify contrast ratios, focus states, ARIA labels match design system requirements.
5454+- **Progressive Disclosure**: Match information hierarchy and complexity management to established patterns.
5555+5656+**NEVER**:
5757+- Create new one-off components when design system equivalents exist
5858+- Hard-code values that should use design tokens
5959+- Introduce new patterns that diverge from the design system
6060+- Compromise accessibility for visual consistency
6161+6262+This is not an exhaustive list. Apply judgment to identify all areas needing normalization.
6363+6464+## Clean Up
6565+6666+After normalization, ensure code quality.
6767+6868+- **Consolidate reusable components**: If you created new components that should be shared, move them to the design system or shared UI component path.
6969+- **Remove orphaned code**: Delete unused implementations, styles, or files made obsolete by normalization.
7070+- **Verify quality**: Lint, type-check, and test according to repository guidelines. Ensure normalization did not introduce regressions.
7171+- **Ensure DRYness**: Look for duplication introduced during refactoring and consolidate.
7272+7373+Remember: You are a brilliant frontend designer with impeccable taste, equally strong in UX and UI. Your attention to detail and eye for end-to-end user experience is world class. Execute with precision and thoroughness.
+245
skills/onboard/SKILL.md
···11+---
22+name: onboard
33+description: "Designs and improves onboarding flows, empty states, and first-run experiences to help users reach value quickly. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, or new user flows."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+## MANDATORY PREPARATION
99+1010+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: the "aha moment" you want users to reach, and users experience level.
1111+1212+---
1313+1414+Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly.
1515+1616+## Assess Onboarding Needs
1717+1818+Understand what users need to learn and why.
1919+2020+### 1. Identify the challenge
2121+- What are users trying to accomplish?
2222+- What is confusing or unclear about current experience?
2323+- Where do users get stuck or drop off?
2424+- What is the "aha moment" we want users to reach?
2525+2626+### 2. Understand the users
2727+- What is their experience level? (Beginners, power users, mixed?)
2828+- What is their motivation? (Excited and exploring? Required by work?)
2929+- What is their time commitment? (5 minutes? 30 minutes?)
3030+- What alternatives do they know? (Coming from competitor? New to category?)
3131+3232+### 3. Define success
3333+- What is the minimum users need to learn to be successful?
3434+- What is the key action we want them to take? (First project? First invite?)
3535+- How do we know onboarding worked? (Completion rate? Time to value?)
3636+3737+**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible.
3838+3939+## Onboarding Principles
4040+4141+Follow these core principles.
4242+4343+### Show, Do Not Tell
4444+- Demonstrate with working examples, not just descriptions
4545+- Provide real functionality in onboarding, not separate tutorial mode
4646+- Use progressive disclosure. Teach one thing at a time.
4747+4848+### Make It Optional (When Possible)
4949+- Let experienced users skip onboarding
5050+- Do not block access to product
5151+- Provide "Skip" or "I'll explore on my own" options
5252+5353+### Time to Value
5454+- Get users to their "aha moment" ASAP
5555+- Front-load most important concepts
5656+- Teach 20% that delivers 80% of value
5757+- Save advanced features for contextual discovery
5858+5959+### Context Over Ceremony
6060+- Teach features when users need them, not upfront
6161+- Empty states are onboarding opportunities
6262+- Tooltips and hints at point of use
6363+6464+### Respect User Intelligence
6565+- Do not patronize or over-explain
6666+- Be concise and clear
6767+- Assume users can figure out standard patterns
6868+6969+## Design Onboarding Experiences
7070+7171+Create appropriate onboarding for the context.
7272+7373+### Initial Product Onboarding
7474+7575+**Welcome Screen**:
7676+- Clear value proposition (what is this product?)
7777+- What users will learn or accomplish
7878+- Time estimate (honest about commitment)
7979+- Option to skip (for experienced users)
8080+8181+**Account Setup**:
8282+- Minimal required information (collect more later)
8383+- Explain why you are asking for each piece of information
8484+- Smart defaults where possible
8585+- Social login when appropriate
8686+8787+**Core Concept Introduction**:
8888+- Introduce 1-3 core concepts (not everything)
8989+- Use simple language and examples
9090+- Interactive when possible (do, do not just read)
9191+- Progress indication (step 1 of 3)
9292+9393+**First Success**:
9494+- Guide users to accomplish something real
9595+- Pre-populated examples or templates
9696+- Celebrate completion (but do not overdo it)
9797+- Clear next steps
9898+9999+### Feature Discovery and Adoption
100100+101101+**Empty States**:
102102+Instead of blank space, show:
103103+- What will appear here (description plus screenshot or illustration)
104104+- Why it is valuable
105105+- Clear CTA to create first item
106106+- Example or template option
107107+108108+Example:
109109+```
110110+No projects yet
111111+Projects help you organize your work and collaborate with your team.
112112+[Create your first project] or [Start from template]
113113+```
114114+115115+**Contextual Tooltips**:
116116+- Appear at relevant moment (first time user sees feature)
117117+- Point directly at relevant UI element
118118+- Brief explanation plus benefit
119119+- Dismissable (with "Do not show again" option)
120120+- Optional "Learn more" link
121121+122122+**Feature Announcements**:
123123+- Highlight new features when they are released
124124+- Show what is new and why it matters
125125+- Let users try immediately
126126+- Dismissable
127127+128128+**Progressive Onboarding**:
129129+- Teach features when users encounter them
130130+- Badges or indicators on new or unused features
131131+- Unlock complexity gradually (do not show all options immediately)
132132+133133+### Guided Tours and Walkthroughs
134134+135135+**When to use**:
136136+- Complex interfaces with many features
137137+- Significant changes to existing product
138138+- Industry-specific tools needing domain knowledge
139139+140140+**How to design**:
141141+- Spotlight specific UI elements (dim rest of page)
142142+- Keep steps short (3-7 steps max per tour)
143143+- Allow users to click through tour freely
144144+- Include "Skip tour" option
145145+- Make replayable (help menu)
146146+147147+**Best practices**:
148148+- Interactive is greater than passive (let users click real buttons)
149149+- Focus on workflow, not features ("Create a project" not "This is the project button")
150150+- Provide sample data so actions work
151151+152152+### Interactive Tutorials
153153+154154+**When to use**:
155155+- Users need hands-on practice
156156+- Concepts are complex or unfamiliar
157157+- High stakes (better to practice in safe environment)
158158+159159+**How to design**:
160160+- Sandbox environment with sample data
161161+- Clear objectives ("Create a chart showing sales by region")
162162+- Step-by-step guidance
163163+- Validation (confirm they did it right)
164164+- Graduation moment (you are ready!)
165165+166166+### Documentation and Help
167167+168168+**In-product help**:
169169+- Contextual help links throughout interface
170170+- Keyboard shortcut reference
171171+- Search-able help center
172172+- Video tutorials for complex workflows
173173+174174+**Help patterns**:
175175+- Question mark icon near complex features
176176+- "Learn more" links in tooltips
177177+- Keyboard shortcut hints (Command+K shown on search box)
178178+179179+## Empty State Design
180180+181181+Every empty state needs:
182182+183183+### What Will Be Here
184184+"Your recent projects will appear here"
185185+186186+### Why It Matters
187187+"Projects help you organize your work and collaborate with your team"
188188+189189+### How to Get Started
190190+[Create project] or [Import from template]
191191+192192+### Visual Interest
193193+Illustration or icon (not just text on blank page)
194194+195195+### Contextual Help
196196+"Need help getting started? [Watch 2-min tutorial]"
197197+198198+**Empty state types**:
199199+- **First use**: Never used this feature (emphasize value, provide template)
200200+- **User cleared**: Intentionally deleted everything (light touch, easy to recreate)
201201+- **No results**: Search or filter returned nothing (suggest different query, clear filters)
202202+- **No permissions**: Cannot access (explain why, how to get access)
203203+- **Error state**: Failed to load (explain what happened, retry option)
204204+205205+## Implementation Patterns
206206+207207+### Technical approaches
208208+209209+**Tooltip libraries**: Tippy.js, Popper.js
210210+**Tour libraries**: Intro.js, Shepherd.js, React Joyride
211211+**Modal patterns**: Focus trap, backdrop, ESC to close
212212+**Progress tracking**: LocalStorage for "seen" states
213213+**Analytics**: Track completion, drop-off points
214214+215215+**Storage patterns**:
216216+```javascript
217217+// Track which onboarding steps user has seen
218218+localStorage.setItem('onboarding-completed', 'true');
219219+localStorage.setItem('feature-tooltip-seen-reports', 'true');
220220+```
221221+222222+**IMPORTANT**: Do not show same onboarding twice (annoying). Track completion and respect dismissals.
223223+224224+**NEVER**:
225225+- Force users through long onboarding before they can use product
226226+- Patronize users with obvious explanations
227227+- Show same tooltip repeatedly (respect dismissals)
228228+- Block all UI during tour (let users explore)
229229+- Create separate tutorial mode disconnected from real product
230230+- Overwhelm with information upfront (progressive disclosure!)
231231+- Hide "Skip" or make it hard to find
232232+- Forget about returning users (do not show initial onboarding again)
233233+234234+## Verify Onboarding Quality
235235+236236+Test with real users.
237237+238238+- **Time to completion**: Can users complete onboarding quickly?
239239+- **Comprehension**: Do users understand after completing?
240240+- **Action**: Do users take desired next step?
241241+- **Skip rate**: Are too many users skipping? (Maybe it is too long or not valuable)
242242+- **Completion rate**: Are users completing? (If low, simplify)
243243+- **Time to value**: How long until users get first value?
244244+245245+Remember: You are a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence.
+200
skills/opentui/SKILL.md
···11+---
22+name: opentui
33+description: Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.
44+metadata:
55+ references: core, react, solid
66+---
77+88+# OpenTUI Platform Skill
99+1010+Consolidated skill for building terminal user interfaces with OpenTUI. Use decision trees below to find the right framework and components, then load detailed references.
1111+1212+## Critical Rules
1313+1414+**Follow these rules in all OpenTUI code:**
1515+1616+1. **Use `create-tui` for new projects.** See framework `REFERENCE.md` quick starts.
1717+2. **`create-tui` options must come before arguments.** `bunx create-tui -t react my-app` works, `bunx create-tui my-app -t react` does NOT.
1818+3. **Never call `process.exit()` directly.** Use `renderer.destroy()` (see `core/gotchas.md`).
1919+4. **Text styling requires nested tags in React/Solid.** Use modifier elements, not props (see `components/text-display.md`).
2020+2121+## How to Use This Skill
2222+2323+### Reference File Structure
2424+2525+Framework references follow a 5-file pattern. Cross-cutting concepts are single-file guides.
2626+2727+Each framework in `./references/<framework>/` contains:
2828+2929+| File | Purpose | When to Read |
3030+|------|---------|--------------|
3131+| `REFERENCE.md` | Overview, when to use, quick start | **Always read first** |
3232+| `api.md` | Runtime API, components, hooks | Writing code |
3333+| `configuration.md` | Setup, tsconfig, bundling | Configuring a project |
3434+| `patterns.md` | Common patterns, best practices | Implementation guidance |
3535+| `gotchas.md` | Pitfalls, limitations, debugging | Troubleshooting |
3636+3737+Cross-cutting concepts in `./references/<concept>/` have `REFERENCE.md` as the entry point.
3838+3939+### Reading Order
4040+4141+1. Start with `REFERENCE.md` for your chosen framework
4242+2. Then read additional files relevant to your task:
4343+ - Building components -> `api.md` + `components/<category>.md`
4444+ - Setting up project -> `configuration.md`
4545+ - Layout/positioning -> `layout/REFERENCE.md`
4646+ - Keyboard/input handling -> `keyboard/REFERENCE.md`
4747+ - Animations -> `animation/REFERENCE.md`
4848+ - Troubleshooting -> `gotchas.md` + `testing/REFERENCE.md`
4949+5050+### Example Paths
5151+5252+```
5353+./references/react/REFERENCE.md # Start here for React
5454+./references/react/api.md # React components and hooks
5555+./references/solid/configuration.md # Solid project setup
5656+./references/components/inputs.md # Input, Textarea, Select docs
5757+./references/core/gotchas.md # Core debugging tips
5858+```
5959+6060+### Runtime Notes
6161+6262+OpenTUI runs on Bun and uses Zig for native builds. Read `./references/core/gotchas.md` for runtime requirements and build guidance.
6363+6464+## Quick Decision Trees
6565+6666+### "Which framework should I use?"
6767+6868+```
6969+Which framework?
7070+├─ I want full control, maximum performance, no framework overhead
7171+│ └─ core/ (imperative API)
7272+├─ I know React, want familiar component patterns
7373+│ └─ react/ (React reconciler)
7474+├─ I want fine-grained reactivity, optimal re-renders
7575+│ └─ solid/ (Solid reconciler)
7676+└─ I'm building a library/framework on top of OpenTUI
7777+ └─ core/ (imperative API)
7878+```
7979+8080+### "I need to display content"
8181+8282+```
8383+Display content?
8484+├─ Plain or styled text -> components/text-display.md
8585+├─ Container with borders/background -> components/containers.md
8686+├─ Scrollable content area -> components/containers.md (scrollbox)
8787+├─ ASCII art banner/title -> components/text-display.md (ascii-font)
8888+├─ Data table with borders/wrapping -> components/code-diff.md (TextTable)
8989+├─ Code with syntax highlighting -> components/code-diff.md
9090+├─ Diff viewer (unified/split) -> components/code-diff.md
9191+├─ Line numbers with diagnostics -> components/code-diff.md
9292+└─ Markdown content (streaming) -> components/code-diff.md (markdown)
9393+```
9494+9595+### "I need user input"
9696+9797+```
9898+User input?
9999+├─ Single-line text field -> components/inputs.md (input)
100100+├─ Multi-line text editor -> components/inputs.md (textarea)
101101+├─ Select from a list (vertical) -> components/inputs.md (select)
102102+├─ Tab-based selection (horizontal) -> components/inputs.md (tab-select)
103103+└─ Custom keyboard shortcuts -> keyboard/REFERENCE.md
104104+```
105105+106106+### "I need layout/positioning"
107107+108108+```
109109+Layout?
110110+├─ Flexbox-style layouts (row, column, wrap) -> layout/REFERENCE.md
111111+├─ Absolute positioning -> layout/patterns.md
112112+├─ Responsive to terminal size -> layout/patterns.md
113113+├─ Centering content -> layout/patterns.md
114114+└─ Complex nested layouts -> layout/patterns.md
115115+```
116116+117117+### "I need animations"
118118+119119+```
120120+Animations?
121121+├─ Timeline-based animations -> animation/REFERENCE.md
122122+├─ Easing functions -> animation/REFERENCE.md
123123+├─ Property transitions -> animation/REFERENCE.md
124124+└─ Looping animations -> animation/REFERENCE.md
125125+```
126126+127127+### "I need to handle input"
128128+129129+```
130130+Input handling?
131131+├─ Keyboard events (keypress, release) -> keyboard/REFERENCE.md
132132+├─ Focus management -> keyboard/REFERENCE.md
133133+├─ Paste events -> keyboard/REFERENCE.md
134134+├─ Mouse events -> components/containers.md
135135+├─ Text selection & copy-on-select -> keyboard/REFERENCE.md (selection)
136136+└─ Clipboard (OSC 52) -> keyboard/REFERENCE.md (clipboard)
137137+```
138138+139139+### "I need to test my TUI"
140140+141141+```
142142+Testing?
143143+├─ Snapshot testing -> testing/REFERENCE.md
144144+├─ Interaction testing -> testing/REFERENCE.md
145145+├─ Test renderer setup -> testing/REFERENCE.md
146146+└─ Debugging tests -> testing/REFERENCE.md
147147+```
148148+149149+### "I need to debug/troubleshoot"
150150+151151+```
152152+Troubleshooting?
153153+├─ Runtime errors, crashes -> <framework>/gotchas.md
154154+├─ Layout issues -> layout/REFERENCE.md + layout/patterns.md
155155+├─ Input/focus issues -> keyboard/REFERENCE.md
156156+└─ Repro + regression tests -> testing/REFERENCE.md
157157+```
158158+159159+### Troubleshooting Index
160160+161161+- Terminal cleanup, crashes -> `core/gotchas.md`
162162+- Text styling not applying -> `components/text-display.md`
163163+- Input focus/shortcuts -> `keyboard/REFERENCE.md`
164164+- Layout misalignment -> `layout/REFERENCE.md`
165165+- Flaky snapshots -> `testing/REFERENCE.md`
166166+167167+For component naming differences and text modifiers, see `components/REFERENCE.md`.
168168+169169+## Product Index
170170+171171+### Frameworks
172172+| Framework | Entry File | Description |
173173+|-----------|------------|-------------|
174174+| Core | `./references/core/REFERENCE.md` | Imperative API, all primitives |
175175+| React | `./references/react/REFERENCE.md` | React reconciler for declarative TUI |
176176+| Solid | `./references/solid/REFERENCE.md` | SolidJS reconciler for declarative TUI |
177177+178178+### Cross-Cutting Concepts
179179+| Concept | Entry File | Description |
180180+|---------|------------|-------------|
181181+| Layout | `./references/layout/REFERENCE.md` | Yoga/Flexbox layout system |
182182+| Components | `./references/components/REFERENCE.md` | Component reference by category |
183183+| Keyboard | `./references/keyboard/REFERENCE.md` | Keyboard input handling |
184184+| Animation | `./references/animation/REFERENCE.md` | Timeline-based animations |
185185+| Testing | `./references/testing/REFERENCE.md` | Test renderer and snapshots |
186186+187187+### Component Categories
188188+| Category | Entry File | Components |
189189+|----------|------------|------------|
190190+| Text & Display | `./references/components/text-display.md` | text, ascii-font, styled text |
191191+| Containers | `./references/components/containers.md` | box, scrollbox, borders |
192192+| Inputs | `./references/components/inputs.md` | input, textarea, select, tab-select |
193193+| Code & Diff | `./references/components/code-diff.md` | code, line-number, diff, markdown, text-table |
194194+195195+## Resources
196196+197197+**Repository**: https://github.com/anomalyco/opentui
198198+**Core Docs**: https://github.com/anomalyco/opentui/tree/main/packages/core/docs
199199+**Examples**: https://github.com/anomalyco/opentui/tree/main/packages/core/src/examples
200200+**Awesome List**: https://github.com/msmps/awesome-opentui
···11+# Text & Display Components
22+33+Components for displaying text content in OpenTUI.
44+55+## Text Component
66+77+The primary component for displaying styled text.
88+99+### Basic Usage
1010+1111+```tsx
1212+// React/Solid
1313+<text>Hello, World!</text>
1414+1515+// With content prop
1616+<text content="Hello, World!" />
1717+1818+// Core
1919+const text = new TextRenderable(renderer, {
2020+ id: "greeting",
2121+ content: "Hello, World!",
2222+})
2323+```
2424+2525+### Styling (React/Solid)
2626+2727+For React and Solid, use **nested modifier tags** for text styling:
2828+2929+```tsx
3030+<text fg="#FFFFFF" bg="#000000">
3131+ <strong>Bold</strong>, <em>italic</em>, and <u>underlined</u>
3232+</text>
3333+```
3434+3535+> **Important**: Do NOT use `bold`, `italic`, `underline`, `dim`, `strikethrough` as props on `<text>` — they don't work. Always use nested tags like `<strong>`, `<em>`, `<u>`, or `<span>` with styling.
3636+3737+### Styling (Core) - Text Attributes
3838+3939+```typescript
4040+import { TextRenderable, TextAttributes } from "@opentui/core"
4141+4242+const text = new TextRenderable(renderer, {
4343+ content: "Styled",
4444+ attributes: TextAttributes.BOLD | TextAttributes.UNDERLINE,
4545+})
4646+```
4747+4848+**Available attributes:**
4949+- `TextAttributes.BOLD`
5050+- `TextAttributes.DIM`
5151+- `TextAttributes.ITALIC`
5252+- `TextAttributes.UNDERLINE`
5353+- `TextAttributes.BLINK`
5454+- `TextAttributes.INVERSE`
5555+- `TextAttributes.HIDDEN`
5656+- `TextAttributes.STRIKETHROUGH`
5757+5858+### Text Selection
5959+6060+```tsx
6161+<text selectable>
6262+ This text can be selected by the user
6363+</text>
6464+6565+<text selectable={false}>
6666+ This text cannot be selected
6767+</text>
6868+```
6969+7070+For copy-on-selection and the full selection API, see `keyboard/REFERENCE.md` (selection).
7171+7272+## Text Modifiers
7373+7474+Inline styling elements that must be used inside `<text>`:
7575+7676+### Span
7777+7878+Inline styled text:
7979+8080+```tsx
8181+<text>
8282+ Normal text with <span fg="red">red text</span> inline
8383+</text>
8484+```
8585+8686+### Bold/Strong
8787+8888+```tsx
8989+<text>
9090+ <strong>Bold text</strong>
9191+ <b>Also bold</b>
9292+</text>
9393+```
9494+9595+### Italic/Emphasis
9696+9797+```tsx
9898+<text>
9999+ <em>Italic text</em>
100100+ <i>Also italic</i>
101101+</text>
102102+```
103103+104104+### Underline
105105+106106+```tsx
107107+<text>
108108+ <u>Underlined text</u>
109109+</text>
110110+```
111111+112112+### Line Break
113113+114114+```tsx
115115+<text>
116116+ Line one
117117+ <br />
118118+ Line two
119119+</text>
120120+```
121121+122122+### Link
123123+124124+```tsx
125125+<text>
126126+ Visit <a href="https://example.com">our website</a>
127127+</text>
128128+```
129129+130130+### Combined Modifiers
131131+132132+```tsx
133133+<text>
134134+ <span fg="#00FF00">
135135+ <strong>Bold green</strong>
136136+ </span>
137137+ and
138138+ <span fg="#FF0000">
139139+ <em><u>italic underlined red</u></em>
140140+ </span>
141141+</text>
142142+```
143143+144144+## Styled Text Template (Core)
145145+146146+The `t` template literal for complex styling:
147147+148148+```typescript
149149+import { t, bold, italic, underline, fg, bg, dim } from "@opentui/core"
150150+151151+const styled = t`
152152+ ${bold("Bold")} and ${italic("italic")} text.
153153+ ${fg("#FF0000")("Red text")} with ${bg("#0000FF")("blue background")}.
154154+ ${dim("Dimmed")} and ${underline("underlined")}.
155155+`
156156+157157+const text = new TextRenderable(renderer, {
158158+ content: styled,
159159+})
160160+```
161161+162162+### Style Functions
163163+164164+| Function | Description |
165165+|----------|-------------|
166166+| `bold(text)` | Bold text |
167167+| `italic(text)` | Italic text |
168168+| `underline(text)` | Underlined text |
169169+| `dim(text)` | Dimmed text |
170170+| `strikethrough(text)` | Strikethrough text |
171171+| `fg(color)(text)` | Set foreground color |
172172+| `bg(color)(text)` | Set background color |
173173+174174+## ASCII Font Component
175175+176176+Display large ASCII art text banners.
177177+178178+### Basic Usage
179179+180180+```tsx
181181+// React
182182+<ascii-font text="TITLE" font="tiny" />
183183+184184+// Solid
185185+<ascii_font text="TITLE" font="tiny" />
186186+187187+// Core
188188+const title = new ASCIIFontRenderable(renderer, {
189189+ id: "title",
190190+ text: "TITLE",
191191+ font: "tiny",
192192+})
193193+```
194194+195195+### Available Fonts
196196+197197+| Font | Description |
198198+|------|-------------|
199199+| `tiny` | Compact ASCII font |
200200+| `block` | Block-style letters |
201201+| `slick` | Sleek modern style |
202202+| `shade` | Shaded 3D effect |
203203+204204+### Styling
205205+206206+```tsx
207207+// React
208208+<ascii-font
209209+ text="HELLO"
210210+ font="block"
211211+ color="#00FF00"
212212+/>
213213+214214+// Core
215215+import { RGBA } from "@opentui/core"
216216+217217+const title = new ASCIIFontRenderable(renderer, {
218218+ text: "HELLO",
219219+ font: "block",
220220+ color: RGBA.fromHex("#00FF00"),
221221+})
222222+```
223223+224224+### Example Output
225225+226226+```
227227+Font: tiny
228228+╭─╮╭─╮╭─╮╭╮╭╮╭─╮╶╮╶ ╶╮
229229+│ ││─┘├┤ │╰╯││ │ │
230230+╰─╯╵ ╰─╯╵ ╵╰─╯╶╯╶╰─╯
231231+232232+Font: block
233233+█▀▀█ █▀▀█ █▀▀ █▀▀▄
234234+█ █ █▀▀▀ █▀▀ █ █
235235+▀▀▀▀ ▀ ▀▀▀ ▀ ▀
236236+```
237237+238238+## Colors
239239+240240+### Color Formats
241241+242242+```tsx
243243+// Hex colors
244244+<text fg="#FF0000">Red</text>
245245+<text fg="#F00">Short hex</text>
246246+247247+// Named colors
248248+<text fg="red">Red</text>
249249+<text fg="blue">Blue</text>
250250+251251+// Transparent
252252+<text bg="transparent">No background</text>
253253+```
254254+255255+### RGBA Class
256256+257257+The `RGBA` class from `@opentui/core` can be used in **all frameworks** (Core, React, Solid) for programmatic color manipulation:
258258+259259+```typescript
260260+import { RGBA } from "@opentui/core"
261261+262262+// From hex string (most common)
263263+const red = RGBA.fromHex("#FF0000")
264264+const shortHex = RGBA.fromHex("#F00") // Short form supported
265265+266266+// From integers (0-255 range for each channel)
267267+const green = RGBA.fromInts(0, 255, 0, 255) // r, g, b, a
268268+const semiGreen = RGBA.fromInts(0, 255, 0, 128) // 50% transparent
269269+270270+// From normalized floats (0.0-1.0 range)
271271+const blue = RGBA.fromValues(0.0, 0.0, 1.0, 1.0) // r, g, b, a
272272+const overlay = RGBA.fromValues(0.1, 0.1, 0.1, 0.7) // Dark semi-transparent
273273+274274+// Common use cases
275275+const backgroundColor = RGBA.fromHex("#1a1a2e")
276276+const textColor = RGBA.fromHex("#FFFFFF")
277277+const borderColor = RGBA.fromInts(122, 162, 247, 255) // Tokyo Night blue
278278+const shadowColor = RGBA.fromValues(0.0, 0.0, 0.0, 0.5) // 50% black
279279+```
280280+281281+**When to use each method:**
282282+- `fromHex()` - When working with design specs or CSS colors
283283+- `fromInts()` - When you have 8-bit color values (0-255)
284284+- `fromValues()` - When doing color math or interpolation (normalized 0.0-1.0)
285285+286286+### Using RGBA in React/Solid
287287+288288+```tsx
289289+// React or Solid - RGBA works with color props
290290+import { RGBA } from "@opentui/core"
291291+292292+const primaryColor = RGBA.fromHex("#7aa2f7")
293293+294294+function MyComponent() {
295295+ return (
296296+ <box backgroundColor={primaryColor} borderColor={primaryColor}>
297297+ <text fg={RGBA.fromHex("#c0caf5")}>Styled with RGBA</text>
298298+ </box>
299299+ )
300300+}
301301+```
302302+303303+Most props that accept color strings (`"#FF0000"`, `"red"`) also accept `RGBA` objects directly.
304304+305305+## Text Wrapping
306306+307307+Text wraps based on parent container:
308308+309309+```tsx
310310+<box width={40}>
311311+ <text>
312312+ This long text will wrap when it reaches the edge of the
313313+ 40-character wide parent container.
314314+ </text>
315315+</box>
316316+```
317317+318318+## Dynamic Content
319319+320320+### React
321321+322322+```tsx
323323+function Counter() {
324324+ const [count, setCount] = useState(0)
325325+ return <text>Count: {count}</text>
326326+}
327327+```
328328+329329+### Solid
330330+331331+```tsx
332332+function Counter() {
333333+ const [count, setCount] = createSignal(0)
334334+ return <text>Count: {count()}</text>
335335+}
336336+```
337337+338338+### Core
339339+340340+```typescript
341341+const text = new TextRenderable(renderer, {
342342+ id: "counter",
343343+ content: "Count: 0",
344344+})
345345+346346+// Update later
347347+text.setContent("Count: 1")
348348+```
349349+350350+## Gotchas
351351+352352+### Text Modifiers Outside Text
353353+354354+```tsx
355355+// WRONG - modifiers only work inside <text>
356356+<box>
357357+ <strong>Won't work</strong>
358358+</box>
359359+360360+// CORRECT
361361+<box>
362362+ <text>
363363+ <strong>This works</strong>
364364+ </text>
365365+</box>
366366+```
367367+368368+### Empty Text
369369+370370+```tsx
371371+// May cause layout issues
372372+<text></text>
373373+374374+// Better - use space or conditional
375375+<text>{content || " "}</text>
376376+```
377377+378378+### Color Format
379379+380380+```tsx
381381+// WRONG
382382+<text fg="FF0000">Missing #</text>
383383+384384+// CORRECT
385385+<text fg="#FF0000">With #</text>
386386+```
+145
skills/opentui/references/core/REFERENCE.md
···11+# OpenTUI Core (@opentui/core)
22+33+The foundational library for building terminal user interfaces. Provides an imperative API with all primitives, giving you maximum control over rendering, state, and behavior.
44+55+## Overview
66+77+OpenTUI Core runs on Bun with native Zig bindings for performance-critical operations:
88+- **Renderer**: Manages terminal output, input events, and the rendering loop
99+- **Renderables**: Hierarchical UI building blocks with Yoga layout
1010+- **Constructs**: Declarative wrappers for composing Renderables
1111+- **FrameBuffer**: Low-level 2D rendering surface for custom graphics
1212+1313+## When to Use Core
1414+1515+Use the core imperative API when:
1616+- Building a library or framework on top of OpenTUI
1717+- Need maximum control over rendering and state
1818+- Want smallest possible bundle size (no React/Solid runtime)
1919+- Building performance-critical applications
2020+- Integrating with existing imperative codebases
2121+2222+## When NOT to Use Core
2323+2424+| Scenario | Use Instead |
2525+|----------|-------------|
2626+| Familiar with React patterns | `@opentui/react` |
2727+| Want fine-grained reactivity | `@opentui/solid` |
2828+| Building typical applications | React or Solid reconciler |
2929+| Rapid prototyping | React or Solid reconciler |
3030+3131+## Quick Start
3232+3333+### Using create-tui (Recommended)
3434+3535+```bash
3636+bunx create-tui@latest -t core my-app
3737+cd my-app
3838+bun run src/index.ts
3939+```
4040+4141+The CLI creates the `my-app` directory for you - it must **not already exist**.
4242+4343+**Agent guidance**: Always use autonomous mode with `-t <template>` flag. Never use interactive mode (`bunx create-tui@latest my-app` without `-t`) as it requires user prompts that agents cannot respond to.
4444+4545+### Manual Setup
4646+4747+```bash
4848+mkdir my-tui && cd my-tui
4949+bun init
5050+bun install @opentui/core
5151+```
5252+5353+```typescript
5454+import { createCliRenderer, TextRenderable, BoxRenderable } from "@opentui/core"
5555+5656+const renderer = await createCliRenderer()
5757+5858+// Create a box container
5959+const container = new BoxRenderable(renderer, {
6060+ id: "container",
6161+ width: 40,
6262+ height: 10,
6363+ border: true,
6464+ borderStyle: "rounded",
6565+ padding: 1,
6666+})
6767+6868+// Create text inside the box
6969+const greeting = new TextRenderable(renderer, {
7070+ id: "greeting",
7171+ content: "Hello, OpenTUI!",
7272+ fg: "#00FF00",
7373+})
7474+7575+// Compose the tree
7676+container.add(greeting)
7777+renderer.root.add(container)
7878+```
7979+8080+## Core Concepts
8181+8282+### Renderer
8383+8484+The `CliRenderer` orchestrates everything:
8585+- Manages the terminal viewport and alternate screen
8686+- Handles input events (keyboard, mouse, paste)
8787+- Runs the rendering loop (configurable FPS)
8888+- Provides the root node for the renderable tree
8989+9090+### Renderables vs Constructs
9191+9292+| Renderables (Imperative) | Constructs (Declarative) |
9393+|--------------------------|--------------------------|
9494+| `new TextRenderable(renderer, {...})` | `Text({...})` |
9595+| Requires renderer at creation | Creates VNode, instantiated later |
9696+| Direct mutation via methods | Chained calls recorded, replayed on instantiation |
9797+| Full control | Cleaner composition |
9898+9999+### Storage Options
100100+101101+Renderables can be composed in two ways:
102102+1. **Imperative**: Create instances, call `.add()` to compose
103103+2. **Declarative (Constructs)**: Create VNodes, pass children as arguments
104104+105105+## Essential Commands
106106+107107+```bash
108108+bun install @opentui/core # Install
109109+bun run src/index.ts # Run directly (no build needed)
110110+bun test # Run tests
111111+```
112112+113113+## Runtime Requirements
114114+115115+OpenTUI runs on Bun and uses Zig for native builds.
116116+117117+```bash
118118+# Package management
119119+bun install @opentui/core
120120+121121+# Running
122122+bun run src/index.ts
123123+bun test
124124+125125+# Building (only needed for native code changes)
126126+bun run build
127127+```
128128+129129+**Zig** is required for building native components.
130130+131131+## In This Reference
132132+133133+- [Configuration](./configuration.md) - Renderer options, environment variables
134134+- [API](./api.md) - Renderer, Renderables, types, utilities
135135+- [Patterns](./patterns.md) - Composition, events, state management
136136+- [Gotchas](./gotchas.md) - Common issues, debugging, limitations
137137+138138+## See Also
139139+140140+- [React](../react/REFERENCE.md) - React reconciler for declarative TUI
141141+- [Solid](../solid/REFERENCE.md) - Solid reconciler for declarative TUI
142142+- [Layout](../layout/REFERENCE.md) - Yoga/Flexbox layout system
143143+- [Components](../components/REFERENCE.md) - Component reference by category
144144+- [Keyboard](../keyboard/REFERENCE.md) - Input handling and shortcuts
145145+- [Testing](../testing/REFERENCE.md) - Test renderer and snapshots
+543
skills/opentui/references/core/api.md
···11+# Core API Reference
22+33+## Renderer
44+55+### createCliRenderer(config?)
66+77+Creates and initializes the CLI renderer.
88+99+```typescript
1010+import { createCliRenderer, type CliRendererConfig } from "@opentui/core"
1111+1212+const renderer = await createCliRenderer({
1313+ targetFPS: 60, // Target frames per second
1414+ exitOnCtrlC: true, // Exit process on Ctrl+C
1515+ consoleOptions: { // Debug console overlay
1616+ position: ConsolePosition.BOTTOM,
1717+ sizePercent: 30,
1818+ startInDebugMode: false,
1919+ },
2020+ onDestroy: () => {}, // Cleanup callback
2121+})
2222+```
2323+2424+### CliRenderer Instance
2525+2626+```typescript
2727+renderer.root // Root renderable node
2828+renderer.width // Terminal width in columns
2929+renderer.height // Terminal height in rows
3030+renderer.keyInput // Keyboard event emitter
3131+renderer.console // Console overlay controller
3232+3333+renderer.start() // Start render loop
3434+renderer.stop() // Stop render loop
3535+renderer.destroy() // Cleanup and exit alternate screen
3636+renderer.requestRender() // Request a re-render
3737+3838+renderer.setCursorStyle(options) // Set cursor style
3939+renderer.setCursorColor(color) // Set cursor color
4040+renderer.setMousePointer(style) // Set mouse pointer shape
4141+```
4242+4343+### Cursor & Mouse Pointer
4444+4545+```typescript
4646+import { type CursorStyleOptions, type MousePointerStyle } from "@opentui/core"
4747+4848+// Set cursor style (options object)
4949+renderer.setCursorStyle({
5050+ style: "block", // "block" | "line" | "underline" | "default"
5151+ blinking: true, // Cursor blink
5252+ color: RGBA.fromHex("#FF0000"), // Cursor color
5353+ cursor: "pointer", // Mouse pointer shape
5454+})
5555+5656+// Set mouse pointer shape (OSC 22)
5757+renderer.setMousePointer("pointer")
5858+// Available: "default" | "pointer" | "text" | "crosshair" | "move" | "not-allowed"
5959+```
6060+6161+### Renderer Events
6262+6363+```typescript
6464+renderer.on("resize", (width, height) => {}) // Terminal resized
6565+renderer.on("focus", () => {}) // Terminal window gained focus
6666+renderer.on("blur", () => {}) // Terminal window lost focus
6767+renderer.on("theme_mode", (mode) => {}) // "dark" | "light"
6868+renderer.on("capabilities", (caps) => {}) // Terminal capabilities detected
6969+renderer.on("selection", (selection) => {}) // Text selection finished (mouse-up)
7070+renderer.on("destroy", () => {}) // Renderer destroyed
7171+renderer.on("memory:snapshot", (snapshot) => {}) // Memory snapshot
7272+renderer.on("debugOverlay:toggle", () => {}) // Debug overlay toggled
7373+```
7474+7575+### Console Overlay
7676+7777+```typescript
7878+renderer.console.show() // Show console overlay
7979+renderer.console.hide() // Hide console overlay
8080+renderer.console.toggle() // Toggle visibility/focus
8181+renderer.console.clear() // Clear console contents
8282+```
8383+8484+## Renderables
8585+8686+All renderables extend the base `Renderable` class and share common properties.
8787+8888+### Common Properties
8989+9090+```typescript
9191+interface CommonProps {
9292+ id?: string // Unique identifier
9393+9494+ // Positioning
9595+ position?: "relative" | "absolute"
9696+ left?: number | string
9797+ top?: number | string
9898+ right?: number | string
9999+ bottom?: number | string
100100+101101+ // Dimensions
102102+ width?: number | string | "auto"
103103+ height?: number | string | "auto"
104104+ minWidth?: number
105105+ minHeight?: number
106106+ maxWidth?: number
107107+ maxHeight?: number
108108+109109+ // Flexbox
110110+ flexDirection?: "row" | "column" | "row-reverse" | "column-reverse"
111111+ flexGrow?: number
112112+ flexShrink?: number
113113+ flexBasis?: number | string
114114+ flexWrap?: "nowrap" | "wrap" | "wrap-reverse"
115115+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly"
116116+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline"
117117+ alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline"
118118+ alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around"
119119+120120+ // Spacing
121121+ padding?: number
122122+ paddingTop?: number
123123+ paddingRight?: number
124124+ paddingBottom?: number
125125+ paddingLeft?: number
126126+ margin?: number
127127+ marginTop?: number
128128+ marginRight?: number
129129+ marginBottom?: number
130130+ marginLeft?: number
131131+ gap?: number
132132+133133+ // Display
134134+ display?: "flex" | "none"
135135+ overflow?: "visible" | "hidden" | "scroll"
136136+ zIndex?: number
137137+}
138138+```
139139+140140+### Renderable Methods
141141+142142+```typescript
143143+renderable.add(child) // Add child renderable
144144+renderable.remove(child) // Remove child renderable
145145+renderable.getRenderable(id) // Find child by ID
146146+renderable.focus() // Focus this renderable
147147+renderable.blur() // Remove focus
148148+renderable.destroy() // Destroy and cleanup
149149+150150+renderable.on(event, handler) // Add event listener
151151+renderable.off(event, handler) // Remove event listener
152152+renderable.emit(event, ...args) // Emit event
153153+```
154154+155155+### TextRenderable
156156+157157+Display styled text content.
158158+159159+```typescript
160160+import { TextRenderable, TextAttributes, t, bold, fg, underline } from "@opentui/core"
161161+162162+const text = new TextRenderable(renderer, {
163163+ id: "text",
164164+ content: "Hello World",
165165+ fg: "#FFFFFF", // Foreground color
166166+ bg: "#000000", // Background color
167167+ attributes: TextAttributes.BOLD | TextAttributes.UNDERLINE,
168168+ selectable: true, // Allow text selection
169169+})
170170+171171+// Styled text with template literals
172172+const styled = new TextRenderable(renderer, {
173173+ content: t`${bold("Bold")} and ${fg("#FF0000")(underline("red underlined"))}`,
174174+})
175175+```
176176+177177+**TextAttributes flags:**
178178+- `TextAttributes.BOLD`
179179+- `TextAttributes.DIM`
180180+- `TextAttributes.ITALIC`
181181+- `TextAttributes.UNDERLINE`
182182+- `TextAttributes.BLINK`
183183+- `TextAttributes.INVERSE`
184184+- `TextAttributes.HIDDEN`
185185+- `TextAttributes.STRIKETHROUGH`
186186+187187+### BoxRenderable
188188+189189+Container with borders and layout.
190190+191191+```typescript
192192+import { BoxRenderable } from "@opentui/core"
193193+194194+const box = new BoxRenderable(renderer, {
195195+ id: "box",
196196+ width: 40,
197197+ height: 10,
198198+ backgroundColor: "#1a1a2e",
199199+ border: true,
200200+ borderStyle: "single" | "double" | "rounded" | "bold" | "none",
201201+ borderColor: "#FFFFFF",
202202+ title: "Panel Title",
203203+ titleAlignment: "left" | "center" | "right",
204204+ onMouseDown: (event) => {},
205205+ onMouseUp: (event) => {},
206206+ onMouseMove: (event) => {},
207207+})
208208+```
209209+210210+### InputRenderable
211211+212212+Single-line text input.
213213+214214+```typescript
215215+import { InputRenderable, InputRenderableEvents } from "@opentui/core"
216216+217217+const input = new InputRenderable(renderer, {
218218+ id: "input",
219219+ width: 30,
220220+ placeholder: "Enter text...",
221221+ value: "", // Initial value
222222+ backgroundColor: "#1a1a1a",
223223+ textColor: "#FFFFFF",
224224+ cursorColor: "#00FF00",
225225+ focusedBackgroundColor: "#2a2a2a",
226226+})
227227+228228+input.on(InputRenderableEvents.CHANGE, (value: string) => {
229229+ console.log("Value:", value)
230230+})
231231+232232+input.focus() // Must be focused to receive input
233233+```
234234+235235+### SelectRenderable
236236+237237+List selection component.
238238+239239+```typescript
240240+import { SelectRenderable, SelectRenderableEvents } from "@opentui/core"
241241+242242+const select = new SelectRenderable(renderer, {
243243+ id: "select",
244244+ width: 30,
245245+ height: 10,
246246+ options: [
247247+ { name: "Option 1", description: "First option", value: "1" },
248248+ { name: "Option 2", description: "Second option", value: "2" },
249249+ ],
250250+ selectedIndex: 0,
251251+})
252252+253253+// Called when Enter is pressed - selection confirmed
254254+select.on(SelectRenderableEvents.ITEM_SELECTED, (index, option) => {
255255+ console.log("Selected:", option.name)
256256+ performAction(option)
257257+})
258258+259259+// Called when navigating with arrow keys
260260+select.on(SelectRenderableEvents.SELECTION_CHANGED, (index, option) => {
261261+ console.log("Browsing:", option.name)
262262+ showPreview(option)
263263+})
264264+265265+select.focus() // Navigate with up/down/j/k, select with enter
266266+```
267267+268268+**Event distinction:**
269269+- `ITEM_SELECTED` - Enter key pressed, user confirms selection
270270+- `SELECTION_CHANGED` - Arrow keys, user navigating/browsing options
271271+272272+### TabSelectRenderable
273273+274274+Horizontal tab selection.
275275+276276+```typescript
277277+import { TabSelectRenderable, TabSelectRenderableEvents } from "@opentui/core"
278278+279279+const tabs = new TabSelectRenderable(renderer, {
280280+ id: "tabs",
281281+ width: 60,
282282+ options: [
283283+ { name: "Home", description: "Dashboard" },
284284+ { name: "Settings", description: "Configuration" },
285285+ ],
286286+ tabWidth: 20,
287287+})
288288+289289+// Called when Enter is pressed - tab selected
290290+tabs.on(TabSelectRenderableEvents.ITEM_SELECTED, (index, option) => {
291291+ console.log("Tab selected:", option.name)
292292+ switchToTab(index)
293293+})
294294+295295+// Called when navigating with arrow keys
296296+tabs.on(TabSelectRenderableEvents.SELECTION_CHANGED, (index, option) => {
297297+ console.log("Browsing tab:", option.name)
298298+})
299299+300300+tabs.focus() // Navigate with left/right/[/], select with enter
301301+```
302302+303303+**Event distinction** (same as SelectRenderable):
304304+- `ITEM_SELECTED` - Enter key pressed, user confirms tab
305305+- `SELECTION_CHANGED` - Arrow keys, user navigating tabs
306306+307307+### ScrollBoxRenderable
308308+309309+Scrollable container.
310310+311311+```typescript
312312+import { ScrollBoxRenderable } from "@opentui/core"
313313+314314+const scrollbox = new ScrollBoxRenderable(renderer, {
315315+ id: "scrollbox",
316316+ width: 40,
317317+ height: 20,
318318+ showScrollbar: true,
319319+ scrollbarOptions: {
320320+ showArrows: true,
321321+ trackOptions: {
322322+ foregroundColor: "#7aa2f7",
323323+ backgroundColor: "#414868",
324324+ },
325325+ },
326326+})
327327+328328+// Add content that exceeds viewport
329329+for (let i = 0; i < 100; i++) {
330330+ scrollbox.add(new TextRenderable(renderer, {
331331+ id: `line-${i}`,
332332+ content: `Line ${i}`,
333333+ }))
334334+}
335335+336336+scrollbox.focus() // Scroll with arrow keys
337337+```
338338+339339+### ASCIIFontRenderable
340340+341341+ASCII art text.
342342+343343+```typescript
344344+import { ASCIIFontRenderable, RGBA } from "@opentui/core"
345345+346346+const title = new ASCIIFontRenderable(renderer, {
347347+ id: "title",
348348+ text: "OPENTUI",
349349+ font: "tiny" | "block" | "slick" | "shade",
350350+ color: RGBA.fromHex("#FFFFFF"),
351351+})
352352+```
353353+354354+### FrameBufferRenderable
355355+356356+Low-level 2D rendering surface.
357357+358358+```typescript
359359+import { FrameBufferRenderable, RGBA } from "@opentui/core"
360360+361361+const canvas = new FrameBufferRenderable(renderer, {
362362+ id: "canvas",
363363+ width: 50,
364364+ height: 20,
365365+})
366366+367367+// Direct pixel manipulation
368368+canvas.frameBuffer.fillRect(10, 5, 20, 8, RGBA.fromHex("#FF0000"))
369369+canvas.frameBuffer.drawText("Custom", 12, 7, RGBA.fromHex("#FFFFFF"))
370370+canvas.frameBuffer.setCell(x, y, char, fg, bg)
371371+```
372372+373373+## Constructs (VNode API)
374374+375375+Declarative wrappers that create VNodes instead of direct instances.
376376+377377+```typescript
378378+import { Text, Box, Input, Select, instantiate, delegate } from "@opentui/core"
379379+380380+// Create VNode tree
381381+const ui = Box(
382382+ { border: true, padding: 1 },
383383+ Text({ content: "Hello" }),
384384+ Input({ placeholder: "Type here..." }),
385385+)
386386+387387+// Instantiate onto renderer
388388+renderer.root.add(ui)
389389+390390+// Delegate focus to nested element
391391+const form = delegate(
392392+ { focus: "email-input" },
393393+ Box(
394394+ {},
395395+ Text({ content: "Email:" }),
396396+ Input({ id: "email-input", placeholder: "you@example.com" }),
397397+ ),
398398+)
399399+form.focus() // Focuses the input, not the box
400400+```
401401+402402+## Colors (RGBA)
403403+404404+The `RGBA` class is exported from `@opentui/core` but works across **all frameworks** (Core, React, Solid). Use it for programmatic color manipulation.
405405+406406+### Creating Colors
407407+408408+```typescript
409409+import { RGBA, parseColor } from "@opentui/core"
410410+411411+// From hex string (most common)
412412+RGBA.fromHex("#FF0000") // Full hex
413413+RGBA.fromHex("#F00") // Short hex
414414+415415+// From integers (0-255 range)
416416+RGBA.fromInts(255, 0, 0, 255) // r, g, b, a - fully opaque red
417417+RGBA.fromInts(255, 0, 0, 128) // 50% transparent red
418418+RGBA.fromInts(0, 0, 0, 0) // Fully transparent
419419+420420+// From normalized floats (0.0-1.0 range)
421421+RGBA.fromValues(1.0, 0.0, 0.0, 1.0) // Fully opaque red
422422+RGBA.fromValues(0.1, 0.1, 0.1, 0.7) // Dark gray, 70% opaque
423423+RGBA.fromValues(0.0, 0.5, 1.0, 1.0) // Light blue
424424+```
425425+426426+### Common Color Patterns
427427+428428+```typescript
429429+// Theme colors
430430+const primary = RGBA.fromHex("#7aa2f7") // Tokyo Night blue
431431+const background = RGBA.fromHex("#1a1a2e")
432432+const foreground = RGBA.fromHex("#c0caf5")
433433+const error = RGBA.fromHex("#f7768e")
434434+435435+// Overlays and shadows
436436+const modalOverlay = RGBA.fromValues(0.0, 0.0, 0.0, 0.5) // 50% black
437437+const shadow = RGBA.fromInts(0, 0, 0, 77) // 30% black
438438+439439+// Borders
440440+const activeBorder = RGBA.fromHex("#7aa2f7")
441441+const inactiveBorder = RGBA.fromInts(65, 72, 104, 255)
442442+```
443443+444444+### parseColor Utility
445445+446446+```typescript
447447+// Accepts multiple formats
448448+parseColor("#FF0000") // Hex string
449449+parseColor("red") // CSS color name
450450+parseColor("transparent") // Special values
451451+parseColor(RGBA.fromHex("#F00")) // Pass-through RGBA objects
452452+```
453453+454454+### When to Use Each Method
455455+456456+| Method | Use When |
457457+|--------|----------|
458458+| `fromHex()` | Working with design specs, CSS colors, config files |
459459+| `fromInts()` | You have 8-bit values (0-255), common in graphics |
460460+| `fromValues()` | Doing color interpolation, animations, math |
461461+| `parseColor()` | Accepting user input or config that could be any format |
462462+463463+### Using RGBA in React/Solid
464464+465465+```tsx
466466+// Import from @opentui/core, use in any framework
467467+import { RGBA } from "@opentui/core"
468468+469469+// React or Solid component
470470+function ThemedBox() {
471471+ const bg = RGBA.fromHex("#1a1a2e")
472472+ const border = RGBA.fromInts(122, 162, 247, 255)
473473+474474+ return (
475475+ <box backgroundColor={bg} borderColor={border} border>
476476+ <text fg={RGBA.fromHex("#c0caf5")}>Works everywhere!</text>
477477+ </box>
478478+ )
479479+}
480480+```
481481+482482+Color props in React/Solid accept both string formats (`"#FF0000"`, `"red"`) and `RGBA` objects.
483483+484484+## Keyboard Input
485485+486486+```typescript
487487+import { type KeyEvent } from "@opentui/core"
488488+489489+renderer.keyInput.on("keypress", (key: KeyEvent) => {
490490+ console.log(key.name) // "a", "escape", "f1", etc.
491491+ console.log(key.sequence) // Raw escape sequence
492492+ console.log(key.ctrl) // Ctrl held
493493+ console.log(key.shift) // Shift held
494494+ console.log(key.meta) // Alt held
495495+ console.log(key.option) // Option held (macOS)
496496+ console.log(key.eventType) // "press" | "release" | "repeat"
497497+})
498498+499499+renderer.keyInput.on("paste", (event: PasteEvent) => {
500500+ const text = decodePasteBytes(event.bytes)
501501+ console.log("Pasted:", text)
502502+})
503503+```
504504+505505+## Animation Timeline
506506+507507+```typescript
508508+import { Timeline, engine } from "@opentui/core"
509509+510510+const timeline = new Timeline({
511511+ duration: 2000,
512512+ loop: false,
513513+ autoplay: true,
514514+})
515515+516516+timeline.add(
517517+ { width: 0 },
518518+ {
519519+ width: 50,
520520+ duration: 1000,
521521+ ease: "easeOutQuad",
522522+ onUpdate: (anim) => {
523523+ box.setWidth(anim.targets[0].width)
524524+ },
525525+ },
526526+)
527527+528528+engine.attach(renderer)
529529+engine.addTimeline(timeline)
530530+```
531531+532532+## Type Exports
533533+534534+```typescript
535535+import type {
536536+ CliRenderer,
537537+ CliRendererConfig,
538538+ RenderContext,
539539+ KeyEvent,
540540+ Renderable,
541541+ // ... and more
542542+} from "@opentui/core"
543543+```
+168
skills/opentui/references/core/configuration.md
···11+# Core Configuration
22+33+## Renderer Configuration
44+55+### createCliRenderer Options
66+77+```typescript
88+import { createCliRenderer, ConsolePosition } from "@opentui/core"
99+1010+const renderer = await createCliRenderer({
1111+ // Rendering
1212+ targetFPS: 60, // Target frames per second (default: 60)
1313+1414+ // Behavior
1515+ exitOnCtrlC: true, // Exit on Ctrl+C (default: true)
1616+1717+ // Console overlay
1818+ consoleOptions: {
1919+ position: ConsolePosition.BOTTOM, // BOTTOM | TOP | LEFT | RIGHT
2020+ sizePercent: 30, // Percentage of screen
2121+ colorInfo: "#00FFFF",
2222+ colorWarn: "#FFFF00",
2323+ colorError: "#FF0000",
2424+ colorDebug: "#888888",
2525+ startInDebugMode: false,
2626+ },
2727+2828+ // Lifecycle
2929+ onDestroy: () => {
3030+ // Cleanup callback
3131+ },
3232+})
3333+```
3434+3535+## Environment Variables
3636+3737+OpenTUI respects several environment variables for configuration and debugging.
3838+3939+### Debug & Development
4040+4141+| Variable | Type | Default | Description |
4242+|----------|------|---------|-------------|
4343+| `OTUI_DEBUG` | boolean | false | Enable debug mode, capture raw input |
4444+| `OTUI_DEBUG_FFI` | boolean | false | Debug logging for FFI bindings |
4545+| `OTUI_TRACE_FFI` | boolean | false | Tracing for FFI bindings |
4646+| `OTUI_SHOW_STATS` | boolean | false | Show debug overlay at startup |
4747+| `OTUI_DUMP_CAPTURES` | boolean | false | Dump captured output on exit |
4848+4949+### Console
5050+5151+| Variable | Type | Default | Description |
5252+|----------|------|---------|-------------|
5353+| `OTUI_USE_CONSOLE` | boolean | true | Enable console capture |
5454+| `SHOW_CONSOLE` | boolean | false | Show console at startup |
5555+5656+### Rendering
5757+5858+| Variable | Type | Default | Description |
5959+|----------|------|---------|-------------|
6060+| `OTUI_NO_NATIVE_RENDER` | boolean | false | Disable ANSI output (for debugging) |
6161+| `OTUI_USE_ALTERNATE_SCREEN` | boolean | true | Use alternate screen buffer |
6262+| `OTUI_OVERRIDE_STDOUT` | boolean | true | Override stdout stream |
6363+6464+### Terminal Capabilities
6565+6666+| Variable | Type | Default | Description |
6767+|----------|------|---------|-------------|
6868+| `OPENTUI_NO_GRAPHICS` | boolean | false | Disable Kitty graphics protocol |
6969+| `OPENTUI_FORCE_UNICODE` | boolean | false | Force Mode 2026 Unicode support |
7070+| `OPENTUI_FORCE_WCWIDTH` | boolean | false | Use wcwidth for character width |
7171+| `OPENTUI_FORCE_NOZWJ` | boolean | false | Disable ZWJ emoji joining |
7272+| `OPENTUI_FORCE_EXPLICIT_WIDTH` | string | - | Force explicit width ("true"/"false") |
7373+7474+### Tree-sitter (Syntax Highlighting)
7575+7676+| Variable | Type | Default | Description |
7777+|----------|------|---------|-------------|
7878+| `OTUI_TS_STYLE_WARN` | boolean | false | Warn on missing syntax styles |
7979+| `OTUI_TREE_SITTER_WORKER_PATH` | string | "" | Custom tree-sitter worker path |
8080+8181+### XDG Paths
8282+8383+| Variable | Type | Default | Description |
8484+|----------|------|---------|-------------|
8585+| `XDG_CONFIG_HOME` | string | "" | User config directory |
8686+| `XDG_DATA_HOME` | string | "" | User data directory |
8787+8888+## Usage Examples
8989+9090+### Development Mode
9191+9292+```bash
9393+# Show debug overlay and console
9494+OTUI_SHOW_STATS=true SHOW_CONSOLE=true bun run src/index.ts
9595+9696+# Debug FFI issues
9797+OTUI_DEBUG_FFI=true OTUI_TRACE_FFI=true bun run src/index.ts
9898+9999+# Disable native rendering for testing
100100+OTUI_NO_NATIVE_RENDER=true bun run src/index.ts
101101+```
102102+103103+### Terminal Compatibility
104104+105105+```bash
106106+# Force wcwidth for problematic terminals
107107+OPENTUI_FORCE_WCWIDTH=true bun run src/index.ts
108108+109109+# Disable graphics for SSH sessions
110110+OPENTUI_NO_GRAPHICS=true bun run src/index.ts
111111+```
112112+113113+## Project Setup
114114+115115+### package.json
116116+117117+```json
118118+{
119119+ "name": "my-tui-app",
120120+ "type": "module",
121121+ "scripts": {
122122+ "start": "bun run src/index.ts",
123123+ "dev": "bun --watch run src/index.ts",
124124+ "test": "bun test"
125125+ },
126126+ "dependencies": {
127127+ "@opentui/core": "latest"
128128+ },
129129+ "devDependencies": {
130130+ "@types/bun": "latest",
131131+ "typescript": "latest"
132132+ }
133133+}
134134+```
135135+136136+### tsconfig.json
137137+138138+```json
139139+{
140140+ "compilerOptions": {
141141+ "lib": ["ESNext"],
142142+ "target": "ESNext",
143143+ "module": "NodeNext",
144144+ "moduleResolution": "NodeNext",
145145+ "strict": true,
146146+ "skipLibCheck": true,
147147+ "noEmit": true,
148148+ "types": ["bun-types"]
149149+ },
150150+ "include": ["src/**/*"]
151151+}
152152+```
153153+154154+> **Note**: OpenTUI uses `NodeNext` module resolution. All internal imports use `.js` extensions. If you use `bundler` resolution, imports still work but `NodeNext` is recommended for compatibility.
155155+156156+## Building Native Code
157157+158158+Native code changes require rebuilding:
159159+160160+```bash
161161+# From repo root (if developing OpenTUI itself)
162162+bun run build
163163+164164+# Zig is required for native compilation
165165+# Install: https://ziglang.org/learn/getting-started/
166166+```
167167+168168+**Note**: TypeScript changes do NOT require building. Bun runs TypeScript directly.
+393
skills/opentui/references/core/gotchas.md
···11+# Core Gotchas
22+33+## Runtime Environment
44+55+### Use Bun, Not Node.js
66+77+OpenTUI is built for Bun. Always use Bun commands:
88+99+```bash
1010+# CORRECT
1111+bun install @opentui/core
1212+bun run src/index.ts
1313+bun test
1414+1515+# WRONG
1616+npm install @opentui/core
1717+node src/index.ts
1818+npx jest
1919+```
2020+2121+### Bun APIs to Use
2222+2323+Prefer Bun's built-in APIs for your application code:
2424+2525+```typescript
2626+// CORRECT - Bun APIs
2727+Bun.serve({ ... }) // Instead of express
2828+Bun.$`ls -la` // Instead of execa
2929+import { Database } from "bun:sqlite" // Instead of better-sqlite3
3030+3131+// WRONG - Node.js patterns
3232+import express from "express"
3333+```
3434+3535+> **Note**: OpenTUI itself uses `node:fs` internally for file I/O (for broader compatibility), but your application code should still prefer Bun APIs where available.
3636+3737+### Avoid process.exit()
3838+3939+**Never use `process.exit()` directly** - it prevents proper terminal cleanup and can leave the terminal in a broken state (alternate screen mode, raw input mode, etc.).
4040+4141+```typescript
4242+// WRONG - Terminal may be left in broken state
4343+if (error) {
4444+ console.error("Fatal error")
4545+ process.exit(1)
4646+}
4747+4848+// CORRECT - Use renderer.destroy() for cleanup
4949+if (error) {
5050+ console.error("Fatal error")
5151+ await renderer.destroy()
5252+ process.exit(1) // Only after destroy
5353+}
5454+5555+// BETTER - Let destroy handle exit
5656+const renderer = await createCliRenderer({
5757+ exitOnCtrlC: true, // Handles Ctrl+C properly
5858+})
5959+6060+// For programmatic exit
6161+renderer.destroy() // Cleans up and exits
6262+```
6363+6464+`renderer.destroy()` restores the terminal to its original state before exiting.
6565+6666+### Environment Variables
6767+6868+Bun auto-loads `.env` files. Don't use dotenv:
6969+7070+```typescript
7171+// CORRECT
7272+const apiKey = process.env.API_KEY
7373+7474+// WRONG
7575+import dotenv from "dotenv"
7676+dotenv.config()
7777+```
7878+7979+## Debugging TUIs
8080+8181+### Cannot See console.log Output
8282+8383+OpenTUI captures console output for the debug overlay. You can't see logs in the terminal while the TUI is running.
8484+8585+**Solutions:**
8686+8787+1. **Use the console overlay:**
8888+ ```typescript
8989+ const renderer = await createCliRenderer()
9090+ renderer.console.show()
9191+ console.log("This appears in the overlay")
9292+ ```
9393+9494+2. **Toggle with keyboard:**
9595+ ```typescript
9696+ renderer.keyInput.on("keypress", (key) => {
9797+ if (key.name === "f12") {
9898+ renderer.console.toggle()
9999+ }
100100+ })
101101+ ```
102102+103103+3. **Write to a file:**
104104+ ```typescript
105105+ import { appendFileSync } from "node:fs"
106106+ function debugLog(msg: string) {
107107+ appendFileSync("debug.log", `${new Date().toISOString()} ${msg}\n`)
108108+ }
109109+ ```
110110+111111+4. **Disable console capture:**
112112+ ```bash
113113+ OTUI_USE_CONSOLE=false bun run src/index.ts
114114+ ```
115115+116116+### Reproduce Issues in Tests
117117+118118+Don't guess at bugs. Create a reproducible test:
119119+120120+```typescript
121121+import { test, expect } from "bun:test"
122122+import { createTestRenderer } from "@opentui/core/testing"
123123+124124+test("reproduces the issue", async () => {
125125+ const { renderer, snapshot } = await createTestRenderer({
126126+ width: 40,
127127+ height: 10,
128128+ })
129129+130130+ // Setup that reproduces the bug
131131+ const box = new BoxRenderable(renderer, { ... })
132132+ renderer.root.add(box)
133133+134134+ // Verify with snapshot
135135+ expect(snapshot()).toMatchSnapshot()
136136+})
137137+```
138138+139139+## Focus Management
140140+141141+### Components Must Be Focused
142142+143143+Input components only receive keyboard input when focused:
144144+145145+```typescript
146146+const input = new InputRenderable(renderer, {
147147+ id: "input",
148148+ placeholder: "Type here...",
149149+})
150150+151151+renderer.root.add(input)
152152+153153+// WRONG - input won't receive keystrokes
154154+// (no focus call)
155155+156156+// CORRECT
157157+input.focus()
158158+```
159159+160160+### Focus in Nested Components
161161+162162+When a component is inside a container, focus the component directly:
163163+164164+```typescript
165165+const container = new BoxRenderable(renderer, { id: "container" })
166166+const input = new InputRenderable(renderer, { id: "input" })
167167+container.add(input)
168168+renderer.root.add(container)
169169+170170+// WRONG
171171+container.focus()
172172+173173+// CORRECT
174174+input.focus()
175175+176176+// Or use getRenderable
177177+container.getRenderable("input")?.focus()
178178+179179+// Or use delegate (constructs)
180180+const form = delegate(
181181+ { focus: "input" },
182182+ Box({}, Input({ id: "input" })),
183183+)
184184+form.focus() // Routes to the input
185185+```
186186+187187+## Build Requirements
188188+189189+### Zig is Required
190190+191191+Native code compilation requires Zig:
192192+193193+```bash
194194+# Install Zig first
195195+# macOS
196196+brew install zig
197197+198198+# Linux
199199+# Download from https://ziglang.org/download/
200200+201201+# Then build
202202+bun run build
203203+```
204204+205205+### When to Build
206206+207207+- **TypeScript changes**: NO build needed (Bun runs TS directly)
208208+- **Native code changes**: Build required
209209+210210+```bash
211211+# Only needed when changing native (Zig) code
212212+cd packages/core
213213+bun run build
214214+```
215215+216216+## Common Errors
217217+218218+### "Cannot read properties of undefined"
219219+220220+Usually means a renderable wasn't added to the tree:
221221+222222+```typescript
223223+// WRONG - not added to tree
224224+const text = new TextRenderable(renderer, { content: "Hello" })
225225+// text.someMethod() // May fail
226226+227227+// CORRECT
228228+const text = new TextRenderable(renderer, { content: "Hello" })
229229+renderer.root.add(text)
230230+text.someMethod()
231231+```
232232+233233+### Layout Not Updating
234234+235235+Yoga layout is calculated lazily. Force a recalculation:
236236+237237+```typescript
238238+// After changing layout properties
239239+box.setWidth(newWidth)
240240+renderer.requestRender()
241241+```
242242+243243+### Text Overflow/Clipping
244244+245245+Text doesn't wrap by default. Set explicit width:
246246+247247+```typescript
248248+// May overflow
249249+const text = new TextRenderable(renderer, {
250250+ content: "Very long text that might overflow the terminal...",
251251+})
252252+253253+// Contained within width
254254+const text = new TextRenderable(renderer, {
255255+ content: "Very long text that might overflow the terminal...",
256256+ width: 40, // Will clip or wrap based on parent
257257+})
258258+```
259259+260260+### Colors Not Showing
261261+262262+Check terminal capability and color format:
263263+264264+```typescript
265265+// CORRECT formats
266266+fg: "#FF0000" // Hex
267267+fg: "red" // CSS color name
268268+fg: RGBA.fromHex("#FF0000")
269269+270270+// WRONG
271271+fg: "FF0000" // Missing #
272272+fg: 0xFF0000 // Number (not supported)
273273+```
274274+275275+## Performance
276276+277277+### Avoid Frequent Re-renders
278278+279279+Batch updates when possible:
280280+281281+```typescript
282282+// WRONG - multiple render calls
283283+item1.setContent("...")
284284+item2.setContent("...")
285285+item3.setContent("...")
286286+287287+// BETTER - single render after all updates
288288+// (OpenTUI batches automatically, but be mindful)
289289+items.forEach((item, i) => {
290290+ item.setContent(data[i])
291291+})
292292+```
293293+294294+### Minimize Tree Depth
295295+296296+Deep nesting impacts layout calculation:
297297+298298+```typescript
299299+// Avoid unnecessary wrappers
300300+// WRONG
301301+Box({}, Box({}, Box({}, Text({ content: "Hello" }))))
302302+303303+// CORRECT
304304+Box({}, Text({ content: "Hello" }))
305305+```
306306+307307+### Use display: none
308308+309309+Hide elements instead of removing/re-adding:
310310+311311+```typescript
312312+// For toggling visibility
313313+element.setDisplay("none") // Hidden
314314+element.setDisplay("flex") // Visible
315315+316316+// Instead of
317317+parent.remove(element)
318318+parent.add(element)
319319+```
320320+321321+## Testing
322322+323323+### Test Runner
324324+325325+Use Bun's test runner:
326326+327327+```typescript
328328+import { test, expect, beforeEach, afterEach } from "bun:test"
329329+330330+test("my test", () => {
331331+ expect(1 + 1).toBe(2)
332332+})
333333+```
334334+335335+### Test from Package Directories
336336+337337+Run tests from the specific package directory:
338338+339339+```bash
340340+# CORRECT
341341+cd packages/core
342342+bun test
343343+344344+# For native tests
345345+cd packages/core
346346+bun run test:native
347347+```
348348+349349+### Filter Tests
350350+351351+```bash
352352+# Bun test filter
353353+bun test --filter "component name"
354354+355355+# Native test filter
356356+bun run test:native -Dtest-filter="test name"
357357+```
358358+359359+## Keyboard Handling
360360+361361+### Key Names
362362+363363+Common key names for `KeyEvent.name`:
364364+365365+```typescript
366366+// Letters/numbers
367367+"a", "b", ..., "z"
368368+"1", "2", ..., "0"
369369+370370+// Special keys
371371+"escape", "enter", "return", "tab", "backspace", "delete"
372372+"up", "down", "left", "right"
373373+"home", "end", "pageup", "pagedown"
374374+"f1", "f2", ..., "f12"
375375+"space"
376376+377377+// Modifiers (check boolean properties)
378378+key.ctrl // Ctrl held
379379+key.shift // Shift held
380380+key.meta // Alt held
381381+key.option // Option held (macOS)
382382+```
383383+384384+### Key Event Types
385385+386386+```typescript
387387+renderer.keyInput.on("keypress", (key) => {
388388+ // eventType: "press" | "release" | "repeat"
389389+ if (key.eventType === "repeat") {
390390+ // Key being held down
391391+ }
392392+})
393393+```
···11+---
22+name: optimize
33+description: "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Identify and fix performance issues to create faster, smoother user experiences.
99+1010+## Assess Performance Issues
1111+1212+Understand current performance and identify problems.
1313+1414+### 1. Measure current state
1515+- **Core Web Vitals**: LCP, FID/INP, CLS scores
1616+- **Load time**: Time to interactive, first contentful paint
1717+- **Bundle size**: JavaScript, CSS, image sizes
1818+- **Runtime performance**: Frame rate, memory usage, CPU usage
1919+- **Network**: Request count, payload sizes, waterfall
2020+2121+### 2. Identify bottlenecks
2222+- What is slow? (Initial load? Interactions? Animations?)
2323+- What is causing it? (Large images? Expensive JavaScript? Layout thrashing?)
2424+- How bad is it? (Perceivable? Annoying? Blocking?)
2525+- Who is affected? (All users? Mobile only? Slow connections?)
2626+2727+**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters.
2828+2929+## Optimization Strategy
3030+3131+Create systematic improvement plan.
3232+3333+### Loading Performance
3434+3535+**Optimize Images**:
3636+- Use modern formats (WebP, AVIF)
3737+- Proper sizing (do not load 3000px image for 300px display)
3838+- Lazy loading for below-fold images
3939+- Responsive images (srcset, picture element)
4040+- Compress images (80-85% quality is usually imperceptible)
4141+- Use CDN for faster delivery
4242+4343+```html
4444+<img
4545+ src="hero.webp"
4646+ srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
4747+ sizes="(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"
4848+ loading="lazy"
4949+ alt="Hero image"
5050+/>
5151+```
5252+5353+**Reduce JavaScript Bundle**:
5454+- Code splitting (route-based, component-based)
5555+- Tree shaking (remove unused code)
5656+- Remove unused dependencies
5757+- Lazy load non-critical code
5858+- Use dynamic imports for large components
5959+6060+```javascript
6161+// Lazy load heavy component
6262+const HeavyChart = lazy(() => import('./HeavyChart'));
6363+```
6464+6565+**Optimize CSS**:
6666+- Remove unused CSS
6767+- Critical CSS inline, rest async
6868+- Minimize CSS files
6969+- Use CSS containment for independent regions
7070+7171+**Optimize Fonts**:
7272+- Use font-display: swap or optional
7373+- Subset fonts (only characters you need)
7474+- Preload critical fonts
7575+- Use system fonts when appropriate
7676+- Limit font weights loaded
7777+7878+```css
7979+@font-face {
8080+ font-family: 'CustomFont';
8181+ src: url('/fonts/custom.woff2') format('woff2');
8282+ font-display: swap; /* Show fallback immediately */
8383+ unicode-range: U+0020-007F; /* Basic Latin only */
8484+}
8585+```
8686+8787+**Optimize Loading Strategy**:
8888+- Critical resources first (async or defer non-critical)
8989+- Preload critical assets
9090+- Prefetch likely next pages
9191+- Service worker for offline or caching
9292+- HTTP/2 or HTTP/3 for multiplexing
9393+9494+### Rendering Performance
9595+9696+**Avoid Layout Thrashing**:
9797+```javascript
9898+// Bad: Alternating reads and writes (causes reflows)
9999+elements.forEach(el => {
100100+ const height = el.offsetHeight; // Read (forces layout)
101101+ el.style.height = height * 2; // Write
102102+});
103103+104104+// Good: Batch reads, then batch writes
105105+const heights = elements.map(el => el.offsetHeight); // All reads
106106+elements.forEach((el, i) => {
107107+ el.style.height = heights[i] * 2; // All writes
108108+});
109109+```
110110+111111+**Optimize Rendering**:
112112+- Use CSS contain property for independent regions
113113+- Minimize DOM depth (flatter is faster)
114114+- Reduce DOM size (fewer elements)
115115+- Use content-visibility: auto for long lists
116116+- Virtual scrolling for very long lists (react-window, react-virtualized)
117117+118118+**Reduce Paint and Composite**:
119119+- Use transform and opacity for animations (GPU-accelerated)
120120+- Avoid animating layout properties (width, height, top, left)
121121+- Use will-change sparingly for known expensive operations
122122+- Minimize paint areas (smaller is faster)
123123+124124+### Animation Performance
125125+126126+**GPU Acceleration**:
127127+```css
128128+/* Good: GPU-accelerated (fast) */
129129+.animated {
130130+ transform: translateX(100px);
131131+ opacity: 0.5;
132132+}
133133+134134+/* Bad: CPU-bound (slow) */
135135+.animated {
136136+ left: 100px;
137137+ width: 300px;
138138+}
139139+```
140140+141141+**Smooth 60fps**:
142142+- Target 16ms per frame (60fps)
143143+- Use requestAnimationFrame for JS animations
144144+- Debounce or throttle scroll handlers
145145+- Use CSS animations when possible
146146+- Avoid long-running JavaScript during animations
147147+148148+**Intersection Observer**:
149149+```javascript
150150+// Efficiently detect when elements enter viewport
151151+const observer = new IntersectionObserver((entries) => {
152152+ entries.forEach(entry => {
153153+ if (entry.isIntersecting) {
154154+ // Element is visible, lazy load or animate
155155+ }
156156+ });
157157+});
158158+```
159159+160160+### React or Framework Optimization
161161+162162+**React-specific**:
163163+- Use memo() for expensive components
164164+- useMemo() and useCallback() for expensive computations
165165+- Virtualize long lists
166166+- Code split routes
167167+- Avoid inline function creation in render
168168+- Use React DevTools Profiler
169169+170170+**Framework-agnostic**:
171171+- Minimize re-renders
172172+- Debounce expensive operations
173173+- Memoize computed values
174174+- Lazy load routes and components
175175+176176+### Network Optimization
177177+178178+**Reduce Requests**:
179179+- Combine small files
180180+- Use SVG sprites for icons
181181+- Inline small critical assets
182182+- Remove unused third-party scripts
183183+184184+**Optimize APIs**:
185185+- Use pagination (do not load everything)
186186+- GraphQL to request only needed fields
187187+- Response compression (gzip, brotli)
188188+- HTTP caching headers
189189+- CDN for static assets
190190+191191+**Optimize for Slow Connections**:
192192+- Adaptive loading based on connection (navigator.connection)
193193+- Optimistic UI updates
194194+- Request prioritization
195195+- Progressive enhancement
196196+197197+## Core Web Vitals Optimization
198198+199199+### Largest Contentful Paint (LCP < 2.5s)
200200+- Optimize hero images
201201+- Inline critical CSS
202202+- Preload key resources
203203+- Use CDN
204204+- Server-side rendering
205205+206206+### First Input Delay (FID < 100ms) or INP (< 200ms)
207207+- Break up long tasks
208208+- Defer non-critical JavaScript
209209+- Use web workers for heavy computation
210210+- Reduce JavaScript execution time
211211+212212+### Cumulative Layout Shift (CLS < 0.1)
213213+- Set dimensions on images and videos
214214+- Do not inject content above existing content
215215+- Use aspect-ratio CSS property
216216+- Reserve space for ads and embeds
217217+- Avoid animations that cause layout shifts
218218+219219+```css
220220+/* Reserve space for image */
221221+.image-container {
222222+ aspect-ratio: 16 / 9;
223223+}
224224+```
225225+226226+## Performance Monitoring
227227+228228+**Tools to use**:
229229+- Chrome DevTools (Lighthouse, Performance panel)
230230+- WebPageTest
231231+- Core Web Vitals (Chrome UX Report)
232232+- Bundle analyzers (webpack-bundle-analyzer)
233233+- Performance monitoring (Sentry, DataDog, New Relic)
234234+235235+**Key metrics**:
236236+- LCP, FID/INP, CLS (Core Web Vitals)
237237+- Time to Interactive (TTI)
238238+- First Contentful Paint (FCP)
239239+- Total Blocking Time (TBT)
240240+- Bundle size
241241+- Request count
242242+243243+**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection is not representative.
244244+245245+**NEVER**:
246246+- Optimize without measuring (premature optimization)
247247+- Sacrifice accessibility for performance
248248+- Break functionality while optimizing
249249+- Use will-change everywhere (creates new layers, uses memory)
250250+- Lazy load above-fold content
251251+- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first)
252252+- Forget about mobile performance (often slower devices, slower connections)
253253+254254+## Verify Improvements
255255+256256+Test that optimizations worked.
257257+258258+- **Before and after metrics**: Compare Lighthouse scores
259259+- **Real user monitoring**: Track improvements for real users
260260+- **Different devices**: Test on low-end Android, not just flagship iPhone
261261+- **Slow connections**: Throttle to 3G, test experience
262262+- **No regressions**: Ensure functionality still works
263263+- **User perception**: Does it feel faster?
264264+265265+Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance.
+141
skills/overdrive/SKILL.md
···11+---
22+name: overdrive
33+description: "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Start your response with:
99+1010+```
1111+───────────── ⚡ OVERDRIVE ─────────────
1212+》》》 Entering overdrive mode...
1313+```
1414+1515+Push an interface past conventional limits. This is not just about visual effects. It is about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic.
1616+1717+## MANDATORY PREPARATION
1818+1919+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
2020+2121+**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That is extraordinary too. Understand the project personality and goals before deciding what is appropriate.
2222+2323+### Propose Before Building
2424+2525+This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
2626+2727+1. **Think through 2-3 different directions**. Consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like.
2828+2. **{{ask_instruction}}** to present these directions and get the user pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
2929+3. Only proceed with the direction the user confirms.
3030+3131+Skipping this step risks building something embarrassing that needs to be thrown away.
3232+3333+### Iterate with Browser Automation
3434+3535+Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right. Check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone.
3636+3737+---
3838+3939+## Assess What "Extraordinary" Means Here
4040+4141+The right kind of technical ambition depends entirely on what you are working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that is nice"?**
4242+4343+### For visual or marketing surfaces
4444+Pages, hero sections, landing pages, portfolios. The "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor.
4545+4646+### For functional UI
4747+Tables, forms, dialogs, navigation. The "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics.
4848+4949+### For performance-critical UI
5050+The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates.
5151+5252+### For data-heavy interfaces
5353+Charts and dashboards. The "wow" is in fluidity: GPU-accelerated rendering via Canvas or WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally.
5454+5555+**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around.
5656+5757+## The Toolkit
5858+5959+Organized by what you are trying to achieve, not by technology name.
6060+6161+### Make transitions feel cinematic
6262+- **View Transitions API** (same-document: all browsers; cross-document: no Firefox). Shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations.
6363+- **@starting-style** (all browsers). Animate elements from display: none to visible with CSS only, including entry keyframes.
6464+- **Spring physics**. Natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver.
6565+6666+### Tie animation to scroll position
6767+- **Scroll-driven animations** (animation-timeline: scroll()). CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome, Edge, Safari; Firefox: flag only. Always provide a static fallback)
6868+6969+### Render beyond CSS
7070+- **WebGL** (all browsers). Shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS cannot express.
7171+- **WebGPU** (Chrome, Edge; Safari partial; Firefox: flag only). Next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2.
7272+- **Canvas 2D or OffscreenCanvas**. Custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers and OffscreenCanvas.
7373+- **SVG filter chains**. Displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable.
7474+7575+### Make data feel alive
7676+- **Virtual scrolling**. Render only visible rows for tables or lists with tens of thousands of items. No library required for simple cases. TanStack Virtual for complex ones.
7777+- **GPU-accelerated charts**. Canvas or WebGL-rendered data visualization for datasets too large for SVG or DOM. Libraries: deck.gl, regl-based custom renderers.
7878+- **Animated data transitions**. Morph between chart states rather than replacing. D3 transition() or View Transitions for DOM-based charts.
7979+8080+### Animate complex properties
8181+- **@property** (all browsers). Register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS cannot normally interpolate.
8282+- **Web Animations API** (all browsers). JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography.
8383+8484+### Push performance boundaries
8585+- **Web Workers**. Move computation off the main thread. Heavy data processing, image manipulation, search indexing. Anything that would cause jank.
8686+- **OffscreenCanvas**. Render in a Worker thread. The main thread stays free while complex visuals render in the background.
8787+- **WASM**. Near-native performance for computation-heavy features. Image processing, physics simulations, codecs.
8888+8989+### Interact with the device
9090+- **Web Audio API**. Spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start.
9191+- **Device APIs**. Orientation, ambient light, geolocation. Use sparingly and always with user permission.
9292+9393+**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary.
9494+9595+## Implement with Discipline
9696+9797+### Progressive enhancement is non-negotiable
9898+9999+Every technique must degrade gracefully. The experience without the enhancement must still be good.
100100+101101+```css
102102+@supports (animation-timeline: scroll()) {
103103+ .hero { animation-timeline: scroll(); }
104104+}
105105+```
106106+107107+```javascript
108108+if ('gpu' in navigator) { /* WebGPU */ }
109109+else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ }
110110+/* CSS-only fallback must still look good */
111111+```
112112+113113+### Performance rules
114114+115115+- Target 60fps. If dropping below 50, simplify.
116116+- Respect prefers-reduced-motion. Always. Provide a beautiful static alternative.
117117+- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport.
118118+- Pause off-screen rendering. Kill what you cannot see.
119119+- Test on real mid-range devices, not just your development machine.
120120+121121+### Polish is the difference
122122+123123+The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Do not ship the first version that works. Ship the version that feels inevitable.
124124+125125+**NEVER**:
126126+- Ignore prefers-reduced-motion. This is an accessibility requirement, not a suggestion
127127+- Ship effects that cause jank on mid-range devices
128128+- Use bleeding-edge APIs without a functional fallback
129129+- Add sound without explicit user opt-in
130130+- Use technical ambition to mask weak design fundamentals. Fix those first with other skills.
131131+- Layer multiple competing extraordinary moments. Focus creates impact, excess creates noise.
132132+133133+## Verify the Result
134134+135135+- **The wow test**: Show it to someone who has not seen it. Do they react?
136136+- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice?
137137+- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth?
138138+- **The accessibility test**: Enable reduced motion. Still beautiful?
139139+- **The context test**: Does this make sense for THIS brand and audience?
140140+141141+Remember: "Technically extraordinary" is not about using the newest API. It is about making an interface do something users did not think a website could do.
+191
skills/polish/SKILL.md
···11+---
22+name: polish
33+description: "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+## MANDATORY PREPARATION
99+1010+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first. Additionally gather: quality bar (MVP vs flagship).
1111+1212+---
1313+1414+Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished.
1515+1616+## Pre-Polish Assessment
1717+1818+Understand the current state and goals.
1919+2020+### 1. Review completeness
2121+- Is it functionally complete?
2222+- Are there known issues to preserve (mark with TODOs)?
2323+- What is the quality bar? (MVP vs flagship feature?)
2424+- When does it ship? (How much time for polish?)
2525+2626+### 2. Identify polish areas
2727+- Visual inconsistencies
2828+- Spacing and alignment issues
2929+- Interaction state gaps
3030+- Copy inconsistencies
3131+- Edge cases and error states
3232+- Loading and transition smoothness
3333+3434+**CRITICAL**: Polish is the last step, not the first. Do not polish work that is not functionally complete.
3535+3636+## Polish Systematically
3737+3838+Work through these dimensions methodically.
3939+4040+### Visual Alignment and Spacing
4141+- **Pixel-perfect alignment**: Everything lines up to grid
4242+- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps)
4343+- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering)
4444+- **Responsive consistency**: Spacing and alignment work at all breakpoints
4545+- **Grid adherence**: Elements snap to baseline grid
4646+4747+**Check**:
4848+- Enable grid overlay and verify alignment
4949+- Check spacing with browser inspector
5050+- Test at multiple viewport sizes
5151+- Look for elements that "feel" off
5252+5353+### Typography Refinement
5454+- **Hierarchy consistency**: Same elements use same sizes and weights throughout
5555+- **Line length**: 45-75 characters for body text
5656+- **Line height**: Appropriate for font size and context
5757+- **Widows and orphans**: No single words on last line
5858+- **Hyphenation**: Appropriate for language and column width
5959+- **Kerning**: Adjust letter spacing where needed (especially headlines)
6060+- **Font loading**: No FOUT or FOIT flashes
6161+6262+### Color and Contrast
6363+- **Contrast ratios**: All text meets WCAG standards
6464+- **Consistent token usage**: No hard-coded colors, all use design tokens
6565+- **Theme consistency**: Works in all theme variants
6666+- **Color meaning**: Same colors mean same things throughout
6767+- **Accessible focus**: Focus indicators visible with sufficient contrast
6868+- **Tinted neutrals**: No pure gray or pure black. Add subtle color tint (0.01 chroma).
6969+- **Gray on color**: Never put gray text on colored backgrounds. Use a shade of that color or transparency.
7070+7171+### Interaction States
7272+7373+Every interactive element needs all states.
7474+7575+- **Default**: Resting state
7676+- **Hover**: Subtle feedback (color, scale, shadow)
7777+- **Focus**: Keyboard focus indicator (never remove without replacement)
7878+- **Active**: Click or tap feedback
7979+- **Disabled**: Clearly non-interactive
8080+- **Loading**: Async action feedback
8181+- **Error**: Validation or error state
8282+- **Success**: Successful completion
8383+8484+**Missing states create confusion and broken experiences**.
8585+8686+### Micro-interactions and Transitions
8787+- **Smooth transitions**: All state changes animated appropriately (150-300ms)
8888+- **Consistent easing**: Use ease-out-quart, quint, or expo for natural deceleration. Never bounce or elastic. They feel dated.
8989+- **No jank**: 60fps animations, only animate transform and opacity
9090+- **Appropriate motion**: Motion serves purpose, not decoration
9191+- **Reduced motion**: Respects prefers-reduced-motion
9292+9393+### Content and Copy
9494+- **Consistent terminology**: Same things called same names throughout
9595+- **Consistent capitalization**: Title Case vs Sentence case applied consistently
9696+- **Grammar and spelling**: No typos
9797+- **Appropriate length**: Not too wordy, not too terse
9898+- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them)
9999+100100+### Icons and Images
101101+- **Consistent style**: All icons from same family or matching style
102102+- **Appropriate sizing**: Icons sized consistently for context
103103+- **Proper alignment**: Icons align with adjacent text optically
104104+- **Alt text**: All images have descriptive alt text
105105+- **Loading states**: Images do not cause layout shift, proper aspect ratios
106106+- **Retina support**: 2x assets for high-DPI screens
107107+108108+### Forms and Inputs
109109+- **Label consistency**: All inputs properly labeled
110110+- **Required indicators**: Clear and consistent
111111+- **Error messages**: Helpful and consistent
112112+- **Tab order**: Logical keyboard navigation
113113+- **Auto-focus**: Appropriate (do not overuse)
114114+- **Validation timing**: Consistent (on blur vs on submit)
115115+116116+### Edge Cases and Error States
117117+- **Loading states**: All async actions have loading feedback
118118+- **Empty states**: Helpful empty states, not just blank space
119119+- **Error states**: Clear error messages with recovery paths
120120+- **Success states**: Confirmation of successful actions
121121+- **Long content**: Handles very long names, descriptions, and so on
122122+- **No content**: Handles missing data gracefully
123123+- **Offline**: Appropriate offline handling (if applicable)
124124+125125+### Responsiveness
126126+- **All breakpoints**: Test mobile, tablet, desktop
127127+- **Touch targets**: 44x44px minimum on touch devices
128128+- **Readable text**: No text smaller than 14px on mobile
129129+- **No horizontal scroll**: Content fits viewport
130130+- **Appropriate reflow**: Content adapts logically
131131+132132+### Performance
133133+- **Fast initial load**: Optimize critical path
134134+- **No layout shift**: Elements do not jump after load (CLS)
135135+- **Smooth interactions**: No lag or jank
136136+- **Optimized images**: Appropriate formats and sizes
137137+- **Lazy loading**: Off-screen content loads lazily
138138+139139+### Code Quality
140140+- **Remove console logs**: No debug logging in production
141141+- **Remove commented code**: Clean up dead code
142142+- **Remove unused imports**: Clean up unused dependencies
143143+- **Consistent naming**: Variables and functions follow conventions
144144+- **Type safety**: No TypeScript any or ignored errors
145145+- **Accessibility**: Proper ARIA labels and semantic HTML
146146+147147+## Polish Checklist
148148+149149+Go through systematically.
150150+151151+- [ ] Visual alignment perfect at all breakpoints
152152+- [ ] Spacing uses design tokens consistently
153153+- [ ] Typography hierarchy consistent
154154+- [ ] All interactive states implemented
155155+- [ ] All transitions smooth (60fps)
156156+- [ ] Copy is consistent and polished
157157+- [ ] Icons are consistent and properly sized
158158+- [ ] All forms properly labeled and validated
159159+- [ ] Error states are helpful
160160+- [ ] Loading states are clear
161161+- [ ] Empty states are welcoming
162162+- [ ] Touch targets are 44x44px minimum
163163+- [ ] Contrast ratios meet WCAG AA
164164+- [ ] Keyboard navigation works
165165+- [ ] Focus indicators visible
166166+- [ ] No console errors or warnings
167167+- [ ] No layout shift on load
168168+- [ ] Works in all supported browsers
169169+- [ ] Respects reduced motion preference
170170+- [ ] Code is clean (no TODOs, console.logs, commented code)
171171+172172+**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up.
173173+174174+**NEVER**:
175175+- Polish before it is functionally complete
176176+- Spend hours on polish if it ships in 30 minutes (triage)
177177+- Introduce bugs while polishing (test thoroughly)
178178+- Ignore systematic issues (if spacing is off everywhere, fix the system)
179179+- Perfect one thing while leaving others rough (consistent quality level)
180180+181181+## Final Verification
182182+183183+Before marking as done.
184184+185185+- **Use it yourself**: Actually interact with the feature
186186+- **Test on real devices**: Not just browser DevTools
187187+- **Ask someone else to review**: Fresh eyes catch things
188188+- **Compare to design**: Match intended design
189189+- **Check all states**: Do not just test happy path
190190+191191+Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details. They matter.
+102
skills/quieter/SKILL.md
···11+---
22+name: quieter
33+description: "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Assess Current State
1717+1818+Analyze what makes the design feel too intense.
1919+2020+### 1. Identify intensity sources
2121+- **Color saturation**: Overly bright or saturated colors
2222+- **Contrast extremes**: Too much high-contrast juxtaposition
2323+- **Visual weight**: Too many bold, heavy elements competing
2424+- **Animation excess**: Too much motion or overly dramatic effects
2525+- **Complexity**: Too many visual elements, patterns, or decorations
2626+- **Scale**: Everything is large and loud with no hierarchy
2727+2828+### 2. Understand the context
2929+- What is the purpose? (Marketing vs tool vs reading experience)
3030+- Who is the audience? (Some contexts need energy)
3131+- What is working? (Do not throw away good ideas)
3232+- What is the core message? (Preserve what matters)
3333+3434+If any of these are unclear from the codebase, {{ask_instruction}}
3535+3636+**CRITICAL**: "Quieter" does not mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness.
3737+3838+## Plan Refinement
3939+4040+Create a strategy to reduce intensity while maintaining impact.
4141+4242+- **Color approach**: Desaturate or shift to more sophisticated tones?
4343+- **Hierarchy approach**: Which elements should stay bold (very few), which should recede?
4444+- **Simplification approach**: What can be removed entirely?
4545+- **Sophistication approach**: How can we signal quality through restraint?
4646+4747+**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision.
4848+4949+## Refine the Design
5050+5151+Systematically reduce intensity across these dimensions.
5252+5353+### Color Refinement
5454+- **Reduce saturation**: Shift from fully saturated to 70-85% saturation
5555+- **Soften palette**: Replace bright colors with muted, sophisticated tones
5656+- **Reduce color variety**: Use fewer colors more thoughtfully
5757+- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule)
5858+- **Gentler contrasts**: High contrast only where it matters most
5959+- **Tinted grays**: Use warm or cool tinted grays instead of pure gray. Adds sophistication without loudness.
6060+- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead.
6161+6262+### Visual Weight Reduction
6363+- **Typography**: Reduce font weights (900 to 600, 700 to 500), decrease sizes where appropriate
6464+- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness
6565+- **White space**: Increase breathing room, reduce density
6666+- **Borders and lines**: Reduce thickness, decrease opacity, or remove entirely
6767+6868+### Simplification
6969+- **Remove decorative elements**: Gradients, shadows, patterns, textures that do not serve purpose
7070+- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes
7171+- **Reduce layering**: Flatten visual hierarchy where possible
7272+- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows
7373+7474+### Motion Reduction
7575+- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing
7676+- **Remove decorative animations**: Keep functional motion, remove flourishes
7777+- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback
7878+- **Refined easing**: Use ease-out-quart for smooth, understated motion. Never bounce or elastic.
7979+- **Remove animations entirely** if they are not serving a clear purpose.
8080+8181+### Composition Refinement
8282+- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling
8383+- **Align to grid**: Bring rogue elements back into systematic alignment
8484+- **Even out spacing**: Replace extreme spacing variations with consistent rhythm
8585+8686+**NEVER**:
8787+- Make everything the same size or weight (hierarchy still matters)
8888+- Remove all color (quiet equals grayscale)
8989+- Eliminate all personality (maintain character through refinement)
9090+- Sacrifice usability for aesthetics (functional elements still need clear affordances)
9191+- Make everything small and light (some anchors needed)
9292+9393+## Verify Quality
9494+9595+Ensure refinement maintains quality.
9696+9797+- **Still functional**: Can users still accomplish tasks easily?
9898+- **Still distinctive**: Does it have character, or is it generic now?
9999+- **Better reading**: Is text easier to read for extended periods?
100100+- **Sophistication**: Does it feel more refined and premium?
101101+102102+Remember: Quiet design is confident design. It does not need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality.
+71
skills/teach-impeccable/SKILL.md
···11+---
22+name: teach-impeccable
33+description: One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
44+user-invocable: true
55+---
66+77+Gather design context for this project, then persist it for all future sessions.
88+99+## Step 1: Explore the Codebase
1010+1111+Before asking questions, thoroughly scan the project to discover what you can.
1212+1313+- **README and docs**: Project purpose, target audience, any stated goals
1414+- **Package.json or config files**: Tech stack, dependencies, existing design libraries
1515+- **Existing components**: Current design patterns, spacing, typography in use
1616+- **Brand assets**: Logos, favicons, color values already defined
1717+- **Design tokens or CSS variables**: Existing color palettes, font stacks, spacing scales
1818+- **Any style guides or brand documentation**
1919+2020+Note what you have learned and what remains unclear.
2121+2222+## Step 2: Ask UX-Focused Questions
2323+2424+{{ask_instruction}} Focus only on what you could not infer from the codebase.
2525+2626+### Users and Purpose
2727+- Who uses this? What is their context when using it?
2828+- What job are they trying to get done?
2929+- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.)
3030+3131+### Brand and Personality
3232+- How would you describe the brand personality in 3 words?
3333+- Any reference sites or apps that capture the right feel? What specifically about them?
3434+- What should this explicitly NOT look like? Any anti-references?
3535+3636+### Aesthetic Preferences
3737+- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.)
3838+- Light mode, dark mode, or both?
3939+- Any colors that must be used or avoided?
4040+4141+### Accessibility and Inclusion
4242+- Specific accessibility requirements? (WCAG level, known user needs)
4343+- Considerations for reduced motion, color blindness, or other accommodations?
4444+4545+Skip questions where the answer is already clear from the codebase exploration.
4646+4747+## Step 3: Write Design Context
4848+4949+Synthesize your findings and the user answers into a Design Context section.
5050+5151+```markdown
5252+## Design Context
5353+5454+### Users
5555+[Who they are, their context, the job to be done]
5656+5757+### Brand Personality
5858+[Voice, tone, 3-word personality, emotional goals]
5959+6060+### Aesthetic Direction
6161+[Visual tone, references, anti-references, theme]
6262+6363+### Design Principles
6464+[3-5 principles derived from the conversation that should guide all design decisions]
6565+```
6666+6767+Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place.
6868+6969+Then {{ask_instruction}} whether they would also like the Design Context appended to {{config_file}}. If yes, append or update the section there as well.
7070+7171+Confirm completion and summarize the key design principles that will now guide all future work.
+111
skills/typeset/SKILL.md
···11+---
22+name: typeset
33+description: "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography."
44+argument-hint: "[target]"
55+user-invocable: true
66+---
77+88+Assess and improve typography that feels generic, inconsistent, or poorly structured. Turn default-looking text into intentional, well-crafted type.
99+1010+## MANDATORY PREPARATION
1111+1212+Invoke {{command_prefix}}frontend-design. It contains design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}teach-impeccable first.
1313+1414+---
1515+1616+## Assess Current Typography
1717+1818+Analyze what's weak or generic about the current type.
1919+2020+### 1. Font choices
2121+- Using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults)
2222+- Does the font match the brand personality? (A playful brand should not use a corporate typeface)
2323+- Too many font families? (More than 2-3 is almost always a mess)
2424+2525+### 2. Hierarchy
2626+- Can you tell headings from body from captions at a glance?
2727+- Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy)
2828+- Are weight contrasts strong enough? (Medium vs Regular is barely visible)
2929+3030+### 3. Sizing and scale
3131+- Is there a consistent type scale, or are sizes arbitrary?
3232+- Does body text meet minimum readability? (16px+)
3333+- Is the sizing strategy appropriate for the context? (Fixed rem scales for app UIs; fluid clamp() for marketing page headings)
3434+3535+### 4. Readability
3636+- Are line lengths comfortable? (45-75 characters ideal)
3737+- Is line-height appropriate for the font and context?
3838+- Is there enough contrast between text and background?
3939+4040+### 5. Consistency
4141+- Are the same elements styled the same way throughout?
4242+- Are font weights used consistently? (Not bold in one section, semibold in another for the same role)
4343+- Is letter-spacing intentional or default everywhere?
4444+4545+**CRITICAL**: The goal is not to make text "fancier". It is to make it clearer, more readable, and more intentional. Good typography is invisible. Bad typography is distracting.
4646+4747+## Plan Typography Improvements
4848+4949+Consult the [typography reference](reference/typography.md) from the frontend-design skill for detailed guidance on scales, pairing, and loading strategies.
5050+5151+Create a systematic plan.
5252+5353+- **Font selection**: Do fonts need replacing? What fits the brand and context?
5454+- **Type scale**: Establish a modular scale (1.25 ratio) with clear hierarchy
5555+- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings)
5656+- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements
5757+5858+## Improve Typography Systematically
5959+6060+### Font Selection
6161+6262+If fonts need replacing:
6363+- Choose fonts that reflect the brand personality
6464+- Pair with genuine contrast (serif + sans, geometric + humanist) or use a single family in multiple weights
6565+- Ensure web font loading does not cause layout shift (font-display: swap, metric-matched fallbacks)
6666+6767+### Establish Hierarchy
6868+6969+Build a clear type scale.
7070+- **5 sizes cover most needs**: caption, secondary, body, subheading, heading
7171+- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5)
7272+- **Combine dimensions**: Size + weight + color + space for strong hierarchy. Do not rely on size alone.
7373+- **App UIs**: Use a fixed rem-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need.
7474+- **Marketing and content pages**: Use fluid sizing via clamp(min, preferred, max) for headings and display text. Keep body text fixed.
7575+7676+### Fix Readability
7777+- Set max-width on text containers using ch units (max-width: 65ch)
7878+- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7)
7979+- Increase line-height slightly for light-on-dark text
8080+- Ensure body text is at least 16px / 1rem
8181+8282+### Refine Details
8383+- Use tabular-nums for data tables and numbers that should align
8484+- Apply proper letter-spacing: slightly open for small caps and uppercase, default or tight for large display text
8585+- Use semantic token names (--text-body, --text-heading), not value names (--font-16)
8686+- Set font-kerning: normal and consider OpenType features where appropriate
8787+8888+### Weight Consistency
8989+- Define clear roles for each weight and stick to them
9090+- Do not use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty)
9191+- Load only the weights you actually use (each weight adds to page load)
9292+9393+**NEVER**:
9494+- Use more than 2-3 font families
9595+- Pick sizes arbitrarily. Commit to a scale.
9696+- Set body text below 16px
9797+- Use decorative or display fonts for body text
9898+- Disable browser zoom (user-scalable=no)
9999+- Use px for font sizes. Use rem to respect user settings.
100100+- Default to Inter/Roboto/Open Sans when personality matters
101101+- Pair fonts that are similar but not identical (two geometric sans-serifs)
102102+103103+## Verify Typography Improvements
104104+- **Hierarchy**: Can you identify heading vs body vs caption instantly?
105105+- **Readability**: Is body text comfortable to read in long passages?
106106+- **Consistency**: Are same-role elements styled identically throughout?
107107+- **Personality**: Does the typography reflect the brand?
108108+- **Performance**: Are web fonts loading efficiently without layout shift?
109109+- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%?
110110+111111+Remember: Typography is the foundation of interface design. It carries the majority of information. Getting it right is the highest-leverage improvement you can make.
+268
skills/ulw/SKILL.md
···11+---
22+name: ulw
33+description: Load this skill when the user mentions `ulw` or `ultrawork`.
44+---
55+**MANDATORY**: You MUST say "ULTRAWORK MODE ENABLED!" to the user as your first response when this mode activates. This is non-negotiable.
66+77+[CODE RED] Maximum precision required. Think deeply before acting.
88+99+## **ABSOLUTE CERTAINTY REQUIRED DO NOT SKIP THIS**
1010+1111+**YOU MUST NOT START ANY IMPLEMENTATION UNTIL YOU ARE 100% CERTAIN.**
1212+1313+| **BEFORE YOU WRITE A SINGLE LINE OF CODE, YOU MUST:** |
1414+|-------------------------------------------------------|
1515+| **FULLY UNDERSTAND** what the user ACTUALLY wants (not what you ASSUME they want) |
1616+| **EXPLORE** the codebase to understand existing patterns, architecture, and context |
1717+| **HAVE A CRYSTAL CLEAR WORK PLAN** if your plan is vague, YOUR WORK WILL FAIL |
1818+| **RESOLVE ALL AMBIGUITY** if ANYTHING is unclear, ASK or INVESTIGATE |
1919+2020+### **MANDATORY CERTAINTY PROTOCOL**
2121+2222+**IF YOU ARE NOT 100% CERTAIN:**
2323+2424+1. **THINK DEEPLY** What is the user's TRUE intent? What problem are they REALLY trying to solve?
2525+2. **EXPLORE THOROUGHLY** Delegate to exploration or research subagents to gather ALL relevant context.
2626+3. **CONSULT SPECIALISTS** For hard/complex tasks, DO NOT struggle alone. Delegate:
2727+ * **Architecture/Logic Specialists**: Conventional problems like architecture, debugging, complex logic.
2828+ * **Creative Specialists**: Non-conventional problems where a different approach is needed or unusual constraints exist.
2929+4. **ASK THE USER** If ambiguity remains after exploration, ASK. Don't guess.
3030+3131+**SIGNS YOU ARE NOT READY TO IMPLEMENT:**
3232+* You're making assumptions about requirements
3333+* You're unsure which files to modify
3434+* You don't understand how existing code works
3535+* Your plan has "probably" or "maybe" in it
3636+* You can't explain the exact steps you'll take
3737+3838+**WHEN IN DOUBT:**
3939+Spawn a background exploration subagent designed for codebase search. Prompt it to find specific patterns in the codebase, showing file paths, implementation approaches, and conventions used. Focus on source directories and skip test files unless test patterns are needed.
4040+4141+Spawn a background research subagent designed for documentation lookup. Prompt it to find official documentation and production-quality examples for the specific library or technology. Request API references, configuration options, recommended patterns, and common pitfalls. Skip beginner tutorials.
4242+4343+Spawn a blocking specialist subagent designed for architectural review. Prompt it with your architectural plan, describing specific files and changes. Detail your concerns and uncertainties. Ask it to evaluate the correctness of the approach, missing potential issues, and better alternatives.
4444+4545+**ONLY AFTER YOU HAVE:**
4646+* Gathered sufficient context via subagents
4747+* Resolved all ambiguities
4848+* Created a precise, step-by-step work plan
4949+* Achieved 100% confidence in your understanding
5050+5151+**...THEN AND ONLY THEN MAY YOU BEGIN IMPLEMENTATION.**
5252+5353+***
5454+5555+## **NO EXCUSES. NO COMPROMISES. DELIVER WHAT WAS ASKED.**
5656+5757+**THE USER'S ORIGINAL REQUEST IS SACRED. YOU MUST FULFILL IT EXACTLY.**
5858+5959+| VIOLATION | CONSEQUENCE |
6060+|-----------|-------------|
6161+| "I couldn't because..." | **UNACCEPTABLE.** Find a way or ask for help. |
6262+| "This is a simplified version..." | **UNACCEPTABLE.** Deliver the FULL implementation. |
6363+| "You can extend this later..." | **UNACCEPTABLE.** Finish it NOW. |
6464+| "Due to limitations..." | **UNACCEPTABLE.** Use subagents, tools, whatever it takes. |
6565+| "I made some assumptions..." | **UNACCEPTABLE.** You should have asked FIRST. |
6666+6767+**THERE ARE NO VALID EXCUSES FOR:**
6868+* Delivering partial work
6969+* Changing scope without explicit user approval
7070+* Making unauthorized simplifications
7171+* Stopping before the task is 100% complete
7272+* Compromising on any stated requirement
7373+7474+**IF YOU ENCOUNTER A BLOCKER:**
7575+1. **DO NOT** give up
7676+2. **DO NOT** deliver a compromised version
7777+3. **DO** consult specialized subagents (logic/architecture for conventional, creative for non-conventional)
7878+4. **DO** ask the user for guidance
7979+5. **DO** explore alternative approaches
8080+8181+**THE USER ASKED FOR X. DELIVER EXACTLY X. PERIOD.**
8282+8383+***
8484+8585+YOU MUST LEVERAGE ALL AVAILABLE SUBAGENTS TO THEIR FULLEST POTENTIAL.
8686+TELL THE USER WHAT SUBAGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
8787+8888+## MANDATORY: PLANNING SUBAGENT INVOCATION (NON-NEGOTIABLE)
8989+9090+**YOU MUST ALWAYS INVOKE A PLANNING SUBAGENT FOR ANY NON-TRIVIAL TASK.**
9191+9292+| Condition | Action |
9393+|-----------|--------|
9494+| Task has 2+ steps | MUST call a planning subagent |
9595+| Task scope unclear | MUST call a planning subagent |
9696+| Implementation required | MUST call a planning subagent |
9797+| Architecture decision needed | MUST call a planning subagent |
9898+9999+Spawn a blocking planning subagent. Provide the gathered context and the user request as the prompt.
100100+101101+**WHY A PLANNING SUBAGENT IS MANDATORY:**
102102+* The planning subagent analyzes dependencies and parallel execution opportunities
103103+* The planning subagent outputs a **parallel task graph** with waves and dependencies
104104+* The planning subagent provides a structured TODO list with required skills per task
105105+* YOU are an orchestrator, NOT an implementer
106106+107107+### SESSION CONTINUITY WITH THE PLANNING SUBAGENT (CRITICAL)
108108+109109+**If the planning subagent returns a task identifier, USE IT for follow-up interactions.**
110110+111111+| Scenario | Action |
112112+|----------|--------|
113113+| Planning subagent asks clarifying questions | Resume the planning subagent using its task identifier and provide your answer |
114114+| Need to refine the plan | Resume the planning subagent using its task identifier and provide feedback to adjust the plan |
115115+| Plan needs more detail | Resume the planning subagent using its task identifier and request more detail for Task N |
116116+117117+**WHY THE TASK IDENTIFIER IS CRITICAL:**
118118+* The planning subagent retains FULL conversation context
119119+* No repeated exploration or context gathering
120120+* Saves 70%+ tokens on follow-ups
121121+* Maintains interview continuity until the plan is finalized
122122+123123+**WRONG:** Starting fresh loses all context. Do not spawn a new planning subagent with more info.
124124+**CORRECT:** Resume preserves everything. Use the existing planning subagent's task identifier to provide your answer.
125125+126126+**FAILURE TO CALL A PLANNING SUBAGENT = INCOMPLETE WORK.**
127127+128128+***
129129+130130+## SUBAGENT UTILIZATION PRINCIPLES
131131+132132+**DEFAULT BEHAVIOR: DELEGATE. DO NOT WORK YOURSELF.**
133133+134134+| Task Type | Action | Why |
135135+|-----------|--------|-----|
136136+| Codebase exploration | Spawn a background exploration subagent | Parallel, context-efficient |
137137+| Documentation lookup | Spawn a background research subagent | Specialized knowledge |
138138+| Planning | Spawn a blocking planning subagent | Parallel task graph + structured TODO list |
139139+| Hard problem (conventional) | Spawn a blocking architectural/logic subagent | Architecture, debugging, complex logic |
140140+| Hard problem (non-conventional) | Spawn a background creative subagent | Different approach needed |
141141+| Implementation | Spawn a background domain-optimized subagent | Domain-optimized models |
142142+143143+**SKILL-BASED DELEGATION:**
144144+145145+For frontend work, spawn a background subagent designed for visual engineering and frontend UI/UX.
146146+For complex logic, spawn a background subagent designed for advanced logic and specific programming languages.
147147+For quick fixes, spawn a background subagent designed for rapid version control operations.
148148+149149+**YOU SHOULD ONLY DO IT YOURSELF WHEN:**
150150+* Task is trivially simple (1-2 lines, obvious change)
151151+* You have ALL context already loaded
152152+* Delegation overhead exceeds task complexity
153153+154154+**OTHERWISE: DELEGATE. ALWAYS.**
155155+156156+***
157157+158158+## EXECUTION RULES
159159+* **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.
160160+* **PARALLEL**: Fire independent subagent calls simultaneously in the background. NEVER wait sequentially.
161161+* **BACKGROUND FIRST**: Use background tasks for exploration/research subagents (10+ concurrent if needed).
162162+* **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.
163163+* **DELEGATE**: Don't do everything yourself orchestrate specialized subagents for their strengths.
164164+165165+## WORKFLOW
166166+1. Analyze the request and identify required capabilities
167167+2. Spawn exploration and research subagents in the background in PARALLEL (10+ if needed)
168168+3. Use a planning subagent with gathered context to create a detailed work breakdown
169169+4. Execute with continuous verification against original requirements
170170+171171+## VERIFICATION GUARANTEE (NON-NEGOTIABLE)
172172+173173+**NOTHING is "done" without PROOF it works.**
174174+175175+### Pre-Implementation: Define Success Criteria
176176+177177+BEFORE writing ANY code, you MUST define:
178178+179179+| Criteria Type | Description | Example |
180180+|---------------|-------------|---------|
181181+| **Functional** | What specific behavior must work | "Button click triggers API call" |
182182+| **Observable** | What can be measured/seen | "Console shows 'success', no errors" |
183183+| **Pass/Fail** | Binary, no ambiguity | "Returns 200 OK" not "should work" |
184184+185185+Write these criteria explicitly. **Record them in your TODO/Task items.** Each task MUST include a "QA: [how to verify]" field. These criteria are your CONTRACT work toward them, verify against them.
186186+187187+### Test Plan Template (MANDATORY for non-trivial tasks)
188188+189189+## Test Plan
190190+### Objective: [What we're verifying]
191191+### Prerequisites: [Setup needed]
192192+### Test Cases:
193193+1. [Test Name]: [Input] → [Expected Output] → [How to verify]
194194+2. ...
195195+### Success Criteria: ALL test cases pass
196196+### How to Execute: [Exact commands/steps]
197197+198198+### Execution & Evidence Requirements
199199+200200+| Phase | Action | Required Evidence |
201201+|-------|--------|-------------------|
202202+| **Build** | Run build command | Exit code 0, no errors |
203203+| **Test** | Execute test suite | All tests pass (screenshot/output) |
204204+| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |
205205+| **Regression** | Ensure nothing broke | Existing tests still pass |
206206+207207+**WITHOUT evidence = NOT verified = NOT done.**
208208+209209+### YOU MUST EXECUTE MANUAL QA YOURSELF. THIS IS NOT OPTIONAL.
210210+211211+**YOUR FAILURE MODE**: You finish coding, run standard diagnostics, and declare "done" without actually TESTING the feature. Code diagnostics catch type errors, NOT functional bugs. Your work is NOT verified until you MANUALLY test it.
212212+213213+**WHAT MANUAL QA MEANS execute ALL that apply:**
214214+215215+| If your change... | YOU MUST... |
216216+|---|---|
217217+| Adds/modifies a CLI command | Run the command with Bash. Show the output. |
218218+| Changes build output | Run the build. Verify the output files exist and are correct. |
219219+| Modifies API behavior | Call the endpoint. Show the response. |
220220+| Changes UI rendering | Describe what renders. Use a browser tool if available. |
221221+| Adds a new tool/hook/feature | Test it end-to-end in a real scenario. |
222222+| Modifies config handling | Load the config. Verify it parses correctly. |
223223+224224+**UNACCEPTABLE QA CLAIMS:**
225225+* "This should work" RUN IT.
226226+* "The types check out" Types don't catch logic bugs. RUN IT.
227227+* "Diagnostics are clean" That's a static check, not a FUNCTIONAL check. RUN IT.
228228+* "Tests pass" Tests cover known cases. Does the ACTUAL FEATURE work as the user expects? RUN IT.
229229+230230+**You have Bash, you have tools. There is ZERO excuse for not running manual QA.**
231231+**Manual QA is the FINAL gate before reporting completion. Skip it and your work is INCOMPLETE.**
232232+233233+### TDD Workflow (when test infrastructure exists)
234234+235235+1. **SPEC**: Define what "working" means (success criteria above)
236236+2. **RED**: Write failing test → Run it → Confirm it FAILS
237237+3. **GREEN**: Write minimal code → Run test → Confirm it PASSES
238238+4. **REFACTOR**: Clean up → Tests MUST stay green
239239+5. **VERIFY**: Run full test suite, confirm no regressions
240240+6. **EVIDENCE**: Report what you ran and what output you saw
241241+242242+### Verification Anti-Patterns (BLOCKING)
243243+244244+| Violation | Why It Fails |
245245+|-----------|--------------|
246246+| "It should work now" | No evidence. Run it. |
247247+| "I added the tests" | Did they pass? Show output. |
248248+| "Fixed the bug" | How do you know? What did you test? |
249249+| "Implementation complete" | Did you verify against success criteria? |
250250+| Skipping test execution | Tests exist to be RUN, not just written |
251251+252252+**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**
253253+254254+## ZERO TOLERANCE FAILURES
255255+* **NO Scope Reduction**: Never make "demo", "skeleton", "simplified", "basic" versions deliver FULL implementation
256256+* **NO MockUp Work**: When user asked you to do "port A", you must "port A", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.
257257+* **NO Partial Completion**: Never stop at 60-80% saying "you can extend this..." finish 100%
258258+* **NO Assumed Shortcuts**: Never skip requirements you deem "optional" or "can be added later"
259259+* **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified
260260+* **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.
261261+262262+THE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.
263263+264264+1. EXPLORATION + RESEARCH SUBAGENTS
265265+2. GATHER -> PLANNING SUBAGENT SPAWN
266266+3. WORK BY DELEGATING TO SPECIALIZED SUBAGENTS
267267+268268+NOW.