Skip to content

Commit 9127bcc

Browse files
author
Lumina Mao
committed
feat: add OpenClaw agent support
Add first-class OpenClaw support to the build system. OpenClaw is a local-first AI agent framework whose SKILL.md files use an extended YAML frontmatter schema (permissions, triggers, version, metadata). Changes: - New `openclaw` provider in PROVIDERS config - New `frontmatterEnrich` hook on transformer factory — lets any provider post-process frontmatter before YAML serialization - Extended `generateYamlFrontmatter` with recursive serializer for nested objects and arrays (backward-compatible) - Model-agnostic placeholder config (uses 'the model' since OpenClaw operators configure their own LLM backend) - Pre-built skills output to `.openclaw/skills/` Complements rohitg00/skillkit#86 which adds the OpenClaw adapter to SkillKit's translate command — both produce the same output format.
1 parent 9d368b7 commit 9127bcc

File tree

35 files changed

+5191
-2
lines changed

35 files changed

+5191
-2
lines changed

.openclaw/skills/adapt/SKILL.md

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

.openclaw/skills/animate/SKILL.md

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