Skip to content

Commit f3c9ee8

Browse files
committed
Added Skill for UI design, and let it run some fixes on Banner and Form elements.
1 parent 15d6d24 commit f3c9ee8

85 files changed

Lines changed: 11197 additions & 1297 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/adapt/SKILL.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
name: adapt
3+
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.
4+
user-invocable: true
5+
argument-hint: "[target] [context (mobile, tablet, print...)]"
6+
---
7+
8+
Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases.
9+
10+
## MANDATORY PREPARATION
11+
12+
Invoke /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 /teach-impeccable first. Additionally gather: target platforms/devices and usage contexts.
13+
14+
---
15+
16+
## Assess Adaptation Challenge
17+
18+
Understand what needs adaptation and why:
19+
20+
1. **Identify the source context**:
21+
- What was it designed for originally? (Desktop web? Mobile app?)
22+
- What assumptions were made? (Large screen? Mouse input? Fast connection?)
23+
- What works well in current context?
24+
25+
2. **Understand target context**:
26+
- **Device**: Mobile, tablet, desktop, TV, watch, print?
27+
- **Input method**: Touch, mouse, keyboard, voice, gamepad?
28+
- **Screen constraints**: Size, resolution, orientation?
29+
- **Connection**: Fast wifi, slow 3G, offline?
30+
- **Usage context**: On-the-go vs desk, quick glance vs focused reading?
31+
- **User expectations**: What do users expect on this platform?
32+
33+
3. **Identify adaptation challenges**:
34+
- What won't fit? (Content, navigation, features)
35+
- What won't work? (Hover states on touch, tiny touch targets)
36+
- What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop)
37+
38+
**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context.
39+
40+
## Plan Adaptation Strategy
41+
42+
Create context-appropriate strategy:
43+
44+
### Mobile Adaptation (Desktop → Mobile)
45+
46+
**Layout Strategy**:
47+
- Single column instead of multi-column
48+
- Vertical stacking instead of side-by-side
49+
- Full-width components instead of fixed widths
50+
- Bottom navigation instead of top/side navigation
51+
52+
**Interaction Strategy**:
53+
- Touch targets 44x44px minimum (not hover-dependent)
54+
- Swipe gestures where appropriate (lists, carousels)
55+
- Bottom sheets instead of dropdowns
56+
- Thumbs-first design (controls within thumb reach)
57+
- Larger tap areas with more spacing
58+
59+
**Content Strategy**:
60+
- Progressive disclosure (don't show everything at once)
61+
- Prioritize primary content (secondary content in tabs/accordions)
62+
- Shorter text (more concise)
63+
- Larger text (16px minimum)
64+
65+
**Navigation Strategy**:
66+
- Hamburger menu or bottom navigation
67+
- Reduce navigation complexity
68+
- Sticky headers for context
69+
- Back button in navigation flow
70+
71+
### Tablet Adaptation (Hybrid Approach)
72+
73+
**Layout Strategy**:
74+
- Two-column layouts (not single or three-column)
75+
- Side panels for secondary content
76+
- Master-detail views (list + detail)
77+
- Adaptive based on orientation (portrait vs landscape)
78+
79+
**Interaction Strategy**:
80+
- Support both touch and pointer
81+
- Touch targets 44x44px but allow denser layouts than phone
82+
- Side navigation drawers
83+
- Multi-column forms where appropriate
84+
85+
### Desktop Adaptation (Mobile → Desktop)
86+
87+
**Layout Strategy**:
88+
- Multi-column layouts (use horizontal space)
89+
- Side navigation always visible
90+
- Multiple information panels simultaneously
91+
- Fixed widths with max-width constraints (don't stretch to 4K)
92+
93+
**Interaction Strategy**:
94+
- Hover states for additional information
95+
- Keyboard shortcuts
96+
- Right-click context menus
97+
- Drag and drop where helpful
98+
- Multi-select with Shift/Cmd
99+
100+
**Content Strategy**:
101+
- Show more information upfront (less progressive disclosure)
102+
- Data tables with many columns
103+
- Richer visualizations
104+
- More detailed descriptions
105+
106+
### Print Adaptation (Screen → Print)
107+
108+
**Layout Strategy**:
109+
- Page breaks at logical points
110+
- Remove navigation, footer, interactive elements
111+
- Black and white (or limited color)
112+
- Proper margins for binding
113+
114+
**Content Strategy**:
115+
- Expand shortened content (show full URLs, hidden sections)
116+
- Add page numbers, headers, footers
117+
- Include metadata (print date, page title)
118+
- Convert charts to print-friendly versions
119+
120+
### Email Adaptation (Web → Email)
121+
122+
**Layout Strategy**:
123+
- Narrow width (600px max)
124+
- Single column only
125+
- Inline CSS (no external stylesheets)
126+
- Table-based layouts (for email client compatibility)
127+
128+
**Interaction Strategy**:
129+
- Large, obvious CTAs (buttons not text links)
130+
- No hover states (not reliable)
131+
- Deep links to web app for complex interactions
132+
133+
## Implement Adaptations
134+
135+
Apply changes systematically:
136+
137+
### Responsive Breakpoints
138+
139+
Choose appropriate breakpoints:
140+
- Mobile: 320px-767px
141+
- Tablet: 768px-1023px
142+
- Desktop: 1024px+
143+
- Or content-driven breakpoints (where design breaks)
144+
145+
### Layout Adaptation Techniques
146+
147+
- **CSS Grid/Flexbox**: Reflow layouts automatically
148+
- **Container Queries**: Adapt based on container, not viewport
149+
- **`clamp()`**: Fluid sizing between min and max
150+
- **Media queries**: Different styles for different contexts
151+
- **Display properties**: Show/hide elements per context
152+
153+
### Touch Adaptation
154+
155+
- Increase touch target sizes (44x44px minimum)
156+
- Add more spacing between interactive elements
157+
- Remove hover-dependent interactions
158+
- Add touch feedback (ripples, highlights)
159+
- Consider thumb zones (easier to reach bottom than top)
160+
161+
### Content Adaptation
162+
163+
- Use `display: none` sparingly (still downloads)
164+
- Progressive enhancement (core content first, enhancements on larger screens)
165+
- Lazy loading for off-screen content
166+
- Responsive images (`srcset`, `picture` element)
167+
168+
### Navigation Adaptation
169+
170+
- Transform complex nav to hamburger/drawer on mobile
171+
- Bottom nav bar for mobile apps
172+
- Persistent side navigation on desktop
173+
- Breadcrumbs on smaller screens for context
174+
175+
**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect.
176+
177+
**NEVER**:
178+
- Hide core functionality on mobile (if it matters, make it work)
179+
- Assume desktop = powerful device (consider accessibility, older machines)
180+
- Use different information architecture across contexts (confusing)
181+
- Break user expectations for platform (mobile users expect mobile patterns)
182+
- Forget landscape orientation on mobile/tablet
183+
- Use generic breakpoints blindly (use content-driven breakpoints)
184+
- Ignore touch on desktop (many desktop devices have touch)
185+
186+
## Verify Adaptations
187+
188+
Test thoroughly across contexts:
189+
190+
- **Real devices**: Test on actual phones, tablets, desktops
191+
- **Different orientations**: Portrait and landscape
192+
- **Different browsers**: Safari, Chrome, Firefox, Edge
193+
- **Different OS**: iOS, Android, Windows, macOS
194+
- **Different input methods**: Touch, mouse, keyboard
195+
- **Edge cases**: Very small screens (320px), very large screens (4K)
196+
- **Slow connections**: Test on throttled network
197+
198+
Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly.

.agents/skills/animate/SKILL.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
name: animate
3+
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.
4+
user-invocable: true
5+
argument-hint: "[target]"
6+
---
7+
8+
Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
9+
10+
## MANDATORY PREPARATION
11+
12+
Invoke /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 /teach-impeccable first. Additionally gather: performance constraints.
13+
14+
---
15+
16+
## Assess Animation Opportunities
17+
18+
Analyze where motion would improve the experience:
19+
20+
1. **Identify static areas**:
21+
- **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
22+
- **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
23+
- **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
24+
- **Lack of delight**: Functional but joyless interactions
25+
- **Missed guidance**: Opportunities to direct attention or explain behavior
26+
27+
2. **Understand the context**:
28+
- What's the personality? (Playful vs serious, energetic vs calm)
29+
- What's the performance budget? (Mobile-first? Complex page?)
30+
- Who's the audience? (Motion-sensitive users? Power users who want speed?)
31+
- What matters most? (One hero animation vs many micro-interactions?)
32+
33+
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
34+
35+
**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
36+
37+
## Plan Animation Strategy
38+
39+
Create a purposeful animation plan:
40+
41+
- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
42+
- **Feedback layer**: Which interactions need acknowledgment?
43+
- **Transition layer**: Which state changes need smoothing?
44+
- **Delight layer**: Where can we surprise and delight?
45+
46+
**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
47+
48+
## Implement Animations
49+
50+
Add motion systematically across these categories:
51+
52+
### Entrance Animations
53+
- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
54+
- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
55+
- **Content reveals**: Scroll-triggered animations using intersection observer
56+
- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
57+
58+
### Micro-interactions
59+
- **Button feedback**:
60+
- Hover: Subtle scale (1.02-1.05), color shift, shadow increase
61+
- Click: Quick scale down then up (0.95 → 1), ripple effect
62+
- Loading: Spinner or pulse state
63+
- **Form interactions**:
64+
- Input focus: Border color transition, slight scale or glow
65+
- Validation: Shake on error, check mark on success, smooth color transitions
66+
- **Toggle switches**: Smooth slide + color transition (200-300ms)
67+
- **Checkboxes/radio**: Check mark animation, ripple effect
68+
- **Like/favorite**: Scale + rotation, particle effects, color transition
69+
70+
### State Transitions
71+
- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
72+
- **Expand/collapse**: Height transition with overflow handling, icon rotation
73+
- **Loading states**: Skeleton screen fades, spinner animations, progress bars
74+
- **Success/error**: Color transitions, icon animations, gentle scale pulse
75+
- **Enable/disable**: Opacity transitions, cursor changes
76+
77+
### Navigation & Flow
78+
- **Page transitions**: Crossfade between routes, shared element transitions
79+
- **Tab switching**: Slide indicator, content fade/slide
80+
- **Carousel/slider**: Smooth transforms, snap points, momentum
81+
- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
82+
83+
### Feedback & Guidance
84+
- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
85+
- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
86+
- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
87+
- **Focus flow**: Highlight path through form or workflow
88+
89+
### Delight Moments
90+
- **Empty states**: Subtle floating animations on illustrations
91+
- **Completed actions**: Confetti, check mark flourish, success celebrations
92+
- **Easter eggs**: Hidden interactions for discovery
93+
- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
94+
95+
## Technical Implementation
96+
97+
Use appropriate techniques for each animation:
98+
99+
### Timing & Easing
100+
101+
**Durations by purpose:**
102+
- **100-150ms**: Instant feedback (button press, toggle)
103+
- **200-300ms**: State changes (hover, menu open)
104+
- **300-500ms**: Layout changes (accordion, modal)
105+
- **500-800ms**: Entrance animations (page load)
106+
107+
**Easing curves (use these, not CSS defaults):**
108+
```css
109+
/* Recommended - natural deceleration */
110+
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
111+
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
112+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
113+
114+
/* AVOID - feel dated and tacky */
115+
/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
116+
/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
117+
```
118+
119+
**Exit animations are faster than entrances.** Use ~75% of enter duration.
120+
121+
### CSS Animations
122+
```css
123+
/* Prefer for simple, declarative animations */
124+
- transitions for state changes
125+
- @keyframes for complex sequences
126+
- transform + opacity only (GPU-accelerated)
127+
```
128+
129+
### JavaScript Animation
130+
```javascript
131+
/* Use for complex, interactive animations */
132+
- Web Animations API for programmatic control
133+
- Framer Motion for React
134+
- GSAP for complex sequences
135+
```
136+
137+
### Performance
138+
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
139+
- **will-change**: Add sparingly for known expensive animations
140+
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
141+
- **Monitor FPS**: Ensure 60fps on target devices
142+
143+
### Accessibility
144+
```css
145+
@media (prefers-reduced-motion: reduce) {
146+
* {
147+
animation-duration: 0.01ms !important;
148+
animation-iteration-count: 1 !important;
149+
transition-duration: 0.01ms !important;
150+
}
151+
}
152+
```
153+
154+
**NEVER**:
155+
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
156+
- Animate layout properties (width, height, top, left)—use transform instead
157+
- Use durations over 500ms for feedback—it feels laggy
158+
- Animate without purpose—every animation needs a reason
159+
- Ignore `prefers-reduced-motion`—this is an accessibility violation
160+
- Animate everything—animation fatigue makes interfaces feel exhausting
161+
- Block interaction during animations unless intentional
162+
163+
## Verify Quality
164+
165+
Test animations thoroughly:
166+
167+
- **Smooth at 60fps**: No jank on target devices
168+
- **Feels natural**: Easing curves feel organic, not robotic
169+
- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
170+
- **Reduced motion works**: Animations disabled or simplified appropriately
171+
- **Doesn't block**: Users can interact during/after animations
172+
- **Adds value**: Makes interface clearer or more delightful
173+
174+
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.

0 commit comments

Comments
 (0)