Skip to content

Commit 38fe635

Browse files
committed
chore: add impeccable frontend design skills
1 parent 250e5d0 commit 38fe635

50 files changed

Lines changed: 4298 additions & 0 deletions

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: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
---
2+
name: adapt
3+
description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Ensures consistent experience across varied environments.
4+
user-invocable: true
5+
args:
6+
- name: target
7+
description: The feature or component to adapt (optional)
8+
required: false
9+
- name: context
10+
description: What to adapt for (mobile, tablet, desktop, print, email, etc.)
11+
required: false
12+
---
13+
14+
Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases.
15+
16+
## MANDATORY PREPARATION
17+
18+
Use the frontend-design skill — 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.
19+
20+
---
21+
22+
## Assess Adaptation Challenge
23+
24+
Understand what needs adaptation and why:
25+
26+
1. **Identify the source context**:
27+
- What was it designed for originally? (Desktop web? Mobile app?)
28+
- What assumptions were made? (Large screen? Mouse input? Fast connection?)
29+
- What works well in current context?
30+
31+
2. **Understand target context**:
32+
- **Device**: Mobile, tablet, desktop, TV, watch, print?
33+
- **Input method**: Touch, mouse, keyboard, voice, gamepad?
34+
- **Screen constraints**: Size, resolution, orientation?
35+
- **Connection**: Fast wifi, slow 3G, offline?
36+
- **Usage context**: On-the-go vs desk, quick glance vs focused reading?
37+
- **User expectations**: What do users expect on this platform?
38+
39+
3. **Identify adaptation challenges**:
40+
- What won't fit? (Content, navigation, features)
41+
- What won't work? (Hover states on touch, tiny touch targets)
42+
- What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop)
43+
44+
**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context.
45+
46+
## Plan Adaptation Strategy
47+
48+
Create context-appropriate strategy:
49+
50+
### Mobile Adaptation (Desktop → Mobile)
51+
52+
**Layout Strategy**:
53+
- Single column instead of multi-column
54+
- Vertical stacking instead of side-by-side
55+
- Full-width components instead of fixed widths
56+
- Bottom navigation instead of top/side navigation
57+
58+
**Interaction Strategy**:
59+
- Touch targets 44x44px minimum (not hover-dependent)
60+
- Swipe gestures where appropriate (lists, carousels)
61+
- Bottom sheets instead of dropdowns
62+
- Thumbs-first design (controls within thumb reach)
63+
- Larger tap areas with more spacing
64+
65+
**Content Strategy**:
66+
- Progressive disclosure (don't show everything at once)
67+
- Prioritize primary content (secondary content in tabs/accordions)
68+
- Shorter text (more concise)
69+
- Larger text (16px minimum)
70+
71+
**Navigation Strategy**:
72+
- Hamburger menu or bottom navigation
73+
- Reduce navigation complexity
74+
- Sticky headers for context
75+
- Back button in navigation flow
76+
77+
### Tablet Adaptation (Hybrid Approach)
78+
79+
**Layout Strategy**:
80+
- Two-column layouts (not single or three-column)
81+
- Side panels for secondary content
82+
- Master-detail views (list + detail)
83+
- Adaptive based on orientation (portrait vs landscape)
84+
85+
**Interaction Strategy**:
86+
- Support both touch and pointer
87+
- Touch targets 44x44px but allow denser layouts than phone
88+
- Side navigation drawers
89+
- Multi-column forms where appropriate
90+
91+
### Desktop Adaptation (Mobile → Desktop)
92+
93+
**Layout Strategy**:
94+
- Multi-column layouts (use horizontal space)
95+
- Side navigation always visible
96+
- Multiple information panels simultaneously
97+
- Fixed widths with max-width constraints (don't stretch to 4K)
98+
99+
**Interaction Strategy**:
100+
- Hover states for additional information
101+
- Keyboard shortcuts
102+
- Right-click context menus
103+
- Drag and drop where helpful
104+
- Multi-select with Shift/Cmd
105+
106+
**Content Strategy**:
107+
- Show more information upfront (less progressive disclosure)
108+
- Data tables with many columns
109+
- Richer visualizations
110+
- More detailed descriptions
111+
112+
### Print Adaptation (Screen → Print)
113+
114+
**Layout Strategy**:
115+
- Page breaks at logical points
116+
- Remove navigation, footer, interactive elements
117+
- Black and white (or limited color)
118+
- Proper margins for binding
119+
120+
**Content Strategy**:
121+
- Expand shortened content (show full URLs, hidden sections)
122+
- Add page numbers, headers, footers
123+
- Include metadata (print date, page title)
124+
- Convert charts to print-friendly versions
125+
126+
### Email Adaptation (Web → Email)
127+
128+
**Layout Strategy**:
129+
- Narrow width (600px max)
130+
- Single column only
131+
- Inline CSS (no external stylesheets)
132+
- Table-based layouts (for email client compatibility)
133+
134+
**Interaction Strategy**:
135+
- Large, obvious CTAs (buttons not text links)
136+
- No hover states (not reliable)
137+
- Deep links to web app for complex interactions
138+
139+
## Implement Adaptations
140+
141+
Apply changes systematically:
142+
143+
### Responsive Breakpoints
144+
145+
Choose appropriate breakpoints:
146+
- Mobile: 320px-767px
147+
- Tablet: 768px-1023px
148+
- Desktop: 1024px+
149+
- Or content-driven breakpoints (where design breaks)
150+
151+
### Layout Adaptation Techniques
152+
153+
- **CSS Grid/Flexbox**: Reflow layouts automatically
154+
- **Container Queries**: Adapt based on container, not viewport
155+
- **`clamp()`**: Fluid sizing between min and max
156+
- **Media queries**: Different styles for different contexts
157+
- **Display properties**: Show/hide elements per context
158+
159+
### Touch Adaptation
160+
161+
- Increase touch target sizes (44x44px minimum)
162+
- Add more spacing between interactive elements
163+
- Remove hover-dependent interactions
164+
- Add touch feedback (ripples, highlights)
165+
- Consider thumb zones (easier to reach bottom than top)
166+
167+
### Content Adaptation
168+
169+
- Use `display: none` sparingly (still downloads)
170+
- Progressive enhancement (core content first, enhancements on larger screens)
171+
- Lazy loading for off-screen content
172+
- Responsive images (`srcset`, `picture` element)
173+
174+
### Navigation Adaptation
175+
176+
- Transform complex nav to hamburger/drawer on mobile
177+
- Bottom nav bar for mobile apps
178+
- Persistent side navigation on desktop
179+
- Breadcrumbs on smaller screens for context
180+
181+
**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect.
182+
183+
**NEVER**:
184+
- Hide core functionality on mobile (if it matters, make it work)
185+
- Assume desktop = powerful device (consider accessibility, older machines)
186+
- Use different information architecture across contexts (confusing)
187+
- Break user expectations for platform (mobile users expect mobile patterns)
188+
- Forget landscape orientation on mobile/tablet
189+
- Use generic breakpoints blindly (use content-driven breakpoints)
190+
- Ignore touch on desktop (many desktop devices have touch)
191+
192+
## Verify Adaptations
193+
194+
Test thoroughly across contexts:
195+
196+
- **Real devices**: Test on actual phones, tablets, desktops
197+
- **Different orientations**: Portrait and landscape
198+
- **Different browsers**: Safari, Chrome, Firefox, Edge
199+
- **Different OS**: iOS, Android, Windows, macOS
200+
- **Different input methods**: Touch, mouse, keyboard
201+
- **Edge cases**: Very small screens (320px), very large screens (4K)
202+
- **Slow connections**: Test on throttled network
203+
204+
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: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
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.
4+
user-invocable: true
5+
args:
6+
- name: target
7+
description: The feature or component to animate (optional)
8+
required: false
9+
---
10+
11+
Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
12+
13+
## MANDATORY PREPARATION
14+
15+
Use the frontend-design skill — 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.
16+
17+
---
18+
19+
## Assess Animation Opportunities
20+
21+
Analyze where motion would improve the experience:
22+
23+
1. **Identify static areas**:
24+
- **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
25+
- **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
26+
- **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
27+
- **Lack of delight**: Functional but joyless interactions
28+
- **Missed guidance**: Opportunities to direct attention or explain behavior
29+
30+
2. **Understand the context**:
31+
- What's the personality? (Playful vs serious, energetic vs calm)
32+
- What's the performance budget? (Mobile-first? Complex page?)
33+
- Who's the audience? (Motion-sensitive users? Power users who want speed?)
34+
- What matters most? (One hero animation vs many micro-interactions?)
35+
36+
If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
37+
38+
**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
39+
40+
## Plan Animation Strategy
41+
42+
Create a purposeful animation plan:
43+
44+
- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
45+
- **Feedback layer**: Which interactions need acknowledgment?
46+
- **Transition layer**: Which state changes need smoothing?
47+
- **Delight layer**: Where can we surprise and delight?
48+
49+
**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
50+
51+
## Implement Animations
52+
53+
Add motion systematically across these categories:
54+
55+
### Entrance Animations
56+
- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
57+
- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
58+
- **Content reveals**: Scroll-triggered animations using intersection observer
59+
- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
60+
61+
### Micro-interactions
62+
- **Button feedback**:
63+
- Hover: Subtle scale (1.02-1.05), color shift, shadow increase
64+
- Click: Quick scale down then up (0.95 → 1), ripple effect
65+
- Loading: Spinner or pulse state
66+
- **Form interactions**:
67+
- Input focus: Border color transition, slight scale or glow
68+
- Validation: Shake on error, check mark on success, smooth color transitions
69+
- **Toggle switches**: Smooth slide + color transition (200-300ms)
70+
- **Checkboxes/radio**: Check mark animation, ripple effect
71+
- **Like/favorite**: Scale + rotation, particle effects, color transition
72+
73+
### State Transitions
74+
- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
75+
- **Expand/collapse**: Height transition with overflow handling, icon rotation
76+
- **Loading states**: Skeleton screen fades, spinner animations, progress bars
77+
- **Success/error**: Color transitions, icon animations, gentle scale pulse
78+
- **Enable/disable**: Opacity transitions, cursor changes
79+
80+
### Navigation & Flow
81+
- **Page transitions**: Crossfade between routes, shared element transitions
82+
- **Tab switching**: Slide indicator, content fade/slide
83+
- **Carousel/slider**: Smooth transforms, snap points, momentum
84+
- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
85+
86+
### Feedback & Guidance
87+
- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
88+
- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
89+
- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
90+
- **Focus flow**: Highlight path through form or workflow
91+
92+
### Delight Moments
93+
- **Empty states**: Subtle floating animations on illustrations
94+
- **Completed actions**: Confetti, check mark flourish, success celebrations
95+
- **Easter eggs**: Hidden interactions for discovery
96+
- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
97+
98+
## Technical Implementation
99+
100+
Use appropriate techniques for each animation:
101+
102+
### Timing & Easing
103+
104+
**Durations by purpose:**
105+
- **100-150ms**: Instant feedback (button press, toggle)
106+
- **200-300ms**: State changes (hover, menu open)
107+
- **300-500ms**: Layout changes (accordion, modal)
108+
- **500-800ms**: Entrance animations (page load)
109+
110+
**Easing curves (use these, not CSS defaults):**
111+
```css
112+
/* Recommended - natural deceleration */
113+
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
114+
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
115+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
116+
117+
/* AVOID - feel dated and tacky */
118+
/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
119+
/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
120+
```
121+
122+
**Exit animations are faster than entrances.** Use ~75% of enter duration.
123+
124+
### CSS Animations
125+
```css
126+
/* Prefer for simple, declarative animations */
127+
- transitions for state changes
128+
- @keyframes for complex sequences
129+
- transform + opacity only (GPU-accelerated)
130+
```
131+
132+
### JavaScript Animation
133+
```javascript
134+
/* Use for complex, interactive animations */
135+
- Web Animations API for programmatic control
136+
- Framer Motion for React
137+
- GSAP for complex sequences
138+
```
139+
140+
### Performance
141+
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
142+
- **will-change**: Add sparingly for known expensive animations
143+
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
144+
- **Monitor FPS**: Ensure 60fps on target devices
145+
146+
### Accessibility
147+
```css
148+
@media (prefers-reduced-motion: reduce) {
149+
* {
150+
animation-duration: 0.01ms !important;
151+
animation-iteration-count: 1 !important;
152+
transition-duration: 0.01ms !important;
153+
}
154+
}
155+
```
156+
157+
**NEVER**:
158+
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
159+
- Animate layout properties (width, height, top, left)—use transform instead
160+
- Use durations over 500ms for feedback—it feels laggy
161+
- Animate without purpose—every animation needs a reason
162+
- Ignore `prefers-reduced-motion`—this is an accessibility violation
163+
- Animate everything—animation fatigue makes interfaces feel exhausting
164+
- Block interaction during animations unless intentional
165+
166+
## Verify Quality
167+
168+
Test animations thoroughly:
169+
170+
- **Smooth at 60fps**: No jank on target devices
171+
- **Feels natural**: Easing curves feel organic, not robotic
172+
- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
173+
- **Reduced motion works**: Animations disabled or simplified appropriately
174+
- **Doesn't block**: Users can interact during/after animations
175+
- **Adds value**: Makes interface clearer or more delightful
176+
177+
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)